src/icerunner/sound/resourceloader.cpp
Effect* SoundManager::ResourceLoader::CreateEffect(const std::string& fileName)
{
    Mix_Chunk* pChunk = Mix_LoadWAV(fileName.c_str());
    if (!pChunk)
        printf("Failed to load sound effect %s: %s\n", fileName.c_str(), Mix_GetError());
    Effect* res = new Effect(soundManager_, pChunk);
    return res;
}
// FIXME: hack. If anything fails to load, just return an empty wrapper that
// does notheing when used.
hack. If anything fails to load, just return an empty wrapper that
does notheing when used.
hack . If anything fails to load just return an empty wrapper that does notheing when used .
Effect* SoundManager::ResourceLoader::CreateEffect(const std::string& fileName)
{
    Mix_Chunk* pChunk = Mix_LoadWAV(fileName.c_str());
    if (!pChunk)
        printf("Failed to load sound effect %s: %s\n", fileName.c_str(), Mix_GetError());
    Effect* res = new Effect(soundManager_, pChunk);
    return res;
}
Effect * SoundManager :: ResourceLoader :: CreateEffect ( const std :: string & fileName ) { Mix_Chunk * pChunk = Mix_LoadWAV ( fileName . c_str ( ) ) ; if ( ! pChunk ) printf ( " \n " , fileName . c_str ( ) , Mix_GetError ( ) ) ; Effect * res = new Effect ( soundManager_ , pChunk ) ; return res ; }
FIXME: hack.
FIXME : hack .