Граф коммитов

17 Коммитов

Автор SHA1 Сообщение Дата
Paul Adenot 3ecb953931 Bug 952860 - Leaky integrate sawtooth and square waves in the OscillatorNode to prevent bad DC offset when changing frequency. r=karlt
--HG--
extra : rebase_source : f526506e80a4d7db553fe54cc115d8bf1c7be9d2
2014-01-10 12:40:05 +01:00
Karl Tomlinson 63a42b0bd9 b=923106 recompute frequency dependent parameters when OscillatorType changes r=padenot
mSquare, mTriangle, and mSaw are not initialized in the OscillatorNodeEngine
constructor, just like they are not initialized when switching to
OscillatorType::Sine.  These parameters are initialized if and when switching
to the OscillatorTypes that use them.

mFinalFrequency, mNumberOfHarmonics, mSignalPeriod, mAmplitudeAtZero,
mPhaseIncrement, mPhaseWrap are not initialized in the OscillatorNodeEngine
constructor, just like they are not initialized immediately on switching
OscillatorType.  These parameters are initialized in
UpdateParametersIfNeeded(), conditional on mRecomputeParameters.

--HG--
extra : transplant_source : a%C1%83%03%03%5CJ%88%99j%A0%93%05%92%06%CA%D6%8B%00%21
2013-10-15 13:10:02 +13:00
Karl Tomlinson 4775d608a9 b=918221 don't remove OscillatorNode playing ref on stop() but wait until finished r=ehsan
--HG--
extra : transplant_source : %A6%90%DB%00%FD5.%40%ED%F6l%17%E69E%D6%40%B5%EA%2A
2013-09-24 13:48:56 +12:00
Karl Tomlinson 1eaf698496 b=918213 dispatch onended from OscillatorNode even when stop time is before start r=ehsan
This makes OscillatorNode consistent with AudioBufferSourceNode

--HG--
extra : transplant_source : %AE8%3B%B4%E5M%60%03%CBN.%21%BD%FF%60%A6%F2a%BDi
2013-09-24 13:48:35 +12:00
Karl Tomlinson 7185723413 b=918212 make OscillatorNode a MainThreadListener for its stream so that ended is dispatched r=ehsan
--HG--
extra : transplant_source : %9D%B8%82%B3%B1%99%C6%CE%1C%E1%DDs%D1%40%EA%E3%DD%D2%01%A4
2013-09-24 13:47:30 +12:00
Karl Tomlinson 7127e8b159 b=914033 use AudioContext::RegisterActiveNode() in OscillatorNode r=ehsan
Storing references on the AudioContext instead of on the AudioNodes will allow
the AudioContext to report them to the cycle collector until offline rendering
starts.

--HG--
extra : transplant_source : %81%83Hp%F6T%E7%9EA%B3%D0%5Dz%EA%1FYv%A2%23%ED
2013-09-24 13:45:41 +12:00
Ralph Giles a4447ac147 Bug 865256 - Part 4: Implement custom waveforms. r=ehsan,padenot
Copy the periodicWave data into a shareable buffer.

Add a SetBuffer call to send the buffer data to the
OscillatorNodeEngine. Call into blink's PeriodicWave
implementation to generate bandlimited tables bracketing
the desired frequency and interpolate the output data
from them.

Change the PeriodicWave constructor to only take one
length, since both arrays must be the same size.

Change OscillatorNode's SetType to throw INVALID_STATE
instead of NOT_IMPLEMENTED if js tries to assign
type = 'custom' directly.
2013-08-28 15:39:26 -07:00
Paul Adenot cafa3e5a01 Bug 908669 - Use band-limited impulse trains (BLIT) for OscillatorNode. r=rillian
This fixes the aliasing noise in the default oscillator types.
2013-09-17 10:36:00 -07:00
Ed Morley b2570c363a Backed out changeset 9524b1df278e (bug 908669) 2013-09-17 17:14:58 +01:00
Ed Morley 94fdad4a1d Backed out changeset 7d17f2d129e3 (bug 881959) 2013-09-17 17:14:26 +01:00
Paul Adenot 8f2783b9fe Bug 881959 - Fix inbound bustage on XP again, on a CLOSED TREE. 2013-09-17 17:25:33 +02:00
Paul Adenot 30e18ab3e5 Bug 908669 - Use band-limited impulse trains (BLIT) for OscillatorNode. r=rillian
--HG--
extra : rebase_source : c786c507b48a1fcdd49e7c14482d621a463f6c9c
2013-09-16 16:48:33 +02:00
Paul Adenot 9ca2495515 Bug 908144 - Don't output sound before start() is called when using OscilatorNode. r=ehsan 2013-08-26 11:46:33 +02:00
Ralph Giles 26f29172b9 Bug 865253 - Part 5: Shorten a comment to fit in 80 columns. r=ehsan 2013-08-19 11:58:00 -07:00
Ralph Giles f429e8e85f Bug 865253 - Part 4: Stop OscillatorNodes on context shutdown. r=ehsan
Like AudioBufferSourceNode and ScriptProcessorNode, OscillatorNode
holds a self-reference in mPlaying. Keep track of all osc nodes
in the AudioContext and explicitly stop them to make sure this
reference is dropped.
2013-08-19 11:57:00 -07:00
Ralph Giles 076262a557 Bug 865253 - Part 3: Direct generation of fixed oscillator types. r=ehsan
Simple direct calculation of the fixed types.

We probably want to use the PeriodicWave machinery to generate
the pre-defined waveforms once it's available. In either case
we can optimize this significantly by caching the generated
waveform when the frequency is stationary over the block.
2013-08-19 11:56:00 -07:00
Ehsan Akhgari 3eb725fd41 Bug 865253 - Part 1: Implement the DOM bindings for OscillatorNode; r=roc 2013-08-19 11:53:00 -07:00