#include "third_party/blink/renderer/modules/webaudio/script_processor_node.h"
#include <memory>
#include "base/synchronization/waitable_event.h"
#include "base/trace_event/trace_event.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/renderer/bindings/core/v8/active_script_wrappable_creation_key.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/modules/webaudio/audio_buffer.h"
#include "third_party/blink/renderer/modules/webaudio/audio_graph_tracer.h"
#include "third_party/blink/renderer/modules/webaudio/audio_node_input.h"
#include "third_party/blink/renderer/modules/webaudio/audio_node_output.h"
#include "third_party/blink/renderer/modules/webaudio/audio_processing_event.h"
#include "third_party/blink/renderer/modules/webaudio/base_audio_context.h"
#include "third_party/blink/renderer/modules/webaudio/realtime_audio_destination_node.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
namespace blink {
namespace {
bool IsAudioBufferDetached(AudioBuffer* buffer) { … }
bool BufferTopologyMatches(AudioBuffer* buffer_1, AudioBuffer* buffer_2) { … }
uint32_t ChooseBufferSize(uint32_t callback_buffer_size) { … }
}
ScriptProcessorNode::ScriptProcessorNode(BaseAudioContext& context,
float sample_rate,
uint32_t buffer_size,
uint32_t number_of_input_channels,
uint32_t number_of_output_channels)
: … { … }
ScriptProcessorNode* ScriptProcessorNode::Create(
BaseAudioContext& context,
ExceptionState& exception_state) { … }
ScriptProcessorNode* ScriptProcessorNode::Create(
BaseAudioContext& context,
uint32_t requested_buffer_size,
ExceptionState& exception_state) { … }
ScriptProcessorNode* ScriptProcessorNode::Create(
BaseAudioContext& context,
uint32_t requested_buffer_size,
uint32_t number_of_input_channels,
ExceptionState& exception_state) { … }
ScriptProcessorNode* ScriptProcessorNode::Create(
BaseAudioContext& context,
uint32_t requested_buffer_size,
uint32_t number_of_input_channels,
uint32_t number_of_output_channels,
ExceptionState& exception_state) { … }
uint32_t ScriptProcessorNode::bufferSize() const { … }
void ScriptProcessorNode::DispatchEvent(double playback_time,
uint32_t double_buffer_index) { … }
bool ScriptProcessorNode::HasPendingActivity() const { … }
void ScriptProcessorNode::Trace(Visitor* visitor) const { … }
void ScriptProcessorNode::ReportDidCreate() { … }
void ScriptProcessorNode::ReportWillBeDestroyed() { … }
}