Cannot hear sound testing on simulator from cocos2d-x test project.


#1

Anyone experience this ?
I searched through the Internet and seems like playing sound is still an issue on PlayBook.

FYI: Some one suggests to take a look at “Play Wav” example source code bundled with the QNX Momentics IDE, and I took at look at that and test it. It doesn’t play any sound as well. Please note I don’t have a real device, all in simulator.


#2

My sounds are not playing on the emulator. I’m using the wav file format.
I’ve tried to run the Cocos2x test, and that ringing sounds play on the simulator (2.0),
but music isn’t playing. Maybe mp3 isn’t supported? I don’t have a real device to test on.


#3

At first I heard that .wav is not supported in Playbook, but turn out that .wav is used to be an example in “Play Wav” !
I really have no idea what’s the situation right now for playing sound in Playbook.


#4

The PlayWav works for me in the simulator, or at least it did in ndk b3 but I had to turn the speakers ALL the way up and I could barely hear it playing putting my ear up to the speaker. I haven’t tried it yet in the ndk gold version. I’ll set it up and give it a try.


#5

cocos2d-x blackberry now supports only wav and ogg format. I have tested CocosDenshion test on my playbook device. It did have sound.


#6

I’ve used the previous Cocos2dx code to add support for mp3 playback using mmr
and also made some changes for the paths generation, as it didn’t work for me as is.

If anyone interested, I’ve attached the modified file, it supports .wav and .mp3 but not .ogg.


#7

Thanks guys for your response, for now I don’t have time to test it again on playbook simulator, anyway I will get back to this as soon as possible.
And thanks for your modified SimpleAudioEngine.cpp as well, will test on it.

I have checked that cocos2d-x has released a new version which support v.2.0 as well. Better look to that as well. Thanks !


#8

Hey guys, I tested with cocos2d-x v.12 and it plays sound !
I have to turn on the volume of simulator to full as per Andrew’s suggestion. Anyway, I am not flexible enough to go back and test with v.11.

To be able to play sound on Playbook, I have to change code a bit when referring to sound files.

Instead of

@ CocosDenshion::SimpleAudioEngine::sharedEngine()->playEffect(“tap.wav”);@

I have to change to this,

CocosDenshion::SimpleAudioEngine::sharedEngine()->playEffect(CCFileUtils::fullPathFromRelativePath("tap.wav"));

and the last one is the trick that James Chen used for bbsdk 2.0, I have to manually create an empty “empty” folder within a project via qnx IDE.
Then everything will work just fine.

Thanks for all your help again !