mirror of
https://github.com/Kiritow/MiniEngine.git
synced 2024-03-22 13:11:22 +08:00
Update to Mixer 2.0.2. Fix compile error in VS2017
This commit is contained in:
parent
a09c723a98
commit
ca6e30a675
|
@ -1,5 +1,7 @@
|
||||||
#include "SDLWrapper/Texture.h"
|
#include "SDLWrapper/Texture.h"
|
||||||
#include "_caster.h"
|
#include "_caster.h"
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
namespace MiniEngine {
|
namespace MiniEngine {
|
||||||
//private
|
//private
|
||||||
void Texture::_set(SDL_Texture* p)
|
void Texture::_set(SDL_Texture* p)
|
||||||
|
|
|
@ -269,14 +269,17 @@ int getIntFromMixInitFlag(MixInitFlag flag)
|
||||||
return MIX_INIT_FLAC;
|
return MIX_INIT_FLAC;
|
||||||
case MixInitFlag::MOD:
|
case MixInitFlag::MOD:
|
||||||
return MIX_INIT_MOD;
|
return MIX_INIT_MOD;
|
||||||
case MixInitFlag::MODPLUG:
|
|
||||||
return MIX_INIT_MODPLUG;
|
|
||||||
case MixInitFlag::MP3:
|
case MixInitFlag::MP3:
|
||||||
return MIX_INIT_MP3;
|
return MIX_INIT_MP3;
|
||||||
case MixInitFlag::OGG:
|
case MixInitFlag::OGG:
|
||||||
return MIX_INIT_OGG;
|
return MIX_INIT_OGG;
|
||||||
|
#if SDL_MIXER_COMPILEDVERSION < 2002
|
||||||
|
/// Not available in SDL_Mixer 2.0.2
|
||||||
|
case MixInitFlag::MODPLUG:
|
||||||
|
return MIX_INIT_MODPLUG;
|
||||||
case MixInitFlag::FLUIDSYNTH:
|
case MixInitFlag::FLUIDSYNTH:
|
||||||
return MIX_INIT_FLUIDSYNTH;
|
return MIX_INIT_FLUIDSYNTH;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
return 0; /// Return 0 by default. (Fix warning)
|
return 0; /// Return 0 by default. (Fix warning)
|
||||||
}
|
}
|
||||||
|
@ -300,12 +303,15 @@ MusicType getMusicTypeFromMixMusicType(Mix_MusicType type)
|
||||||
return MusicType::OGG;
|
return MusicType::OGG;
|
||||||
case MUS_MP3:
|
case MUS_MP3:
|
||||||
return MusicType::MP3;
|
return MusicType::MP3;
|
||||||
|
#if (SDL_MIXER_COMPILEDVERSION < 2002)
|
||||||
|
/// These two options are not defined in SDL_Mixer 2.0.2
|
||||||
case MUS_MP3_MAD:
|
case MUS_MP3_MAD:
|
||||||
return MusicType::MP3MAD;
|
return MusicType::MP3MAD;
|
||||||
case MUS_FLAC:
|
|
||||||
return MusicType::FLAC;
|
|
||||||
case MUS_MODPLUG:
|
case MUS_MODPLUG:
|
||||||
return MusicType::MODPLUG;
|
return MusicType::MODPLUG;
|
||||||
|
#endif
|
||||||
|
case MUS_FLAC:
|
||||||
|
return MusicType::FLAC;
|
||||||
default:
|
default:
|
||||||
return MusicType::None;
|
return MusicType::None;
|
||||||
}
|
}
|
||||||
|
@ -329,12 +335,15 @@ Mix_MusicType getMixMusicTypeFromMusicType(MusicType type)
|
||||||
return MUS_OGG;
|
return MUS_OGG;
|
||||||
case MusicType::MP3:
|
case MusicType::MP3:
|
||||||
return MUS_MP3;
|
return MUS_MP3;
|
||||||
case MusicType::MP3MAD:
|
|
||||||
return MUS_MP3_MAD;
|
|
||||||
case MusicType::FLAC:
|
case MusicType::FLAC:
|
||||||
return MUS_FLAC;
|
return MUS_FLAC;
|
||||||
|
#if SDL_MIXER_COMPILEDVERSION < 2002
|
||||||
|
/// Not available in SDL_Mixer 2.0.2
|
||||||
|
case MusicType::MP3MAD:
|
||||||
|
return MUS_MP3_MAD;
|
||||||
case MusicType::MODPLUG:
|
case MusicType::MODPLUG:
|
||||||
return MUS_MODPLUG;
|
return MUS_MODPLUG;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
return MUS_NONE;
|
return MUS_NONE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user