Skip to content

Commit

Permalink
Use vector to prevent stack overlow!
Browse files Browse the repository at this point in the history
  • Loading branch information
djowel committed Sep 1, 2024
1 parent e1b751e commit 7d065b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/gen_adsr_envelope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ TEST_CASE("TEST_adsr_envelope")
constexpr auto n_channels = 2;
constexpr auto buffer_size = size * n_channels;

auto buff = std::array<float, buffer_size>{}; // The output buffer
// Use vector to prevent stack overlow!
static auto buff = std::vector<float>(buffer_size); // The output buffer

auto env_cfg = q::adsr_envelope_gen::config
{
Expand Down

0 comments on commit 7d065b3

Please sign in to comment.