fix deprecated method

This commit is contained in:
Dale Stammen 2015-05-21 13:30:51 -07:00
parent 7d0ca21167
commit 6c02e46865
1 changed files with 4 additions and 4 deletions

View File

@ -83,7 +83,7 @@ void SimpleAudioEngine::playBackgroundMusic(const char* pszFilePath, bool bLoop)
return;
}
string fullPath = CCFileUtils::sharedFileUtils()->fullPathForFilename(pszFilePath);
string fullPath = CCFileUtils::getInstance()->fullPathForFilename(pszFilePath);
sharedAudioController()->PlayBackgroundMusic(fullPath.c_str(), bLoop);
}
@ -124,7 +124,7 @@ bool SimpleAudioEngine::isBackgroundMusicPlaying()
unsigned int SimpleAudioEngine::playEffect(const char* pszFilePath, bool bLoop,float pitch, float pan, float gain)
{
unsigned int sound;
string fullPath = CCFileUtils::sharedFileUtils()->fullPathForFilename(pszFilePath);
string fullPath = CCFileUtils::getInstance()->fullPathForFilename(pszFilePath);
sharedAudioController()->PlaySoundEffect(fullPath.c_str(), bLoop, sound); // TODO: need to support playEffect parameters
return sound;
}
@ -136,7 +136,7 @@ void SimpleAudioEngine::stopEffect(unsigned int nSoundId)
void SimpleAudioEngine::preloadEffect(const char* pszFilePath)
{
string fullPath = CCFileUtils::sharedFileUtils()->fullPathForFilename(pszFilePath);
string fullPath = CCFileUtils::getInstance()->fullPathForFilename(pszFilePath);
sharedAudioController()->PreloadSoundEffect(fullPath.c_str());
}
@ -172,7 +172,7 @@ void SimpleAudioEngine::preloadBackgroundMusic(const char* pszFilePath)
void SimpleAudioEngine::unloadEffect(const char* pszFilePath)
{
string fullPath = CCFileUtils::sharedFileUtils()->fullPathForFilename(pszFilePath);
string fullPath = CCFileUtils::getInstance()->fullPathForFilename(pszFilePath);
sharedAudioController()->UnloadSoundEffect(fullPath.c_str());
}