diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-09-10 13:17:49 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-09-10 13:17:49 +0300 |
commit | dc17bee84d0499dcf009f6a13faa55daba99ae18 (patch) | |
tree | bd090090395739d85b8b3f2a5433b0107359e020 /src | |
parent | 1fe0b1cf4736dae1278513aff290fec1c24693d9 (diff) | |
download | manaverse-dc17bee84d0499dcf009f6a13faa55daba99ae18.tar.gz manaverse-dc17bee84d0499dcf009f6a13faa55daba99ae18.tar.bz2 manaverse-dc17bee84d0499dcf009f6a13faa55daba99ae18.tar.xz manaverse-dc17bee84d0499dcf009f6a13faa55daba99ae18.zip |
improve SDL_mixer usage.
Diffstat (limited to 'src')
-rw-r--r-- | src/resources/sdlmusic.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resources/sdlmusic.cpp b/src/resources/sdlmusic.cpp index 5f18d30d6..6f1d81731 100644 --- a/src/resources/sdlmusic.cpp +++ b/src/resources/sdlmusic.cpp @@ -40,9 +40,9 @@ SDLMusic::~SDLMusic() Resource *SDLMusic::load(SDL_RWops *const rw) { #ifdef USE_SDL2 - if (Mix_Music *const music = Mix_LoadMUS_RW(rw, 1)) + if (Mix_Music *const music = Mix_LoadMUSType_RW(rw, MUS_OGG, 1)) #else - if (Mix_Music *const music = Mix_LoadMUS_RW(rw)) + if (Mix_Music *const music = Mix_LoadMUSType_RW(rw, MUS_OGG, SDL_TRUE)) #endif { return new SDLMusic(music); @@ -57,7 +57,7 @@ Resource *SDLMusic::load(SDL_RWops *const rw) bool SDLMusic::play(const int loops, const int fadeIn) { if (fadeIn > 0) - return Mix_FadeInMusic(mMusic, loops, fadeIn); + return Mix_FadeInMusicPos(mMusic, loops, fadeIn, 0.0); else - return Mix_PlayMusic(mMusic, loops); + return Mix_FadeInMusicPos(mMusic, loops, 0, 0.0); } |