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:
Warren Dukes 2005-03-16 23:05:25 +00:00
parent d6607f5f23
commit 9f00e2a8f7

View File

@ -102,7 +102,19 @@ static void osx_dropBufferedAudio(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;
}