StupidBeauty
Read times:646Posted at:Mon May 13 20:06:49 2013
- no title specified

转载cocos2d-x音乐音效的播放

使用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");

经济适用墓

Your opinions
Your name:Email:Website url:Opinion content:
- no title specified

HxLauncher: Launch Android applications by voice commands

 
Recent comments
2017年4月~2019年4月垃圾短信排行榜Posted at:Thu Sep 26 04:51:48 2024
Qt5.7文档翻译:QWebEngineCookieStore类,QWebEngineCookieStore ClassPosted at:Fri Aug 11 06:50:35 2023盲盒kill -9 18289 Grebe.20230517.211749.552.mp4