Audio in stereo? #1868
Unanswered
rudiHammad
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I was wondering if it was possible to play audio in stereo. I kind of faked it when I did this demo:
https://www.youtube.com/watch?v=_nJy1ytX7CA
If you go around minute 1:00 you'll notice some Asteroid moving fast from right to left in stereo, but this is because I panned the volumen directly in to the mp3 file. I would like to properly do stereo, but I don't see anything in AudioEngine allowing that.
I check cocos SimpleAudioEngine and there was a a method with a pan attribute to make the stereo effect.
[playEffect](https://docs.cocos2d-x.org/api-ref/cplusplus/v3x/de/d8f/class_cocos_denshion_1_1_simple_audio_engine.html#a2424bf06ce2c54261b8f61aae494e0aa) (const char *filePath, bool loop=false, float pitch=1.0f, float pan=0.0f, float gain=1.0f)
Thoughts? thanks.
R
Beta Was this translation helpful? Give feedback.
All reactions