preloadEffect("Soun" /> preloadEffect("Soun" /> preloadEffect("Soun"/>

Convert SimpleAudioEngine to AudioEngine Cocos2dx-v4

388 Views Asked by At
CocosDenshion::SimpleAudioEngine::getInstance()->preloadEffect("Sounds/Hit.mp3");
CocosDenshion::SimpleAudioEngine::getInstance()->preloadEffect("Sounds/Point.mp3");
CocosDenshion::SimpleAudioEngine::getInstance()->preloadEffect("Sounds/Wing.mp3");

I make the gameclone with cocos2dx version 4.0 but I check in document of cocos2dx-v4, I see in Doc we can use SimpleAudioEngine and i try this code when I Debug the code say "SimpleAudioEngine unidentified ", How can i change to AudioEngine, Thanks for answer and reading.

1

There are 1 best solutions below

0
ZongHuang Huang On

You can try:

cocos2d::AudioEngine::preload("Sounds/Hit.mp3");