Closed
Bug 1002513
Opened 11 years ago
Closed 9 years ago
WebAudio linear distance model not clamping
Categories
(Core :: Web Audio, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: davidgaleano, Assigned: padenot)
References
Details
Attachments
(3 files)
(deleted),
text/html
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
karlt
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release)
Build ID: 20140410211200
Steps to reproduce:
Create PannerNode.
Set node distanceModel property to "linear".
Set node maxDistance property to 100.
Set node position 200 units away from the listener position.
Connect node to the context destination.
Play a sound buffer connected to the PannerNode.
Actual results:
Sound is played at full volume.
Expected results:
Once the PannerNode distance to the listener is bigger than maxDistance the sound volume should be clamped to zero.
Reporter | ||
Updated•11 years ago
|
OS: Linux → All
Updated•11 years ago
|
QA Whiteboard: [bugday-20140505]
Component: Untriaged → Web Audio
Product: Firefox → Core
Updated•11 years ago
|
Assignee | ||
Comment 1•10 years ago
|
||
I'll propose a change to the spec, this is clearly the right thing to do in any
case.
Attachment #8548955 -
Flags: review?(karlt)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → padenot
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
Comment on attachment 8548955 [details] [diff] [review]
Clamp gain to zero in PannerNode to avoid inverting the phase when the distance is greater than maxDistance. r=
Yes, "after [maxDistance] the volume will not be reduced any further", but coneOuterGain can be negative, even if that doesn't seem so useful.
What would you think about doing this in ComputeDistanceGain() or LinearGainFunction() so that this takes effect for equal power panning also?
Flags: needinfo?(padenot)
Attachment #8548955 -
Flags: review?(karlt)
Hi,
my team and me are currently developing a browsergame and have the same issue with the linear distance model. Can somebody tell me, when this bug will be fixed? Currently, we are going to recommend our users to use Chrome, because the spatial sound effects of the game don't work in Firefox.
Regards
Assignee | ||
Comment 5•9 years ago
|
||
Dunno, I can probably fix what needs to be fixed and land it.
Flags: needinfo?(padenot)
Well, it would be great, if we can achieve an equivalent behavior of the linear distance model in comparison to Chrome. David described the problem perfectly.
When the distance between listener and pannerNode is greater than maxDistance, the volume should be zero.
Assignee | ||
Comment 7•9 years ago
|
||
That's better indeed. Added a test to make sure.
Attachment #8612867 -
Flags: review?(karlt)
Hi Paul,
that's great! How can i test the fix with by demo application (http://yume.human-interactive.org/)? At stage six, there is a sample for spatial audio effects.
Do i need to build a dev-version of Firefox on my local machine or can i use a specific update-channel to get the recent fixes?
Thanks
Assignee | ||
Comment 9•9 years ago
|
||
I've sent this patch to our CI system, and triggered builds for all desktop platform (not being sure what you use), so you don't have to build it yourself.
You'll be able to find binaries here [0] (choose the right directory for your platform, and look for a zip. Unzip it and simply run it, after having closed other firefox process). It takes some time to build, though, they should be available in less than 6 hours from now (sometimes, our build farm is overloaded and it takes some time to schedule a build).
Depending on whether Karl thinks my patch is correct or not, it'll probably land in Firefox Nightly [1] early next week, and then will ride the releases (developer edition, beta, release).
[0]: http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/paul@paul.cx-b6eed1466c8a/
[1]: http://nightly.mozilla.org/
Comment 10•9 years ago
|
||
Hi Paul,
i've tested your build (firefox-41.0a1.en-US.mac.dmg) on my iMac (OSX 10.10.3). In my opinion, the linear distance model works correctly now! My mentioned test case sounds fine, analogous to Chrome!
Thanks for that fix! I'll keep tracking this patch, until it lands in production.
Regards
Updated•9 years ago
|
Attachment #8612867 -
Flags: review?(karlt) → review+
Comment 11•9 years ago
|
||
Comment 12•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox41:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•