From ccd612345cb8bb6f28fe1258f2d98e90de63967d Mon Sep 17 00:00:00 2001 From: Franklin Wei Date: Thu, 11 Jan 2018 19:44:36 -0500 Subject: sdl: fix freeze on startup on PP targets Using the coprocessor was a good idea in theory, but didn't actually work. This moves all SDL threads to the main core, which isn't ideal, but at least works. Additionally, this also adds some good-practice stuff such as setting the default sample rate on exit. Change-Id: If1636b33d439000ec7c4e50f46e8d002708d3121 --- apps/plugins/sdl/src/audio/rockbox/SDL_rockboxaudio.c | 1 + 1 file changed, 1 insertion(+) (limited to 'apps/plugins/sdl/src/audio') diff --git a/apps/plugins/sdl/src/audio/rockbox/SDL_rockboxaudio.c b/apps/plugins/sdl/src/audio/rockbox/SDL_rockboxaudio.c index 2df820bee5..05b6c55853 100644 --- a/apps/plugins/sdl/src/audio/rockbox/SDL_rockboxaudio.c +++ b/apps/plugins/sdl/src/audio/rockbox/SDL_rockboxaudio.c @@ -222,6 +222,7 @@ static void ROCKBOXAUD_CloseAudio(_THIS) SDL_FreeAudioMem(this->hidden->rb_buf[i]); } rb->pcm_play_stop(); + rb->pcm_set_frequency(HW_SAMPR_DEFAULT); } static int ROCKBOXAUD_OpenAudio(_THIS, SDL_AudioSpec *spec) -- cgit v1.2.3