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

1

6

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.

Flowering answered 9/4, 2012 at 3:8 Comment(0)
D
4

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 :)

Dieball answered 10/4, 2012 at 10:41 Comment(1)
Thanks very very much......... You don't know how big what you have done to me is!! Thanks you saved me, God bless you have a nice day~!!!Flowering

© 2022 - 2024 — McMap. All rights reserved.