Finish the update from SDL_Mixer to SDL2_Mixer

liquid_container
Günther Brammer 2016-02-06 17:28:08 +01:00
parent 408dfff96e
commit 32d8d0db76
2 changed files with 5 additions and 5 deletions

View File

@ -113,11 +113,11 @@ if(Audio_TK STREQUAL "OpenAL")
set(Audio_INCLUDE_DIRS ${Audio_INCLUDE_DIRS} ${Alut_INCLUDE_DIRS})
endif()
elseif(Audio_TK STREQUAL "SDL_Mixer")
__FINDAUDIO_FINDSDLMIXER()
if(SDLMixer_FOUND)
find_package(SDL2Mixer)
if(SDL2Mixer_FOUND)
set(Audio_FOUND TRUE)
set(Audio_LIBRARIES ${SDLMixer_LIBRARIES})
set(Audio_INCLUDE_DIRS ${SDLMixer_INCLUDE_DIRS})
set(Audio_LIBRARIES ${SDL2Mixer_LIBRARIES})
set(Audio_INCLUDE_DIRS ${SDL2Mixer_INCLUDE_DIRS})
endif()
elseif(Audio_TK STREQUAL "none")
set(Audio_FOUND TRUE)

View File

@ -122,7 +122,7 @@ bool C4MusicFileSDL::Play(bool loop, double max_resume_time)
return false;
}
// Mix_FreeMusic frees the RWop
Music = Mix_LoadMUS_RW(SDL_RWFromConstMem(Data, filesize));
Music = Mix_LoadMUS_RW(SDL_RWFromConstMem(Data, filesize), 1);
if (!Music)
{
LogF("SDL_mixer: %s", SDL_GetError());