Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use SimpleaudioEngine's pitch, pan, gain option in cocos2d-x

I'm converting my iPhone game to Android with using cocos2d-x.

I'm coding with C++ cocos2d-x engine. and controlling audio is very important to my game because it's billiards game. I was able to control audio play(pitch, pan, gain) with using playEffect(@"xxx.wav", pan, pitch, gain) function from cocos2d's SimpleAudioEngine.

but problem is there is no option like that in cocos2d-x. There is just playEffect(char str*) and no other option. so I can't control audio(like a pitch, pan, gain). I looked that issue on cocos2d-x forum. it has been issue and it's "unplanned" so far.

This is very serious problem.. everything was going well except this.. I can't skip this problem because controlling sound is most important thing to my game.

How can I solve this problem? is there other way to use audio(it should be able to be controlled) engine with cocos2d-x(with C++)?

Thanks.

like image 881
Bright Lee Avatar asked Apr 09 '12 03:04

Bright Lee


1 Answers

I also had this problem. Fortunately there is a solution: http://www.cocos2d-x.org/boards/6/topics/5572?r=10217 I hope it helps :)

like image 156
Igrek Avatar answered Nov 04 '22 09:11

Igrek