Cocos2d-x学习笔记2:播放声音

#include "SimpleAudioEngine.h"
void playMp3() {
    //播放背景音乐等时间比较长的音乐
//    CocosDenshion::SimpleAudioEngine::getInstance()->playBackgroundMusic("xx.mp3", true);
    //播放打斗、技能释放声音
    CocosDenshion::SimpleAudioEngine::getInstance()->playEffect("xx.wav");
}

你可能感兴趣的:(Cocos2d-x学习笔记2:播放声音)