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:
parent
298d02c6f9
commit
ee80592a6f
@ -23,6 +23,7 @@
|
|||||||
#include "def.h"
|
#include "def.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
#include "platform.h"
|
||||||
#include "sound.h"
|
#include "sound.h"
|
||||||
|
|
||||||
// Stops all sounds.
|
// Stops all sounds.
|
||||||
@ -40,10 +41,11 @@ CSound::StopAllSounds (bool immediat, const std::set<Sint32> * except)
|
|||||||
|
|
||||||
if (Mix_Playing (i + 1) == SDL_TRUE)
|
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);
|
Mix_HaltChannel (i + 1);
|
||||||
//else
|
else
|
||||||
// Mix_FadeOutChannel (i + 1, 500);
|
Mix_FadeOutChannel (i + 1, 500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user