使用SimpleAudioEngine::sharedEngine()->playEffect("Sounds\\effect.mp3");来播放音效。
http://blog.sina.com.cn/s/blog_4ab2f5c801014kox.html
亮点:
1.添加头文件
#include "SimpleAudioEngine.h"
using namespace CocosDenshion;
2.播放背景音乐,预先加载音效
SimpleAudioEngine::sharedEngine()->playBackgroundMusic("Sounds\\back.mp3",true);
SimpleAudioEngine::sharedEngine()->preloadEffect("Sounds\\effect.mp3");
3.播放音效
SimpleAudioEngine::sharedEngine()->playEffect("Sounds\\effect.mp3");
经济适用墓
HxLauncher: Launch Android applications by voice commands