Closed
Bug 1106649
Opened 10 years ago
Closed 10 years ago
Use band-limited wave tables for OscillatorNode
Categories
(Core :: Web Audio, defect)
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: padenot, Assigned: padenot)
References
Details
Attachments
(2 files, 1 obsolete file)
12.93 KB,
patch
|
karlt
:
review+
|
Details | Diff | Splinter Review |
13.97 KB,
patch
|
Details | Diff | Splinter Review |
The BLIT code has some issues:
- DC offset, so we need to DC block, and that has impact on the timbre
- ugly waveforms at low frequencies
Now that we have PeriodicWave implemented, we can just use it for the basic waveforms as well.
Assignee | ||
Comment 1•10 years ago
|
||
I had to fix the triangle in Blink's code because the initial phase was wrong.
Attachment #8530995 -
Flags: review?(karlt)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → padenot
Status: NEW → ASSIGNED
Comment 2•10 years ago
|
||
Comment on attachment 8530995 [details] [diff] [review]
Use band-limited wave tables to implement basic waveforms. r=
> case OscillatorType::Sine:
>- mPhase = 0.0;
> break;
mPhase means something quite different when using mPeriodicWave, so it's
probably better to leave the 0.0 here until some kind conversion is performed.
>+ if (n & 1) {
>+ b = 2 * (2 / (n * piFloat) * 2 / (n * piFloat)) * ((((n - 1) >> 1) & 1) ? -1 : 1);
This can be simplified somewhat.
If (n&1), then ((n-1)>>1) == (n>>1).
((n>>1)&1) is true iff (n&2).
Attachment #8530995 -
Flags: review?(karlt) → review+
Comment 3•10 years ago
|
||
Is mSignalPeriod unused outside of UpdateParametersIfNeeded() now?
Can it be made a local variable or removed?
Assignee | ||
Comment 4•10 years ago
|
||
(In reply to Karl Tomlinson (back Dec 22 :karlt) from comment #3)
> Is mSignalPeriod unused outside of UpdateParametersIfNeeded() now?
> Can it be made a local variable or removed?
Yes.
Assignee | ||
Comment 5•10 years ago
|
||
Uploading last version (the triangle formula is not fixed yet).
Assignee | ||
Comment 6•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Attachment #8535568 -
Attachment is obsolete: true
Assignee | ||
Comment 7•10 years ago
|
||
Assignee | ||
Comment 8•10 years ago
|
||
backed out for opt bustage:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9d72b8315f65
Assignee | ||
Comment 9•10 years ago
|
||
Comment 10•10 years ago
|
||
Something in this push made test_periodicWave.html permafail. Backed out.
https://hg.mozilla.org/integration/mozilla-inbound/rev/72d7ae169b09
https://treeherder.mozilla.org/logviewer.html#?job_id=5080110&repo=mozilla-inbound
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in
before you can comment on or make changes to this bug.
Description
•