SimpleAudioEngine::sharedEngine()->playEffect("pew-pew-lei.waw") failed

Hi all,

I am new to cocos2d-x-2.03. i followed this tutorial http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Chapter_1*-*How_to_Create_a_New_cocos2d-x_project_on_multi-platforms and test the “Coos2dxSimpleGame”. And i found no music when “SimpleAudioEngine::sharedEngine()->playEffect(”pew-pew-lei.waw“);”.

Here is my code to test in HelloWorld::init():

@
CocosDenshion::SimpleAudioEngine::sharedEngine()->playEffect(“pew-pew-lei.waw”); //failed
//CocosDenshion::SimpleAudioEngine::sharedEngine()->playBackgroundMusic(“pew-pew-lei.wav”); //OK
//CocosDenshion::SimpleAudioEngine::sharedEngine()->playEffect(“background-music-aac.wav”); //OK
//CocosDenshion::SimpleAudioEngine::sharedEngine()->playBackgroundMusic(“background-music-aac.wav”, true); //OK @

Only the first line failed, i have tested in win32 and ios.

Anyone know why?

Thanks in advanced!

Hi Ken,

I think you misspelled the name of the file.

you have written pew-pew-lei.waw and this format is not correct try with pew-pew-lei.wav

OMG…

Thank you very much, Jose

Since the file “pew-pew-lei.waw” not exist, i think the program should throw some errors or warnings, or return a error code. But i don’t find any of them.

Did i miss something, or I need to make sure the audio file exist before i call “SimpleAudioEngine::sharedEngine()->playEffect”?

Any help will be appreciated!