26#include "platform/CCPlatformConfig.h"
28#include "ui/CocosGUI.h"
31using namespace cocos2d::ui;
33AudioEngineTests::AudioEngineTests()
61 class TextButton :
public cocos2d::Label
65 static TextButton *create(
const std::string& text,
const std::function<
void(TextButton*)> &onTriggered)
67 auto ret =
new (std::nothrow) TextButton();
69 TTFConfig ttfconfig(
"fonts/arial.ttf",25);
70 if (ret && ret->setTTFConfig(ttfconfig)) {
72 ret->_onTriggered = onTriggered;
83 void setEnabled(
bool enabled)
87 this->setColor(Color3B::WHITE);
90 this->setColor(Color3B::GRAY);
96 : _onTriggered(nullptr)
99 auto listener = EventListenerTouchOneByOne::create();
100 listener->setSwallowTouches(
true);
102 listener->onTouchBegan = CC_CALLBACK_2(TextButton::onTouchBegan,
this);
103 listener->onTouchEnded = CC_CALLBACK_2(TextButton::onTouchEnded,
this);
104 listener->onTouchCancelled = CC_CALLBACK_2(TextButton::onTouchCancelled,
this);
106 _eventDispatcher->addEventListenerWithSceneGraphPriority(listener,
this);
110 bool touchHits(Touch *touch)
112 auto hitPos = this->convertToNodeSpace(touch->getLocation());
113 if (hitPos.x >= 0 && hitPos.y >= 0 && hitPos.x <= _contentSize.width && hitPos.y <= _contentSize.height) {
119 bool onTouchBegan(Touch *touch, Event *event)
121 auto hits = touchHits(touch);
123 scaleButtonTo(0.95f);
128 void onTouchEnded(Touch *touch, Event *event)
131 auto hits = touchHits(touch);
132 if (hits && _onTriggered){
140 void onTouchCancelled(Touch *touch, Event *event)
145 void scaleButtonTo(
float scale)
147 auto action = ScaleTo::create(0.05f, scale);
148 action->setTag(10000);
149 stopActionByTag(10000);
153 std::function<void(TextButton*)> _onTriggered;
158 class SliderEx :
public Slider
161 static SliderEx* create(){
162 auto ret =
new (std::nothrow) SliderEx();
163 if (ret && ret->init())
165 ret->loadBarTexture(
"cocosui/sliderTrack.png");
166 ret->loadSlidBallTextures(
"cocosui/sliderThumb.png",
"cocosui/sliderThumb.png",
"");
167 ret->loadProgressBarTexture(
"cocosui/sliderProgress.png");
168 ret->setTouchEnabled(
true);
178 void setRatio(
float ratio) {
179 ratio = clampf(ratio, 0.0f, 1.0f);
182 setPercent(100 * _ratio);
186 _ratio = 1.0f * _percent / _maxPercent;
196: _isDestroyed(std::make_shared<bool>(false))
203 AudioEngine::uncacheAll();
209 return "New Audio Engine Test";
221 auto ret = AudioEngineTestDemo::init();
222 _audioID = AudioEngine::INVALID_AUDIO_ID;
230 std::string fontFilePath =
"fonts/arial.ttf";
232 auto& layerSize = this->getContentSize();
234 _playOverLabel = Label::createWithSystemFont(
"Play Over",
"", 30);
239 auto playItem = TextButton::create(
"play", [&](TextButton* button){
240 if (
_audioID == AudioEngine::INVALID_AUDIO_ID) {
243 if(
_audioID != AudioEngine::INVALID_AUDIO_ID) {
246 button->setEnabled(
false);
247 AudioEngine::setFinishCallback(
_audioID, [&](
int id,
const std::string& filePath){
252 scheduleOnce([&](
float dt){
254 }, 2.0f,
"hide_play_over_label");
257 _audioID = AudioEngine::INVALID_AUDIO_ID;
258 ((TextButton*)
_playItem)->setEnabled(
true);
267 playItem->setPosition(layerSize.width * 0.3f,layerSize.height * 0.8f);
270 auto stopItem = TextButton::create(
"stop", [&](TextButton* button){
271 if (
_audioID != AudioEngine::INVALID_AUDIO_ID ) {
275 _audioID = AudioEngine::INVALID_AUDIO_ID;
276 ((TextButton*)
_playItem)->setEnabled(
true);
279 stopItem->setPosition(layerSize.width * 0.7f,layerSize.height * 0.8f);
282 auto pauseItem = TextButton::create(
"pause", [&](TextButton* button){
283 if (
_audioID != AudioEngine::INVALID_AUDIO_ID ) {
287 pauseItem->setPosition(layerSize.width * 0.3f,layerSize.height * 0.7f);
290 auto resumeItem = TextButton::create(
"resume", [&](TextButton* button){
291 if (
_audioID != AudioEngine::INVALID_AUDIO_ID ) {
295 resumeItem->setPosition(layerSize.width * 0.7f,layerSize.height * 0.7f);
296 addChild(resumeItem);
298 auto loopItem = TextButton::create(
"enable-loop", [&](TextButton* button){
301 if (
_audioID != AudioEngine::INVALID_AUDIO_ID) {
305 button->setString(
"disable-loop");
308 button->setString(
"enable-loop");
311 loopItem->setPosition(layerSize.width * 0.5f, layerSize.height * 0.5f);
314 auto volumeSlider = SliderEx::create();
315 volumeSlider->setPercent(100);
316 volumeSlider->addEventListener([&](Ref* sender, Slider::EventType event){
317 SliderEx *slider =
dynamic_cast<SliderEx *
>(sender);
319 if (
_audioID != AudioEngine::INVALID_AUDIO_ID ) {
323 volumeSlider->setPosition(Vec2(layerSize.width * 0.5f,layerSize.height * 0.35f));
324 addChild(volumeSlider);
326 auto timeSlider = SliderEx::create();
327 timeSlider->addEventListener([&](Ref* sender, Slider::EventType event){
328 SliderEx *slider =
dynamic_cast<SliderEx *
>(sender);
330 case Slider::EventType::ON_SLIDEBALL_DOWN:
333 case Slider::EventType::ON_SLIDEBALL_UP:
334 if (
_audioID != AudioEngine::INVALID_AUDIO_ID &&
_duration != AudioEngine::TIME_UNKNOWN) {
335 float ratio = (float)slider->getPercent() / 100;
336 ratio = clampf(ratio, 0.0f, 1.0f);
339 case Slider::EventType::ON_SLIDEBALL_CANCEL:
341 case Slider::EventType::ON_PERCENTAGE_CHANGED:
347 timeSlider->setPosition(Vec2(layerSize.width * 0.5f,layerSize.height * 0.25f));
348 addChild(timeSlider);
351 auto& volumeSliderPos = volumeSlider->getPosition();
352 auto& sliderSize = volumeSlider->getContentSize();
353 auto volumeLabel = Label::createWithTTF(
"volume: ", fontFilePath, 20);
354 volumeLabel->setAnchorPoint(Vec2::ANCHOR_MIDDLE_RIGHT);
355 volumeLabel->setPosition(volumeSliderPos.x - sliderSize.width / 2, volumeSliderPos.y);
356 addChild(volumeLabel);
358 auto& timeSliderPos = timeSlider->getPosition();
359 auto timeLabel = Label::createWithTTF(
"time: ", fontFilePath, 20);
360 timeLabel->setAnchorPoint(Vec2::ANCHOR_MIDDLE_RIGHT);
361 timeLabel->setPosition(timeSliderPos.x - sliderSize.width / 2, timeSliderPos.y);
371 if (
_audioID != AudioEngine::INVALID_AUDIO_ID ) {
372 if(
_duration == AudioEngine::TIME_UNKNOWN){
375 if(
_duration != AudioEngine::TIME_UNKNOWN){
376 auto time = AudioEngine::getCurrentTime(
_audioID);
391 return "Audio control test";
396 if (AudioEngineTestDemo::init())
398 auto& layerSize = this->getContentSize();
400 auto stateLabel = Label::createWithTTF(
"status:",
"fonts/arial.ttf", 30);
401 stateLabel->setPosition(layerSize.width / 2, layerSize.height * 0.7f);
402 addChild(stateLabel);
404 auto preloadItem = TextButton::create(
"preload", [&, stateLabel](TextButton* button){
405 stateLabel->setString(
"status:loading...");
407 AudioEngine::preload(
"audio/SoundEffectsFX009/FX082.mp3", [isDestroyed, stateLabel](
bool isSuccess){
410 CCLOG(
"AudioLoadTest scene was destroyed, no need to set the label text.");
416 stateLabel->setString(
"status:load success");
420 stateLabel->setString(
"status:load fail");
424 preloadItem->setPosition(layerSize.width * 0.35f, layerSize.height * 0.5f);
425 addChild(preloadItem);
427 auto uncacheItem = TextButton::create(
"uncache", [&, stateLabel](TextButton* button){
428 stateLabel->setString(
"status:uncache");
429 AudioEngine::uncache(
"audio/SoundEffectsFX009/FX082.mp3");
431 uncacheItem->setPosition(layerSize.width * 0.65f, layerSize.height * 0.5f);
432 addChild(uncacheItem);
442 return "Audio preload/uncache test";
449 auto ret = AudioEngineTestDemo::init();
453 for(
int index = 0; index <
TEST_COUNT; ++index){
454 sprintf(text,
"audio/SoundEffectsFX009/FX0%d.mp3",tmp + index);
459 auto playItem = TextButton::create(
"play-simultaneously", [&](TextButton* button){
462 button->setEnabled(
false);
463 auto startTime = utils::gettime();
464 for(
int index = 0; index <
TEST_COUNT; ++index){
465 audioId = AudioEngine::play2d(
_files[index]);
466 if(audioId != AudioEngine::INVALID_AUDIO_ID){
469 AudioEngine::setFinishCallback(audioId, [&](
int id,
const std::string& filePath){
472 ((TextButton*)
_playItem)->setEnabled(
true);
477 log(
"%s,%d,Fail to play file:%s",__FILE__,__LINE__ ,
_files[index].c_str());
480 log(
"diff time:%lf",utils::gettime() - startTime);
482 playItem->setPositionNormalized(Vec2(0.5f,0.5f));
483 this->addChild(playItem);
495 return "Simultaneously play multiple audio";
501 auto ret = AudioEngineTestDemo::init();
504 _files[0] =
"background.mp3";
505#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC
506 _files[1] =
"background.caf";
508 _files[1] =
"background.ogg";
511 std::string fontFilePath =
"fonts/arial.ttf";
520 for(
int index = 0; index <
FILE_COUNT; ++index){
521 sprintf(text,
"play %s",
_files[index].c_str());
523 auto playItem = TextButton::create(text, [&](TextButton* button){
524 int index = button->getTag();
526 if(
id != AudioEngine::INVALID_AUDIO_ID){
533 AudioEngine::setFinishCallback(
id, [&](
int id,
const std::string& filePath){
542 playItem->setTag(index);
543 playItem->setPositionNormalized(pos);
544 this->addChild(playItem);
549 Vec2 origin = Director::getInstance()->getVisibleOrigin();
550 Size size = Director::getInstance()->getVisibleSize();
552 auto profileInfoLabel = Label::createWithTTF(
"AudioProfile Info:\n max instance:3 \n minimum delay:1.0", fontFilePath, 12);
553 profileInfoLabel->setAnchorPoint(Vec2::ANCHOR_MIDDLE_LEFT);
554 profileInfoLabel->setPosition(Vec2(origin.x, origin.y + size.height * 0.65f));
555 addChild(profileInfoLabel);
558 _showLabel = Label::createWithTTF(
"audio count:0", fontFilePath, 12);
559 _showLabel->setAnchorPoint(Vec2::ANCHOR_MIDDLE_LEFT);
560 _showLabel->setPosition(Vec2(origin.x, origin.y + size.height * 0.5f));
563 auto timeSlider = SliderEx::create();
564 timeSlider->setEnabled(
false);
565 timeSlider->setPositionNormalized(pos);
566 addChild(timeSlider);
589 return "AudioProfileTest";
594 return "See the console.";
600 auto ret = AudioEngineTestDemo::init();
602 auto playItem = TextButton::create(
"play unsupported media type", [&](TextButton* button){
603#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC
604 AudioEngine::play2d(
"background.ogg");
605#elif CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
606 AudioEngine::play2d(
"background.caf");
609 playItem->setPositionNormalized(Vec2(0.5f, 0.6f));
610 this->addChild(playItem);
612 auto playItem2 = TextButton::create(
"play not-existent file", [&](TextButton* button){
613 AudioEngine::play2d(
"not-existent file.mp3");
615 playItem2->setPositionNormalized(Vec2(0.5f, 0.4f));
616 this->addChild(playItem2);
627 return "Test invalid audio file";
632 return "Not crash,please see the console.";
638 auto ret = AudioEngineTestDemo::init();
640 auto playItem = TextButton::create(
"play large audio file", [&](TextButton* button){
641 AudioEngine::play2d(
"audio/LuckyDay.mp3");
643 playItem->setPositionNormalized(Vec2::ANCHOR_MIDDLE);
644 this->addChild(playItem);
655 return "Test large audio file";
660 if (AudioEngineTestDemo::init())
662 auto& layerSize = this->getContentSize();
665 this->schedule([=](
float dt)
667 CCLOG(
"issues 18597 audio crash test");
668 for (
int i = 0; i< 2;++i)
670 auto id = AudioEngine::play2d(
"audio/MUS_BGM_Battle_Round1_v1.caf",
true, 1.0f);
671 this->runAction(Sequence::create(
672 DelayTime::create(8.0f),
673 CallFunc::create([=]()
675 AudioEngine::stop(
id);
680 }, 2.0, 10000, 0.0,
"audio test");
683 auto labelTime = Label::createWithBMFont(
"fonts/bitmapFontTest2.fnt",
"time: ");
684 labelTime->setPosition(layerSize.width * 0.5f, layerSize.height * 0.5f);
685 labelTime->setTag(999);
686 this->addChild(labelTime);
688 this->schedule([=](
float dt){
690 char timeString[20] = {0};
691 sprintf(timeString,
"Time %2.2f",
_time);
692 dynamic_cast<Label *
>(this->getChildByTag(999))->setString(timeString);
693 }, 0.05, 1000000, 0,
"update label quickly");
703 return "Test for issue 18597";
708 return "no crash for more than 10 minutes";
713 if (AudioEngineTestDemo::init())
715 auto& layerSize = this->getContentSize();
717 auto playItem = TextButton::create(
"play", [](TextButton* button){
718 AudioEngine::play2d(
"audio/SoundEffectsFX009/FX082.mp3",
true);
719 AudioEngine::stopAll();
721 auto audioId = AudioEngine::play2d(
"audio/SoundEffectsFX009/FX082.mp3",
true);
723 sprintf(key,
"play another sound %d", audioId);
724 button->scheduleOnce([audioId](
float dt){
725 AudioEngine::stop(audioId);
726 AudioEngine::play2d(
"audio/SoundEffectsFX009/FX083.mp3");
730 playItem->setPosition(layerSize.width * 0.5f, layerSize.height * 0.5f);
741 return "Test for issue 11143";
746 return "2 seconds after first sound play,you should hear another sound.";
750#undef CC_PROFILER_DISPLAY_TIMERS
751#define CC_PROFILER_DISPLAY_TIMERS() Profiler::getInstance()->displayTimers()
752#undef CC_PROFILER_PURGE_ALL
753#define CC_PROFILER_PURGE_ALL() Profiler::getInstance()->releaseAllTimers()
755#undef CC_PROFILER_START
756#define CC_PROFILER_START(__name__) ProfilingBeginTimingBlock(__name__)
757#undef CC_PROFILER_STOP
758#define CC_PROFILER_STOP(__name__) ProfilingEndTimingBlock(__name__)
759#undef CC_PROFILER_RESET
760#define CC_PROFILER_RESET(__name__) ProfilingResetTimingBlock(__name__)
762#undef CC_PROFILER_START_CATEGORY
763#define CC_PROFILER_START_CATEGORY(__cat__, __name__) do{ if(__cat__) ProfilingBeginTimingBlock(__name__); } while(0)
764#undef CC_PROFILER_STOP_CATEGORY
765#define CC_PROFILER_STOP_CATEGORY(__cat__, __name__) do{ if(__cat__) ProfilingEndTimingBlock(__name__); } while(0)
766#undef CC_PROFILER_RESET_CATEGORY
767#define CC_PROFILER_RESET_CATEGORY(__cat__, __name__) do{ if(__cat__) ProfilingResetTimingBlock(__name__); } while(0)
769#undef CC_PROFILER_START_INSTANCE
770#define CC_PROFILER_START_INSTANCE(__id__, __name__) do{ ProfilingBeginTimingBlock( String::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0)
771#undef CC_PROFILER_STOP_INSTANCE
772#define CC_PROFILER_STOP_INSTANCE(__id__, __name__) do{ ProfilingEndTimingBlock( String::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0)
773#undef CC_PROFILER_RESET_INSTANCE
774#define CC_PROFILER_RESET_INSTANCE(__id__, __name__) do{ ProfilingResetTimingBlock( String::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0)
778 if (AudioEngineTestDemo::init())
780 std::vector<std::string> audioFiles = {
781 "audio/SoundEffectsFX009/FX081.mp3",
782 "audio/SoundEffectsFX009/FX082.mp3",
783 "audio/SoundEffectsFX009/FX083.mp3",
784 "audio/SoundEffectsFX009/FX084.mp3",
785 "audio/SoundEffectsFX009/FX085.mp3",
786 "audio/SoundEffectsFX009/FX086.mp3",
787 "audio/SoundEffectsFX009/FX087.mp3",
788 "audio/SoundEffectsFX009/FX088.mp3",
789 "audio/SoundEffectsFX009/FX089.mp3",
790 "audio/SoundEffectsFX009/FX090.mp3"
793 for (
const auto& audioFile : audioFiles)
795 AudioEngine::preload(audioFile);
798 auto& layerSize = this->getContentSize();
800 auto playItem = TextButton::create(
"Start Test", [
this, audioFiles](TextButton* button){
801 button->setEnabled(
false);
802 static_cast<TextButton*
>(getChildByName(
"DisplayButton"))->setEnabled(
true);
805 schedule([audioFiles](
float dt){
806 int index = cocos2d::random(0, (
int)(audioFiles.size()-1));
808 AudioEngine::play2d(audioFiles[index]);
812 playItem->setPosition(layerSize.width * 0.5f, layerSize.height * 2 / 3);
813 playItem->setName(
"PlayButton");
816 auto displayItem = TextButton::create(
"Display Result", [
this, playItem](TextButton* button){
818 AudioEngine::stopAll();
820 playItem->setEnabled(
true);
821 button->setEnabled(
false);
823 displayItem->setEnabled(
false);
824 displayItem->setPosition(layerSize.width * 0.5f, layerSize.height / 3);
825 displayItem->setName(
"DisplayButton");
826 addChild(displayItem);
836 return "Test Performance of AudioEngine::play2d, audio is played 1 time per second";
841 return "Please see console for the result";
848 if (AudioEngineTestDemo::init())
850 schedule([](
float dt){
852 AudioEngine::uncacheAll();
853 AudioEngine::preload(
"audio/SoundEffectsFX009/FX081.mp3");
854 AudioEngine::play2d(
"audio/SoundEffectsFX009/FX082.mp3");
855 AudioEngine::play2d(
"audio/LuckyDay.mp3");
857 }, 0.01f,
"AudioSwitchStateTest");
867 return "play, preload, stop switch test";
872 return "Should not crash. No sound is ok";
879 if (AudioEngineTestDemo::init())
881 AudioEngine::play2d(
"audio/SmallFile.mp3");
890 return "Playing small mp3 file";
895 return "Should not crash";
903 schedule([](
float dt){
904 AudioEngine::play2d(
"audio/SmallFile2.mp3");
905 }, 0.08f,
"smallfile2");
910 return "Play small mp3 file 2";
915 return "Should not crash and should not have rasp!";
923 schedule([](
float dt){
924 AudioEngine::play2d(
"audio/SmallFile3.mp3");
925 }, 0.5f,
"smallfile3");
930 return "Play small mp3 file 3";
935 return "Should not crash!";
943 int audioId = AudioEngine::play2d(
"audio/SoundEffectsFX009/FX082.mp3");
944 AudioEngine::pause(audioId);
945 AudioEngine::resume(audioId);
947 for (
int i = 0; i < 10; ++i)
949 AudioEngine::pause(audioId);
950 AudioEngine::resume(audioId);
956 return "pause & resume right after play2d";
961 return "Should not crash";
969 AudioEngine::play2d(
"audio/EntireFramesTest.mp3");
974 return "Issue 16938 Test";
979 return "Should heard the entire audio frames";
987 for (
int i = 0; i < 10; ++i)
989 AudioEngine::preload(
"audio/SoundEffectsFX009/FX082.mp3", [i](
bool isSucceed){
990 log(
"111: %d preload %s", i, isSucceed ?
"succeed" :
"failed");
991 AudioEngine::preload(
"audio/SoundEffectsFX009/FX082.mp3", [i](
bool isSucceed){
992 log(
"222: %d preload %s", i, isSucceed ?
"succeed" :
"failed");
993 AudioEngine::preload(
"audio/SoundEffectsFX009/FX082.mp3", [i](
bool isSucceed){
994 log(
"333: %d preload %s", i, isSucceed ?
"succeed" :
"failed");
1003 return "Preload same file multiple times";
1008 return "Should not crash";
1015 auto fileUtils = FileUtils::getInstance();
1016 std::string writablePath = fileUtils->getWritablePath();
1017 std::string musicFile =
"background.mp3";
1018 std::string saveFilePath = writablePath +
"background_in_writable_dir.mp3";
1021 fileUtils->addSearchPath(writablePath,
true);
1023 if (!fileUtils->isFileExist(saveFilePath))
1025 Data data = fileUtils->getDataFromFile(musicFile);
1026 FILE* fp = fopen(saveFilePath.c_str(),
"wb");
1029 fwrite(data.getBytes(), data.getSize(), 1, fp);
1034 AudioEngine::play2d(saveFilePath);
1046 return "Play audio in writable path";
1051 return "Could play audio";
1059 auto item = MenuItemFont::create(
"Play 3 files one by one", [
this](Ref* sender){
1067 auto menu = Menu::create(item,
nullptr);
1068 menu->setPosition(Vec2::ANCHOR_BOTTOM_LEFT);
1079 return "Click menu item to play 3 audio files";
1084 return "After played over, click again, should also hear 3 audios";
1089 int playID = AudioEngine::play2d(filename,
false, 1);
1090 AudioEngine::setFinishCallback(playID, [
this](
int finishID,
const std::string& file){
1092 log(
"finish music %s",file.c_str());
1094 const std::string& name =
_playList.front();
1113 int id = AudioEngine::play2d(
"background.mp3");
1114 AudioEngine::setFinishCallback(
id, [](
int i,
const std::string& str){
1115 AudioEngine::uncacheAll();
1126 return "UncacheAll in finshed callback";
1131 return "Should not crash";
#define ADD_TEST_CASE(__className__)
#define CC_PROFILER_STOP(__name__)
#define CC_PROFILER_DISPLAY_TIMERS()
#define CC_PROFILER_START(__name__)
virtual void update(float dt) override
virtual bool init() override
virtual std::string title() const override
cocos2d::Label * _playOverLabel
virtual ~AudioControlTest()
virtual std::string title() const override
std::shared_ptr< bool > _isDestroyed
virtual void onBackCallback(cocos2d::Ref *sender) override
virtual void onExit() override
virtual bool init() override
virtual std::string subtitle() const override
virtual std::string title() const override
virtual std::string title() const override
virtual std::string subtitle() const override
virtual void onEnter() override
virtual bool init() override
virtual std::string title() const override
virtual std::string subtitle() const override
virtual std::string title() const override
virtual bool init() override
virtual std::string title() const override
virtual std::string subtitle() const override
virtual void onEnter() override
virtual void onEnter() override
std::vector< std::string > _oldSearchPaths
virtual std::string subtitle() const override
virtual void onExit() override
virtual std::string title() const override
std::list< std::string > _playList
virtual void onExit() override
virtual void onEnter() override
void doPlay(const std::string &filename)
virtual std::string title() const override
virtual std::string subtitle() const override
void playMusic(const std::string &filename)
virtual void onEnter() override
virtual std::string subtitle() const override
virtual std::string title() const override
std::string _files[FILE_COUNT]
cocos2d::AudioProfile _audioProfile
virtual std::string subtitle() const override
cocos2d::Label * _showLabel
virtual void update(float dt) override
virtual std::string title() const override
static const int FILE_COUNT
virtual ~AudioProfileTest()
virtual bool init() override
virtual std::string title() const override
virtual void onEnter() override
virtual std::string subtitle() const override
virtual void onEnter() override
virtual std::string subtitle() const override
virtual std::string title() const override
virtual std::string title() const override
virtual bool init() override
virtual std::string subtitle() const override
virtual std::string subtitle() const override
virtual bool init() override
virtual std::string title() const override
virtual std::string title() const override
virtual std::string subtitle() const override
virtual void onEnter() override
virtual void onExit() override
virtual std::string subtitle() const override
virtual ~InvalidAudioFileTest()
virtual bool init() override
virtual std::string title() const override
virtual std::string title() const override
virtual bool init() override
virtual ~LargeAudioFileTest()
std::string _files[TEST_COUNT]
static const int TEST_COUNT
virtual std::string title() const override
virtual bool init() override
virtual ~PlaySimultaneouslyTest()
virtual void onEnter() override
virtual void onBackCallback(cocos2d::Ref *sender)
static cocos2d::Vec2 center()