1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Disable properly the mixer fade out only with emscripten

It's not supported for an unknown reason.
This commit is contained in:
Mathieu Schroeter 2018-07-21 17:37:15 +02:00
parent 298d02c6f9
commit ee80592a6f

View File

@ -23,6 +23,7 @@
#include "def.h"
#include "event.h"
#include "misc.h"
#include "platform.h"
#include "sound.h"
// Stops all sounds.
@ -40,10 +41,11 @@ CSound::StopAllSounds (bool immediat, const std::set<Sint32> * except)
if (Mix_Playing (i + 1) == SDL_TRUE)
{
//if (immediat)
/* FIXME: add support of fade out with emscripten */
if (immediat && Platform::getType () == Platform::Type::SDL)
Mix_HaltChannel (i + 1);
//else
// Mix_FadeOutChannel (i + 1, 500);
else
Mix_FadeOutChannel (i + 1, 500);
}
}