Skip to content
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

Positional audio #7090

Open
LeXXik opened this issue Nov 4, 2024 · 4 comments
Open

Positional audio #7090

LeXXik opened this issue Nov 4, 2024 · 4 comments

Comments

@LeXXik
Copy link
Contributor

LeXXik commented Nov 4, 2024

The positional sound example has no positional audio. The audio should be played in left and right ears, corresponding to robot position compared to camera. At the moment the audio is normal, without 3D effect.

https://playcanvas.vercel.app/#/sound/positional

@mvaligursky
Copy link
Contributor

agreed. Tested against example from main_v1 and the situation is the same there, which means broken for months now.

@LeXXik
Copy link
Contributor Author

LeXXik commented Nov 5, 2024

This might not be an engine issue.

Checking the article here: https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API/Web_audio_spatialization_basics

There are some examples given (using Three in one):
https://mdn.github.io/webaudio-examples/spatialization/
https://mdn.github.io/webaudio-examples/stereo-panner-node/

They don't seem to work either for me. Web Audio issue?

@LeXXik
Copy link
Contributor Author

LeXXik commented Nov 5, 2024

Linking WebAudio/web-audio-api#2609

@liamdon
Copy link
Contributor

liamdon commented Nov 5, 2024

Using Chrome on macOS, on the MDN boombox example:

  • I have correct stereo panning if I only move the boombox left and right. It seems like it's in a 2D mode.
  • If I change the height (up and down), there is a noticeable switch into "spatial" mode. The sound is quieter but more obviously spatialized. Stereo panning continues to work, but now it sounds more natural/realistic.
  • If I change the depth (in and out) or rotation, there is another switch. Now stereo is broken. If I bring the depth back to the default and move left and right, there is no stereo panning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants