-
-
Notifications
You must be signed in to change notification settings - Fork 253
Add support for audio panning #2719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
will your also add 3d API: |
never mind, the |
This implementation is only for 2D. Do you want me to try and add 3D panning to this PR? |
Maybe a separated PR is better due to current only have play2d API |
I can take a look at adding |
Improve isExtensionPresent()
|
Using a value of So this: Instead of hard-coding it, how about we introduce a new parameter to the so it would end up as; This way the developer can set it for the specific panning effect they want if the default is not suitable. Also, we should add a method to get the current audio source position, such as:
This would cover both 2D and 3D audio. @halx99 What is your opinion of this? |
|
If ax::Vec3 AudioEngineImpl::getSourcePosition(int audioId) added, shoud we also add setSourcePosition ? |
Yes, I'll add that too. |
Allow adjustment to 2d audio panning distance from source
|
@halx99 I'm not quite sure why the iOS and OSX tests are failing, unless it's something I'm not seeing in the logs. |
here: /Users/runner/work/axmol/axmol/core/audio/AudioPlayer.h:78:5: error: unknown type name 'Vec3' seems you miss include "math/Vec3.h" in |
Thank you. I totally missed that in the logs. |
Describe your changes
Add support for audio panning relative to the listener, from left to right, -60° to +60°.
Issue ticket number and link
Checklist before requesting a review
For each PR
Add Copyright if it missed:
-
"Copyright (c) 2019-present Axmol Engine contributors (see AUTHORS.md)."I have performed a self-review of my code.
Optional:
For core/new feature PR
Axmol 3.x ------------------------------------------------------------
For each 3.x PR