This removes the dependence on AllInputsFinished() which didn't return true
for many input types.
The DelayProcessor is no longer continuously reset (bug 921457) and the
reference is now correctly added again when all inputs are finished and then
new inputs are connected.
--HG--
extra : rebase_source : b85c62305a6fcfce57bd40a11edaeaaf2a63c188
The assertion here is really not correct, since as this testcase shows,
it's now easy for web content to control the value of outputChannelCount.
--HG--
extra : rebase_source : a6282517673b7c9e73c2114ee0b944fc1022e4ae
The ObtainInputBlock API is also changed to create an input block for one input
block at a time. An array of these input blocks is then sent to
ProduceAudioBlock for processing, which generates an array of AudioChunks as
output.
Backwards compatibilty with existing engines is achieved by keeping the
existing ProduceAudioBlock API for use with engines with only a maximum of one
input and output port.
These MediaStreams are used as a way to down-mix the input AudioChunks, and
also as a way to get proper stream processing ordering. The MediaStream for
the source AudioNode is an input to these streams, and these streams in turn
are inputs to the MediaStream that the AudioNode that owns the AudioParam owns.
This way, the Media Streams Graph processing code will order the streams so
that by the time that the MediaStream for a given node is processed, all of the
MediaStreams belonging to the AudioNode(s) feeding into the AudioParam have
been processed.
This has a tricky side-effect that those streams also being considered when
determining the input block for the AudioNodeStream belonging to the
AudioParam's owner AudioNode. In order to fix that, we simply special case
those streams and make AudioNodeStream::ObtainInputBlock ignore them.
This change is made in order to increase compatibility of the implementation
with what WebKit does. This helps us in order to be able to compare our
results more closely to WebKit's.
Without this patch, if we have an AudioBufferSourceNode which is finished, the
nodes following it will not see its mLastChunk. This breaks the Web Audio
block processing logic since we rely on the assumption that the buffer for the
last output of AudioBufferSourceNode is correctly passed to the following
engines.
Here is what this patch does:
* Got rid of the JSBindingFinalized stuff
* Made all nodes wrappercached
* Started to hold a self reference while the AudioBufferSourceNode is playing back
* Converted the input references to weak references
* Got rid of all of the SetProduceOwnOutput and UpdateOutputEnded logic
The nodes are now collected by the cycle collector which calls into
DisconnectFromGraph which drops the references to other nodes and destroys the
media stream. Note that most of the cycles that are now inherent in the
ownership model are between nodes and their AudioParams (that is, the cycles
not created by content.)
Modifies MediaStreamGraph to always advance its time by a multiple of
WEBAUDIO_BLOCK_SIZE.
--HG--
extra : rebase_source : 99524b09edd4ac0e1bc6607f2ba14925bc2f11c2