How to use SimpleaudioEngine pitch, pan, gain parameter in cocos2d-x

I am converting my iPhone game to Android using cocos2d-x.

I am coding with a C ++ cocos2d-x engine. and sound control is very important for my game, because it is a billiard game. I was able to control the sound playback (pitch, pan, gain) using the playEffect function (@ "xxx.wav", pan, pitch, gain) from cocos2d SimpleAudioEngine.

but the problem is that in cocos2d-x there is no such option. There is only playEffect (char str *) and no other option. therefore I cannot control audio (e.g. step, pan, gain). I reviewed this issue on the cocos2d-x forum. this is a question, and it is "unplanned" so far.

This is a very serious problem .. everything went well, except for this .. I can’t miss this problem, because sound control is the most important thing for my game.

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

Thanks.

+6
source share
1 answer

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

+4
source

Source: https://habr.com/ru/post/912717/


All Articles