summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/webaudio/offline_audio_destination_node.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/webaudio/offline_audio_destination_node.cc')
-rw-r--r--chromium/third_party/blink/renderer/modules/webaudio/offline_audio_destination_node.cc39
1 files changed, 16 insertions, 23 deletions
diff --git a/chromium/third_party/blink/renderer/modules/webaudio/offline_audio_destination_node.cc b/chromium/third_party/blink/renderer/modules/webaudio/offline_audio_destination_node.cc
index 71f8855b94b..ec610b99c67 100644
--- a/chromium/third_party/blink/renderer/modules/webaudio/offline_audio_destination_node.cc
+++ b/chromium/third_party/blink/renderer/modules/webaudio/offline_audio_destination_node.cc
@@ -293,32 +293,25 @@ bool OfflineAudioDestinationHandler::RenderIfNotSuspended(
return true;
}
- {
- MutexTryLocker try_locker(Context()->GetTearDownMutex());
- if (try_locker.Locked()) {
- DCHECK_GE(NumberOfInputs(), 1u);
-
- // This will cause the node(s) connected to us to process, which in turn
- // will pull on their input(s), all the way backwards through the
- // rendering graph.
- AudioBus* rendered_bus = Input(0).Pull(destination_bus, number_of_frames);
-
- if (!rendered_bus) {
- destination_bus->Zero();
- } else if (rendered_bus != destination_bus) {
- // in-place processing was not possible - so copy
- destination_bus->CopyFrom(*rendered_bus);
- }
- } else {
- destination_bus->Zero();
- }
+ DCHECK_GE(NumberOfInputs(), 1u);
- // Process nodes which need a little extra help because they are not
- // connected to anything, but still need to process.
- Context()->GetDeferredTaskHandler().ProcessAutomaticPullNodes(
- number_of_frames);
+ // This will cause the node(s) connected to us to process, which in turn will
+ // pull on their input(s), all the way backwards through the rendering graph.
+ scoped_refptr<AudioBus> rendered_bus =
+ Input(0).Pull(destination_bus, number_of_frames);
+
+ if (!rendered_bus) {
+ destination_bus->Zero();
+ } else if (rendered_bus != destination_bus) {
+ // in-place processing was not possible - so copy
+ destination_bus->CopyFrom(*rendered_bus);
}
+ // Process nodes which need a little extra help because they are not connected
+ // to anything, but still need to process.
+ Context()->GetDeferredTaskHandler().ProcessAutomaticPullNodes(
+ number_of_frames);
+
// Let the context take care of any business at the end of each render
// quantum.
Context()->HandlePostRenderTasks();