Move more logic from AudioDestinationNode to its subclasses
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 May 2021 16:53:37 +0000 (16:53 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 May 2021 16:53:37 +0000 (16:53 +0000)
commit43580a8d5be8e7af3c15e8138042eca266077c43
tree916c81ff3945a2b7d8d8c7b45dff5202770274e9
parent15c2f97e17ee7f25be02da91665278d8d5528c51
Move more logic from AudioDestinationNode to its subclasses
https://bugs.webkit.org/show_bug.cgi?id=225849

Reviewed by Sam Weinig.

Move more logic from AudioDestinationNode to its subclasses. In particular, AudioDestinationNode
contains a lot of things that are specific to real-time audio rendering and those should go to
DefaultAudioDestinationNode.

This allows us to move isPlayingAudioDidChange() from BaseAudioContext to AudioContext also.

* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::isPlayingAudioDidChange):
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/AudioDestinationNode.cpp:
(WebCore::AudioDestinationNode::renderQuantum):
* Modules/webaudio/AudioDestinationNode.h:
* Modules/webaudio/BaseAudioContext.cpp:
* Modules/webaudio/BaseAudioContext.h:
* Modules/webaudio/DefaultAudioDestinationNode.cpp:
(WebCore::DefaultAudioDestinationNode::createDestination):
(WebCore::DefaultAudioDestinationNode::framesPerBuffer const):
(WebCore::DefaultAudioDestinationNode::render):
(WebCore::DefaultAudioDestinationNode::setIsSilent):
(WebCore::DefaultAudioDestinationNode::isPlayingDidChange):
(WebCore::DefaultAudioDestinationNode::updateIsEffectivelyPlayingAudio):
* Modules/webaudio/DefaultAudioDestinationNode.h:
* Modules/webaudio/OfflineAudioDestinationNode.cpp:
(WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode):
(WebCore::OfflineAudioDestinationNode::startRendering):
(WebCore::OfflineAudioDestinationNode::renderOnAudioThread):
* Modules/webaudio/OfflineAudioDestinationNode.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@277586 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/webaudio/AudioContext.cpp
Source/WebCore/Modules/webaudio/AudioContext.h
Source/WebCore/Modules/webaudio/AudioDestinationNode.cpp
Source/WebCore/Modules/webaudio/AudioDestinationNode.h
Source/WebCore/Modules/webaudio/BaseAudioContext.cpp
Source/WebCore/Modules/webaudio/BaseAudioContext.h
Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.cpp
Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.h
Source/WebCore/Modules/webaudio/OfflineAudioDestinationNode.cpp
Source/WebCore/Modules/webaudio/OfflineAudioDestinationNode.h