mirror of https://github.com/axmolengine/axmol.git
fix deprecated method
This commit is contained in:
parent
7d0ca21167
commit
6c02e46865
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue