The subsample alignment of resampled buffers provides seamless playback even
when buffer durations are not an integer number of track ticks.
--HG--
extra : rebase_source : 0fcd52e8a9560de881aa73931cf22a02f984d748
Some code was depending on this for correct operation, but then failed in
non-debug builds.
Instead, distort only mDuration to check that ProduceAudioBlock sets chunks.
--HG--
extra : transplant_source : %05%F7%F3C%09%2B%1D%13%1D%2B%0CsuA%9Dr%84%17%FC%8B
Without this the last before-finished audio block gets picked up by downstream
ObtainInputBlock calls.
--HG--
extra : rebase_source : d7f804cea59454bdb0aa5931d19bcc123e0d16cb
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.