WohlSoft / AudioCodecs

A portable collection of audio codecs as set of dependencies for SDL Mixer X audio library
14 stars 8 forks source link

SDL2 - 3DS fixes #13

Closed ds-sloth closed 1 year ago

ds-sloth commented 1 year ago

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: