This PR includes various fixes for the SDL audio driver for 3DS.
Primary: removes the implementation-specific audio device lock/unlock functions, which are broken in current SDL2 versions. That made a confusion between the audio device lock and the software mixer lock, and results in a lot of crashes for applications using MixerX on 3DS.
Secondary: restores @Wohlstand's fix for audio stack overflows on 3DS.
Tertiary: includes a hack to move the mixer thread to the system core (detects mixer thread by requested stack size). That core is only allowed to use 30% of CPU time, and using it slows down filesystem access. However, this allows greater runtime for the application on the main core, resulting in fewer gameplay interruptions.
Additional notes:
Uses a triple buffer instead of a double buffer by default. This avoids underruns, to allow a smaller buffer size for better application responsiveness (when a client application needs the mixer lock).
Restores @Wohlstand's fix (lost during an SDL2 merge) to not leave the priority variable uninitialized in a function.
This PR includes various fixes for the SDL audio driver for 3DS.
Primary: removes the implementation-specific audio device lock/unlock functions, which are broken in current SDL2 versions. That made a confusion between the audio device lock and the software mixer lock, and results in a lot of crashes for applications using MixerX on 3DS.
Secondary: restores @Wohlstand's fix for audio stack overflows on 3DS.
Tertiary: includes a hack to move the mixer thread to the system core (detects mixer thread by requested stack size). That core is only allowed to use 30% of CPU time, and using it slows down filesystem access. However, this allows greater runtime for the application on the main core, resulting in fewer gameplay interruptions.
Additional notes: