Closed
Bug 1118372
Opened 9 years ago
Closed 9 years ago
[Web Audio API] WaveShaper input signal is forced normalization to range -1 - +1
Categories
(Core :: Web Audio, defect, P1)
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: gaito, Assigned: yanisellami)
References
Details
Attachments
(2 files)
1.06 KB,
patch
|
Details | Diff | Splinter Review | |
2.16 KB,
patch
|
padenot
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0 Build ID: 20150106030201 Steps to reproduce: WaveShaper input signal amplitude is forced normalization to range -1 to +1. --- <script> var actx=new AudioContext(); var osc=actx.createOscillator(); var gain=actx.createGain(); var shaper=actx.createWaveShaper(); gain.gain.value=0.1; shaper.curve=new Float32Array([-0.5,-0.5,1,1]); osc.connect(gain); gain.connect(shaper); shaper.connect(actx.destination); osc.start(0); function test(g){ gain.gain.value=g; } </script> <button onclick="test(0)">test(0)</button> <button onclick="test(0.1)">test(0.1)</button> <button onclick="test(1)">test(1)</button> <button onclick="test(10)">test(10)</button> --- 1) access to http://www.g200kg.com/demo/test/test-shaperinput.html 2) press test buttons Actual results: test(0.1)/test(1)/test(10) makes no differences in volume and distortion Expected results: test(0.1) : sound should not be distorted test(1) : generates some distortion test(10) : should makes more distortion
Updated•9 years ago
|
Priority: -- → P1
Assignee | ||
Comment 1•9 years ago
|
||
Hi, I would like to work on this bug
Updated•9 years ago
|
Assignee: nobody → yanisellami
Assignee | ||
Comment 2•9 years ago
|
||
This should do the trick, I added the rescale in the Node.
Attachment #8616602 -
Flags: review?(padenot)
Comment 3•9 years ago
|
||
Comment on attachment 8616602 [details] [diff] [review] 118372.diff Review of attachment 8616602 [details] [diff] [review]: ----------------------------------------------------------------- Looks good, but we need a test for this ! This can be easily test by having a GainNode with the gain property set to zero, connected to a WaveShaper (that used to ignore the gain), and checking we have a non-silent output.
Attachment #8616602 -
Flags: review?(padenot)
Assignee | ||
Comment 4•9 years ago
|
||
This test should do what we want. If the gain has been applied correctly, the output volume will not exceed 0.5.
Attachment #8620706 -
Flags: review?(padenot)
Comment 5•9 years ago
|
||
Comment on attachment 8620706 [details] [diff] [review] test case for the bug Review of attachment 8620706 [details] [diff] [review]: ----------------------------------------------------------------- Cool, thanks !
Attachment #8620706 -
Flags: review?(padenot) → review+
Comment 6•9 years ago
|
||
Comment on attachment 8620706 [details] [diff] [review] test case for the bug Review of attachment 8620706 [details] [diff] [review]: ----------------------------------------------------------------- Cool, thanks !
https://hg.mozilla.org/mozilla-central/rev/6ce98e37b52e https://hg.mozilla.org/mozilla-central/rev/4a267ce23dff
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
status-firefox41:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•