Skip to content

Commit b77219f

Browse files
committed
Wait for the PositionWatcher thread to stop
1 parent 31b5b43 commit b77219f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/output/audio/AudioOutputDSound.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,12 @@ bool AudioOutputDSound::close()
193193
available = false;
194194
destroy();
195195
CloseHandle(notify_event); // FIXME: is it ok if thread is still waiting?
196+
197+
// Wait for the PositionWatcher thread to stop.
198+
while (watcher.isRunning()) {
199+
watcher.wait(500);
200+
}
201+
196202
return true;
197203
}
198204

0 commit comments

Comments
 (0)