Skip to content

Commit

Permalink
Wait for the PositionWatcher thread to stop
Browse files Browse the repository at this point in the history
  • Loading branch information
aronbierbaum committed Jun 15, 2022
1 parent 31b5b43 commit b77219f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/output/audio/AudioOutputDSound.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,12 @@ bool AudioOutputDSound::close()
available = false;
destroy();
CloseHandle(notify_event); // FIXME: is it ok if thread is still waiting?

// Wait for the PositionWatcher thread to stop.
while (watcher.isRunning()) {
watcher.wait(500);
}

return true;
}

Expand Down

0 comments on commit b77219f

Please sign in to comment.