Error when port for blackberry - AL_INVALID_NAME in resumeBackgroundMusic

Error when port for blackberry - AL_INVALID_NAME in resumeBackgroundMusic
0.0 0


I am trying to port my Cocos2dX(cocos2d-2.0-x-2.0.4) game for Blackberry 10 devices using QNX Momentics IDE.
Build-ed successfully, but when starting to run on Simulator, I am getting following error:
AL_INVALID_NAME in resumeBackgroundMusic

I am using following method to play background music:
CocosDenshion::SimpleAudioEngine::sharedEngine()->playBackgroundMusic(“sound/BGMusic.mp3”, true);

File sound/BGMusic.mp3 is located in the ‘Resource’ folder.

Any idea please?


Hi Real Zapster, I do have an idea for you.

I also found I could not run the generated projects on BlackBerry 10, they would fail with a similar error.

Layer, I noticed the generated source code said to change the line for music from .mp3 to .ogg for BB10.

I haven’t tried it yet but it sounds like that would fix the issue. I am guessing the BB10 variant doesn’t support mp3 at the current time?

Please let us know if this fixes your issue or not. Good luck.


Yep I agree with Marc - I had to use .ogg instead of .mp3 when I deployed on BlackBerry 10 a few months ago. I don’t know if anything has changed since then, but that is a good place to start.



why I can not use ogg too,I am working on cocos2x-2.1 version! Just support wav format sound file!