From a40ef7d3f80ca9b675ea23c09db70c51d61fb881 Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Sat, 21 Jul 2018 17:40:29 +0200 Subject: [PATCH] Restore other fade out with non JS platforms --- src/sound.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sound.cxx b/src/sound.cxx index 922a010..ba69a71 100644 --- a/src/sound.cxx +++ b/src/sound.cxx @@ -278,7 +278,12 @@ CSound::PlayImage (Sounds channel, Point pos, Sint32 rank) { stopCh = m_channelBlupi[rank]; if (stopCh >= 0 && m_lpSDL[stopCh] != nullptr) - Mix_HaltChannel (stopCh + 1); + { + if (Platform::getType () == Platform::Type::SDL) + Mix_FadeOutChannel (stopCh + 1, 500); + else /* FIXME: fade broken with emscripten */ + Mix_HaltChannel (stopCh + 1); + } m_channelBlupi[rank] = channel; }