Core Audio output: Potential shutdown fix
The thread wait on shutdown had the potential to lock up waiting for the thread to shut down. Now it should at least spam the semaphores, so that the thread should progress to shutdown a lot quicker. Signed-off-by: Christopher Snowhill <kode54@gmail.com>CQTexperiment
parent
3c35cf1037
commit
cc2b27d43f
|
@ -733,8 +733,11 @@ default_device_changed(AudioObjectID inObjectID, UInt32 inNumberAddresses, const
|
|||
- (void)stop
|
||||
{
|
||||
if (stopNext && started && !paused) {
|
||||
while (![[outputController buffer] isEmpty])
|
||||
while (![[outputController buffer] isEmpty]) {
|
||||
[writeSemaphore signal];
|
||||
[readSemaphore signal];
|
||||
usleep(500);
|
||||
}
|
||||
}
|
||||
if (stopNext) {
|
||||
stopNext = NO;
|
||||
|
|
Loading…
Reference in New Issue