Skip to content

Commit

Permalink
⚗ Try fix Windows tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesFouchy committed Nov 13, 2024
1 parent 2b502d4 commit 537a7c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ static constexpr int64_t output_channels_count = 2;

static auto backend() -> RtAudio&
{
static RtAudio instance{};
return instance;
static auto* instance = new RtAudio{};
return *instance;
}

#ifndef NDEBUG // Only used by the assert, so unused in Release, which would cause a warning.
Expand Down Expand Up @@ -208,6 +208,7 @@ void shut_down()
{
if (backend().isStreamOpen())
backend().closeStream();
delete &backend();
}

} // namespace Audio
1 change: 1 addition & 0 deletions tests/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ auto main() -> int
// });

auto ctx = doctest::Context{};
Audio::shut_down();
// const char* arg2v[3] = {"truc", "--success", "--reporters=console"};
// ctx.applyCommandLine(3, arg2v);
int const exit_code = ctx.run(); // Run all unit tests
Expand Down

0 comments on commit 537a7c6

Please sign in to comment.