Commit 5ff953de authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

Don't hit NOTREACHED for pausing/freezing of OfflineAudioDestinations

Only pause/freeze realtime audio destinations. Offline destinations are
controlled by the thread scheduler itself for pausing/resuming tasks.

BUG=959191

Change-Id: Ie92111af53e651d9d7d3f193921a504935af9c1b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1604493Reviewed-by: default avatarHongchan Choi <hongchan@chromium.org>
Reviewed-by: default avatarRaymond Toy <rtoy@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659275}
parent c5a63d75
......@@ -185,6 +185,10 @@ void BaseAudioContext::Uninitialize() {
void BaseAudioContext::ContextLifecycleStateChanged(
mojom::FrameLifecycleState state) {
// Don't need to do anything for an offline context.
if (!HasRealtimeConstraint())
return;
if (state == mojom::FrameLifecycleState::kRunning)
destination()->GetAudioDestinationHandler().Resume();
else if (state == mojom::FrameLifecycleState::kFrozen ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment