#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/modules/webaudio/audio_worklet_handler.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/to_v8_traits.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_audio_param_descriptor.h"
#include "third_party/blink/renderer/core/events/error_event.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/messaging/message_channel.h"
#include "third_party/blink/renderer/core/messaging/message_port.h"
#include "third_party/blink/renderer/modules/event_modules.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_worklet.h"
#include "third_party/blink/renderer/modules/webaudio/audio_worklet_node.h"
#include "third_party/blink/renderer/modules/webaudio/audio_worklet_processor.h"
#include "third_party/blink/renderer/modules/webaudio/audio_worklet_processor_definition.h"
#include "third_party/blink/renderer/modules/webaudio/cross_thread_audio_worklet_processor_info.h"
#include "third_party/blink/renderer/platform/audio/audio_bus.h"
#include "third_party/blink/renderer/platform/audio/audio_utilities.h"
#include "third_party/blink/renderer/platform/bindings/exception_messages.h"
#include "third_party/blink/renderer/platform/heap/persistent.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_copier_base.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
namespace blink {
namespace {
constexpr unsigned kDefaultNumberOfOutputChannels = …;
}
AudioWorkletHandler::AudioWorkletHandler(
AudioNode& node,
float sample_rate,
String name,
HashMap<String, scoped_refptr<AudioParamHandler>> param_handler_map,
const AudioWorkletNodeOptions* options)
: … { … }
AudioWorkletHandler::~AudioWorkletHandler() { … }
scoped_refptr<AudioWorkletHandler> AudioWorkletHandler::Create(
AudioNode& node,
float sample_rate,
String name,
HashMap<String, scoped_refptr<AudioParamHandler>> param_handler_map,
const AudioWorkletNodeOptions* options) { … }
void AudioWorkletHandler::Process(uint32_t frames_to_process) { … }
void AudioWorkletHandler::CheckNumberOfChannelsForInput(AudioNodeInput* input) { … }
void AudioWorkletHandler::UpdatePullStatusIfNeeded() { … }
double AudioWorkletHandler::TailTime() const { … }
void AudioWorkletHandler::SetProcessorOnRenderThread(
AudioWorkletProcessor* processor) { … }
void AudioWorkletHandler::FinishProcessorOnRenderThread() { … }
void AudioWorkletHandler::NotifyProcessorError(
AudioWorkletProcessorErrorState error_state) { … }
void AudioWorkletHandler::MarkProcessorInactiveOnMainThread() { … }
}