diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2005-03-16 23:11:08 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2005-03-16 23:11:08 +0000 |
commit | b9bcfeaf49e9433f6afc39ffda210ad8df44f175 (patch) | |
tree | 4668f79fdde9aa3013f12b6ff993c89066e2db2b /src | |
parent | 9f00e2a8f7568122ac0883062bb28e37a4a9e176 (diff) | |
download | mpd-b9bcfeaf49e9433f6afc39ffda210ad8df44f175.tar.gz mpd-b9bcfeaf49e9433f6afc39ffda210ad8df44f175.tar.xz mpd-b9bcfeaf49e9433f6afc39ffda210ad8df44f175.zip |
closing the audio device seems to work now
git-svn-id: https://svn.musicpd.org/mpd/trunk@3089 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src')
-rw-r--r-- | src/audioOutputs/audioOutput_osx.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/audioOutputs/audioOutput_osx.c b/src/audioOutputs/audioOutput_osx.c index 47f3621dc..2274f3361 100644 --- a/src/audioOutputs/audioOutput_osx.c +++ b/src/audioOutputs/audioOutput_osx.c @@ -104,18 +104,26 @@ static void osx_dropBufferedAudio(AudioOutput * audioOutput) { static void osx_closeDevice(AudioOutput * audioOutput) { OsxData * od = (OsxData *) audioOutput->data; + DEBUG("entering osx_closeDevice\n"); + pthread_mutex_lock(&od->mutex); + od->go = 0; while(od->len) { + DEBUG("osx_closeDevice: cond_wait\n"); pthread_cond_wait(&od->condition, &od->mutex); } - od->go = 0; pthread_mutex_unlock(&od->mutex); + DEBUG("stopping au\n"); + AudioOutputUnitStop(od->au); + DEBUG("closing au\n"); CloseComponent(od->au); AudioUnitUninitialize(od->au); + DEBUG("Leaving osx_closeDevice\n"); + audioOutput->open = 0; } |