Signal the mixer thread outside of the mutex lock

This commit is contained in:
Chris Robinson
2015-02-03 02:40:22 -08:00
parent 12e443d61d
commit e6f4648924
+5 -1
View File
@@ -479,9 +479,13 @@ static void ALCjackPlayback_stop(ALCjackPlayback *self)
return;
self->killNow = 1;
/* Lock the backend to ensure we don't flag the mixer to die and signal the
* mixer to wake up in between it checking the flag and going to sleep and
* wait for a wakeup (potentially leading to it never waking back up to see
* the flag). */
ALCjackPlayback_lock(self);
alcnd_signal(&self->Cond);
ALCjackPlayback_unlock(self);
alcnd_signal(&self->Cond);
althrd_join(self->thread, &res);
jack_deactivate(self->Client);