#include "SimpleAudioEngine.h"
using namespace CocosDenshion;
//SimpleAudioEngine::getInstance()->playBackgroundMusic("music/game_music.mp3");
SimpleAudioEngine::getInstance()->playEffect("music/game_over.mp3");
//preloadEffect,stopBackgroundMusic,stopEffect,stopAllEffects,
//virtual void pauseBackgroundMusic(); //暂停背景音乐
//virtual void pauseEffect(unsigned int nSoundId); //暂停指定音效,nSoundId为音效编号
//virtual void pauseAllEffects(); //暂停所以音效
//virtual void resumeBackgroundMusic(); //恢复背景音乐
//virtual void resumeEffect(unsigned int nSoundId); //恢复指定音效,nSoundId为音效编号
//virtual void resumeAllEffects(); //恢复所有音效
//isBackgroundMusicPlaying();
cocos2d-x 音效
最新推荐文章于 2024-04-17 04:56:39 发布