Skip to content

Commit

Permalink
Pump audio mutex on deinit to make sure any other thread isn't sittin…
Browse files Browse the repository at this point in the history
…g on the mutex before yanking data out.
  • Loading branch information
jarikomppa committed Nov 15, 2021
1 parent 9387c07 commit 9ddd6b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/soloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@ namespace SoLoud

void Soloud::deinit()
{
// Make sure no audio operation is currently pending
lockAudioMutex_internal();
unlockAudioMutex_internal();
SOLOUD_ASSERT(!mInsideAudioThreadMutex);
stopAll();
if (mBackendCleanupFunc)
Expand Down

0 comments on commit 9ddd6b7

Please sign in to comment.