From f5521031e43e0e6bbdfff2a185c12599cec09926 Mon Sep 17 00:00:00 2001 From: Robin Jones Date: Fri, 25 Oct 2024 13:49:56 +0100 Subject: [PATCH] Revert change to sound_reconfigure that caused a de reference exception after MP3 playback. --- src/menu/sound.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/menu/sound.c b/src/menu/sound.c index 08c5996f..ea088447 100644 --- a/src/menu/sound.c +++ b/src/menu/sound.c @@ -19,7 +19,10 @@ static bool sfx_enabled = false; static void sound_reconfigure (int frequency) { if ((frequency > 0) && (audio_get_frequency() != frequency)) { - sound_deinit(); + if (sound_initialized) { + mixer_close(); + audio_close(); + } audio_init(frequency, NUM_BUFFERS); mixer_init(NUM_CHANNELS); mp3player_mixer_init();