WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
UNCONFIRMED
74502
Request for relative sound sources
https://bugs.webkit.org/show_bug.cgi?id=74502
Summary
Request for relative sound sources
davidgaleano
Reported
2011-12-14 05:34:42 PST
We have been using Web Audio for a 3D FPS game and I miss the support that the OpenAL API has for relative and absolute sound sources:
http://connect.creativelabs.com/openal/Documentation/OpenAL%201.1%20Specification.htm#_Toc199835882
(Long file, it may take a while to load and jump to the relevant section) AFAIK, on Web Audio the AudioPannerNode interface only supports setting a global 3D location which means that we have to keep repositioning our relative sources by hand every frame. We use relative sound sources for sounds that are attached to the player, for example the sound of reloading a magazine into a gun, those sounds do have a 3D location but it should be relative to the listener, if the player is running I do not want to leave the sound of the magazine clicking into place behind me, which means we have to keep updating the position value for the AudioPannerNode. I think we just need a Boolean property on AudioPannerNode, initialized to false by default, that can be used to specify which sources are relative and which are absolute. Btw, I think the Web Audio specification for AudioPannerNode may need an update about positioning, but I could be wrong: * It mentions a "listener" attribute that I do not find defined on the interface, nor in the runtime objects. * The method "setPosition" is described as "Sets the position of the audio source relative to the listener attribute" but it seems to me that the position is expected to be in absolute coordinates, not relative.
https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#attributes-AudioPannerNode
Attachments
Add attachment
proposed patch, testcase, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug