bug 1190285 only update mStateComputedTime once per iteration r=padenot

UpdateStateComputedTime(GraphTime aStateComputedTime) occurs midway during
the iteration, so there is no need to update at the end.

--HG--
extra : rebase_source : 82a5fb08596d16ea1926725149b2688cfdf585ec
This commit is contained in:
Karl Tomlinson 2015-07-29 16:58:59 +12:00
Родитель db58db72fb
Коммит a6f86056b9
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -295,7 +295,7 @@ ThreadedDriver::RunThread()
STREAM_LOG(LogLevel::Debug, ("Time did not advance"));
}
mStateComputedTime = mNextStateComputedTime;
MOZ_ASSERT(mStateComputedTime == mNextStateComputedTime);
mNextStateComputedTime =
mGraphImpl->RoundUpToNextAudioBlock(
mIterationEnd + mGraphImpl->MillisecondsToMediaTime(AUDIO_TARGET_MS));
@ -822,7 +822,7 @@ AudioCallbackDriver::DataCallback(AudioDataValue* aBuffer, long aFrames)
// we don't need to run an iteration and if we do so we may overflow.
if (mBuffer.Available()) {
mStateComputedTime = mNextStateComputedTime;
MOZ_ASSERT(mStateComputedTime == mNextStateComputedTime);
// State computed time is decided by the audio callback's buffer length. We
// compute the iteration start and end from there, trying to keep the amount