Bug 804387. Part 1: Make AllocateInputPort addref the returned port. r=jesup
Bug 804387. Part 1.5: Clean up main-thread MediaStream event listeners. r=jesup
There is no need for these to be independent objects in general and we
don't need to addref/release them. We can just require the caller to
remove them before they die.
We can also save some refcount churn by having
DispatchToMainThreadAfterStreamStateUpdate take already_AddRefed.
Bug 804387. Part 2: Fix misleading parameter name; these are NOT exactly microseconds. r=jesup
Bug 804387. Part 3: When a global underrun happens, don't insert blocked time, just cut that time out of the entire MediaStreamGraph timeline instead. r=jesup
Bug 804387. Part 4: Move MediaStreamGraphImpl to its own header file. r=jesup

--HG--
rename : content/media/MediaStreamGraph.cpp => content/media/MediaStreamGraphImpl.h
Bug 804387. Part 5: Add MediaStream::GraphTimeToStreamTimeOptimistic and MediaStream::StreamTimeToGraphTime. r=jesup
Bug 804387. Part 6: ChangeExplicitBlockerCountImpl takes a GraphTime, not a StreamTime. r=jesup
Bug 804387. Part 7: Use a static_cast instead of dynamic check when processing ProcessedMediaStream message. r=jesup
Bug 804387. Part 7.2: Let BiquadFilterNode use the actual context sample rate. r=ehsan
Bug 804387. Part 7.5: Make Web Audio tests context-rate-independent (disabling some decodeAudioData tests). r=ehsan
Bug 804387. Part 8: Create AudioNodeEngine and AudioNodeStream. r=jesup
Modifies MediaStreamGraph to always advance its time by a multiple of
WEBAUDIO_BLOCK_SIZE.
Bug 804837. Part 9: Update WebAudio implementation to integrate with AudioNodeStream. r=ehsan
This is a mega-patch that was too hard to disentangle. Here's what it does:
-- Create infrastructure around AudioNode::UpdateOutputEnded to detect
when a node can no longer produce any output. When that becomes true,
disconnect it from the AudioNode graph.
-- Have AudioNode implement JSBindingFinalized to use as input in
UpdateOutputEnded.
-- Give every AudioNode a MediaStream, and give every connection
a MediaInputPort.
-- Actually play the audio that reaches the AudioContext's destination node.
-- Force AudioContext to use the audio sample rate defined by MediaStreamGraph.
-- Fix AudioBufferSourceNode's start and stop methods to possibly throw and
take default 'when' parameters.
-- Create an AudioNodeStream for AudioBufferSourceNode and give it a
AudioBufferSourceNodeEngine that does what's needed. Set parameters for
this engine in the start() and stop() methods.
-- Create AudioBuffer::GetThreadSharedChannelsForRate, which is responsible
for stealing the contents of any JS array buffers, and bundling them up
into a thread-shared read-only buffer object which can be used as
part of an AudioChunk. This method will also be responsible for
resampling and caching as necessary.
Bug 804387. Part 10: Add a mechanism for ensuring that we don't attempt to allocate an input port if the input node is not hooked up to MSG yet. r=roc
Bug 804387. Part 11: Fix testcase to expect correct sample rate. r=roc