From fbcb21725b645cd39e10dfd24405260158b98c5d Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Fri, 2 Nov 2012 09:28:40 -0700 Subject: [PATCH] Fixed bug 1632 - iOS CoreAudio doesn't close C.W. Betts 2012-10-28 19:42:01 PDT I noticed when looking through the CoreAudio code of SDL 2.0 that there was a fix me wondering how iOS closed the audio system. While working on my own audio code on PlayerPRO, I discovered that Carbon's component code was replaced in the audio subsystem with Audio Component Services. --- src/audio/coreaudio/SDL_coreaudio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/audio/coreaudio/SDL_coreaudio.c b/src/audio/coreaudio/SDL_coreaudio.c index a0860528f..1747bb2cd 100644 --- a/src/audio/coreaudio/SDL_coreaudio.c +++ b/src/audio/coreaudio/SDL_coreaudio.c @@ -340,9 +340,10 @@ COREAUDIO_CloseDevice(_THIS) scope, bus, &callback, sizeof(callback)); - /* !!! FIXME: how does iOS free this? */ #if MACOSX_COREAUDIO CloseComponent(this->hidden->audioUnit); + #else + AudioComponentInstanceDispose(this->hidden->audioUnit); #endif this->hidden->audioUnitOpened = 0;