diff --git a/src/sound.cpp b/src/sound.cpp index fd3428341078..8e85bbccda77 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -501,8 +501,14 @@ static void play_new_music() std::map::const_iterator itor = music_cache.find(filename); if(itor == music_cache.end()) { LOG_AUDIO << "attempting to insert track '" << filename << "' into cache\n"; + +#ifndef PANDORA SDL_RWops *rwops = filesystem::load_RWops(filename); Mix_Music* const music = Mix_LoadMUSType_RW(rwops, MUS_NONE, true); // SDL takes ownership of rwops +#else + Mix_Music* const music = Mix_LoadMUS(filename.c_str()); +#endif + if(music == NULL) { ERR_AUDIO << "Could not load music file '" << filename << "': " << Mix_GetError() << "\n"; @@ -724,8 +730,12 @@ static Mix_Chunk* load_chunk(const std::string& file, channel_group group) std::string const &filename = filesystem::get_binary_file_location("sounds", file); if (!filename.empty()) { +#ifndef PANDORA SDL_RWops *rwops = filesystem::load_RWops(filename); temp_chunk.set_data(Mix_LoadWAV_RW(rwops, true)); // SDL takes ownership of rwops +#else + temp_chunk.set_data(Mix_LoadWAV(filename.c_str())); +#endif } else { ERR_AUDIO << "Could not load sound file '" << file << "'." << std::endl; throw chunk_load_exception();