sdl2_frt/src/audio
Sam Lantinga 8325df25aa Fixed bug 4169 - Crash due to audio session observer race condition
Jona

The following explains why this bug was happening:
This crash was caused because the audio session was being set as active [session setActive:YES error:&err] when the audio device was actually being CLOSED. Certain cases the audio session being set to active would fail and the method would return right away. Because of the way the error was handled we never removed the SDLInterruptionListener thus leaking it. Later when an interruption was received the THIS_ object would contain a pointer to an already released device causing the crash.

The fix:
When only one device remained open and it was being closed we needed to set the audio session as NOT active and completely ignore the returned error to successfully release the SDLInterruptionListener. I think the user assumed that the open_playback_devices and open_capture_devices would equal 0 when all of them where closed but the truth is that at the end of the closing process that the open devices count is decremented.
2018-05-24 07:30:24 -07:00
..
alsa Updated copyright for 2018 2018-01-03 10:03:25 -08:00
android Updated copyright for 2018 2018-01-03 10:03:25 -08:00
arts Updated copyright for 2018 2018-01-03 10:03:25 -08:00
coreaudio Fixed bug 4169 - Crash due to audio session observer race condition 2018-05-24 07:30:24 -07:00
directsound revert the recent typecast assignment changes (see bug #4079) 2018-02-12 17:00:00 +03:00
disk Updated copyright for 2018 2018-01-03 10:03:25 -08:00
dsp Updated copyright for 2018 2018-01-03 10:03:25 -08:00
dummy Updated copyright for 2018 2018-01-03 10:03:25 -08:00
emscripten Updated copyright for 2018 2018-01-03 10:03:25 -08:00
esd Updated copyright for 2018 2018-01-03 10:03:25 -08:00
fusionsound Updated copyright for 2018 2018-01-03 10:03:25 -08:00
haiku Updated copyright for 2018 2018-01-03 10:03:25 -08:00
jack Updated copyright for 2018 2018-01-03 10:03:25 -08:00
nacl Updated copyright for 2018 2018-01-03 10:03:25 -08:00
nas Updated copyright for 2018 2018-01-03 10:03:25 -08:00
netbsd Updated copyright for 2018 2018-01-03 10:03:25 -08:00
paudio Updated copyright for 2018 2018-01-03 10:03:25 -08:00
psp Updated copyright for 2018 2018-01-03 10:03:25 -08:00
pulseaudio pulseaudio: Just read/dump captured data in FlushCapture. 2018-02-17 18:30:21 -05:00
qsa Updated copyright for 2018 2018-01-03 10:03:25 -08:00
sndio Updated copyright for 2018 2018-01-03 10:03:25 -08:00
sun Updated copyright for 2018 2018-01-03 10:03:25 -08:00
wasapi Fixed MinGW-w64 build 2018-02-24 08:23:44 -08:00
winmm Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_audio_c.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_audio.c Added SDL_THREAD_PRIORITY_TIME_CRITICAL 2018-04-23 22:07:56 -07:00
SDL_audiocvt.c Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_audiodev_c.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_audiodev.c Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_audiotypecvt.c audio: Needed to fix two more instances for Visual Studio. 2018-05-21 12:05:17 -04:00
SDL_mixer.c Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_sysaudio.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_wave.c Updated copyright for 2018 2018-01-03 10:03:25 -08:00
SDL_wave.h Updated copyright for 2018 2018-01-03 10:03:25 -08:00