mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Fixed re-setting the audio session category when closing an audio device
This commit is contained in:
parent
229c2f8f5f
commit
922b3dc3e7
@ -566,6 +566,12 @@ COREAUDIO_CloseDevice(_THIS)
|
|||||||
AudioObjectRemovePropertyListener(this->hidden->deviceID, &alive_address, device_unplugged, this);
|
AudioObjectRemovePropertyListener(this->hidden->deviceID, &alive_address, device_unplugged, this);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (iscapture) {
|
||||||
|
open_capture_devices--;
|
||||||
|
} else {
|
||||||
|
open_playback_devices--;
|
||||||
|
}
|
||||||
|
|
||||||
#if !MACOSX_COREAUDIO
|
#if !MACOSX_COREAUDIO
|
||||||
update_audio_session(this, SDL_FALSE);
|
update_audio_session(this, SDL_FALSE);
|
||||||
#endif
|
#endif
|
||||||
@ -591,12 +597,6 @@ COREAUDIO_CloseDevice(_THIS)
|
|||||||
SDL_free(this->hidden->thread_error);
|
SDL_free(this->hidden->thread_error);
|
||||||
SDL_free(this->hidden->buffer);
|
SDL_free(this->hidden->buffer);
|
||||||
SDL_free(this->hidden);
|
SDL_free(this->hidden);
|
||||||
|
|
||||||
if (iscapture) {
|
|
||||||
open_capture_devices--;
|
|
||||||
} else {
|
|
||||||
open_playback_devices--;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MACOSX_COREAUDIO
|
#if MACOSX_COREAUDIO
|
||||||
|
Loading…
Reference in New Issue
Block a user