DescriptionMake triangle wave in an OscillatorNode match WebAudio spec.
The triangle wave is specified to be an odd function that is 0 at time
0 and has a positive slope at time 0. (The current version was an even
function.)
Also took this opportunity to add comments to the code to make clearer
what the transforms are and also made the formulas match. (Some were
off by a fixed factor, which didn't matter since all the waveforms
were normalized later in createBandLimitedTables()). This makes it
easier to verify against known results on the web.
Layout tests are also updated for the change to the triangle wave, of course. The sawtooth and square wave tests were also updated for the slight formula change. (Differences are 1 lsb for these tests.)
Also rebased the Android tests for the custom and sine tests. Apparently something has changed on Android. The changes are small with differences of 1-2 bits at most.
BUG=316666
R=kbr@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=162139
Patch Set 1 : #Patch Set 2 : #Messages
Total messages: 7 (0 generated)
|