This shouldn't be necessary, if clients do the right things, but provides some
safety, in case they don't.
--HG--
extra : rebase_source : e64d663c27f03eff35f538c205cd66d42420d9e4
The stream order is only important if there are connections, in which case
MediaInputPort::Disconnect() calls SetStreamOrderDirty().
MediaStreamGraphImpl::RemoveStream() also calls SetStreamOrderDirty(), which
ensures that mFirstCycleBreaker is updated when necessary.
--HG--
extra : rebase_source : b437f0d078a481725579456d91acc32353e1221a
Also reduce the number of ProcessedMediaStream* static_casts and use a new
variable name |removed| to emphasize what is happening.
--HG--
extra : rebase_source : 50b6c5e2d97a2e4ffbf9db993e1327de8c1d7b36
UpdateStreamOrder is not called often because it's expensive (it's called only
when the graph topology changed), and it's earlier in the MSG loop than the
audio stream creation, so we need to tell the newly created AudioStream that a
microphone is active on creation as well.
The panning logic is also now triggered on stream start, because it is async.
Previously downstream nodes from DelayNodes in cycles sometimes received stale
output from the previous MSG iteration.
Also, if two cycles share a common path, they will now *both* be treated as
cycles, either by muting or by enforcing minimum delay. Previously, marking
one cycle first could prevent detection of other cycles in the same SCC.
--HG--
extra : rebase_source : 82892c538c5ce514165b5f975474df15b99e3d2b
We could get away with 1 as an initial time when units were 1/(1<<20) seconds
but when graph time units are audio samples, an initial value of 1 will mean
that the first audio block produced has 1 frame fewer.
--HG--
extra : transplant_source : %FF%D5%AF%A9%C7%EA%C4%D7%ED%8F%CC%AC%E4%5E%FF%D0%87%8D%3AN
This may result in repeating a sample sometimes due to rounding effects, but
that should only happen once per unblocked sequence of track frames.
--HG--
extra : transplant_source : %0C%E9%A4jq%286%96%B1%A9%AE%9F%1Cr%DCK%8F%AF%92i
mLastTickWritten and offset are stream positions, which do not advance when
the stream is blocked.
--HG--
extra : transplant_source : %15%7B%E5%E9.%89%BC%1E%F8%92%FD%3D%CB%10%FC%AD%EAT%90-
MediaTimes are multiplied by sample rates when converting to ticks.
This new maximum leaves 24 bits to count seconds, which corresponds to 194
days.
TimeVarying::GetAt() can return INT64_MAX, which may be > GRAPH_TIME_MAX.
The "Start time too early" assertion would now fail because conversion of
STREAM_TIME_MAX to ticks no longer overflows.
--HG--
extra : rebase_source : b49c95315d0c633f191ff68aab0b5b7aa04c6e38
and use this in StreamBuffer::GetAllTracksEnd() to detect when no more tracks
will be added.
--HG--
extra : transplant_source : %B7A-%7EV%94%E1%CE%15%1C%15%7B%84%D5%F1%1D%A2%CF%EC%15
Use the sample rate passed to the OfflineAudioContext constructor in
MediaStreamGraph::CreateOfflineInstance, and pass the preferred mixer sample
rate to the (real time) MediaStreamGraph constructor.
Then, always use this sample rate for the lifetime of the graph.
This patch needed to pass the sample rate to the AudioMixer class to avoid
relying on globals like it was done before.
--HG--
extra : rebase_source : 2802208819887605fe26a7040998fc328b3c9a57