attempt to close the osx device
git-svn-id: https://svn.musicpd.org/mpd/trunk@3088 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
d6607f5f23
commit
9f00e2a8f7
@ -102,7 +102,19 @@ static void osx_dropBufferedAudio(AudioOutput * audioOutput) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void osx_closeDevice(AudioOutput * audioOutput) {
|
static void osx_closeDevice(AudioOutput * audioOutput) {
|
||||||
//OsxData * od = (OsxData *) audioOutput->data;
|
OsxData * od = (OsxData *) audioOutput->data;
|
||||||
|
|
||||||
|
pthread_mutex_lock(&od->mutex);
|
||||||
|
while(od->len) {
|
||||||
|
pthread_cond_wait(&od->condition, &od->mutex);
|
||||||
|
}
|
||||||
|
od->go = 0;
|
||||||
|
pthread_mutex_unlock(&od->mutex);
|
||||||
|
|
||||||
|
AudioOutputUnitStop(od->au);
|
||||||
|
|
||||||
|
CloseComponent(od->au);
|
||||||
|
AudioUnitUninitialize(od->au);
|
||||||
|
|
||||||
audioOutput->open = 0;
|
audioOutput->open = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user