cocos2dx2.2怎么添加背景音乐

现在2.2版本貌似没有fullPathFromRelativePathe()这个函数了,怎么办啊。各位大神求解惑。

 

SimpleAudioEngine::sharedEngine()->preloadBackgroundMusic(CCFileUtils::sharedFileUtils()->fullPathFromRelativePathe("background.mp3")); 
SimpleAudioEngine::sharedEngine()->preloadEffect(CCFileUtils::sharedFileUtils()->fullPathFromRelativePathe("background.mp3")); 
     
SimpleAudioEngine::sharedEngine()->playBackgroundMusic(std::string(CCFileUtils::sharedFileUtils()->fullPathFromRelativePathe("background.mp3")).c_str(), true); 








```

以前只写代码,没加过音乐,第一次加。

好了, 关于新版本如何添加的问题已经搞定了。请大家忽视此贴。

怎么解决的 分享下。。。。。。。

在2.2里面更改了函数,看一下testcpp里面的类CocosDenshionTest就知道了,里面有关于背景音乐和音效的所有函数使用方法。
SimpleAudioEngine::sharedEngine()->playBackgroundMusic(MUSIC_FILE, true);//播放背景音乐