devkitPro / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
15 stars 12 forks source link

Pressing home or power twice causes apps to become slow with choppy sound #4

Closed rsn8887 closed 3 years ago

rsn8887 commented 5 years ago

The same happens when pressing the power button to sleep, and pressing the power button again to wake up. Using the power button, the problem happens with applets launched via album, too.

Some apps don’t suspend when pressing the home button. They keep running and playing sounds even after pressing home (why? It is not how commercial games behave). For those apps, the problem only appears when the power button is pressed twice.

rsn8887 commented 5 years ago

Hmm in uae4all the problem does NOT occur when I enter the menu before pressing home, or turn OFF the sound. So it is definitely related to sound only.

Cpasjuste commented 5 years ago

Hi @rsn8887 , i think i fixed it by moving to audren for audio, if you want to test it: http://files.mydedibox.fr/files/Dev/nx/libSDL2.a (https://github.com/devkitPro/SDL/tree/switch-sdl2_audren). I didn't notice any side effect, but i only tested it with sdl2 wav test and pPlay.

rsn8887 commented 5 years ago

Hello @Cpasjuste, yes you fixed it! I tested it with UAE4All2, and it all works perfectly. Amazing work!

Cpasjuste commented 5 years ago

Fixed in https://github.com/devkitPro/SDL/commit/51d12c191cdc7eb2ea7acca3daaf5e714b436128