#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/modules/webaudio/offline_audio_destination_handler.h"
#include <algorithm>
#include "base/trace_event/typed_macros.h"
#include "media/base/audio_glitch_info.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.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_messaging_proxy.h"
#include "third_party/blink/renderer/modules/webaudio/base_audio_context.h"
#include "third_party/blink/renderer/modules/webaudio/cross_thread_audio_worklet_processor_info.h"
#include "third_party/blink/renderer/modules/webaudio/offline_audio_context.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/audio/denormal_disabler.h"
#include "third_party/blink/renderer/platform/audio/hrtf_database_loader.h"
#include "third_party/blink/renderer/platform/scheduler/public/non_main_thread.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 {
OfflineAudioDestinationHandler::OfflineAudioDestinationHandler(
AudioNode& node,
unsigned number_of_channels,
uint32_t frames_to_process,
float sample_rate)
: … { … }
scoped_refptr<OfflineAudioDestinationHandler>
OfflineAudioDestinationHandler::Create(AudioNode& node,
unsigned number_of_channels,
uint32_t frames_to_process,
float sample_rate) { … }
OfflineAudioDestinationHandler::~OfflineAudioDestinationHandler() { … }
void OfflineAudioDestinationHandler::Dispose() { … }
void OfflineAudioDestinationHandler::Initialize() { … }
void OfflineAudioDestinationHandler::Uninitialize() { … }
OfflineAudioContext* OfflineAudioDestinationHandler::Context() const { … }
uint32_t OfflineAudioDestinationHandler::MaxChannelCount() const { … }
void OfflineAudioDestinationHandler::StartRendering() { … }
void OfflineAudioDestinationHandler::StopRendering() { … }
void OfflineAudioDestinationHandler::Pause() { … }
void OfflineAudioDestinationHandler::Resume() { … }
void OfflineAudioDestinationHandler::InitializeOfflineRenderThread(
AudioBuffer* render_target) { … }
void OfflineAudioDestinationHandler::StartOfflineRendering() { … }
void OfflineAudioDestinationHandler::DoOfflineRendering() { … }
void OfflineAudioDestinationHandler::SuspendOfflineRendering() { … }
void OfflineAudioDestinationHandler::FinishOfflineRendering() { … }
void OfflineAudioDestinationHandler::NotifySuspend(size_t frame) { … }
void OfflineAudioDestinationHandler::NotifyComplete() { … }
bool OfflineAudioDestinationHandler::RenderIfNotSuspended(
AudioBus* source_bus,
AudioBus* destination_bus,
uint32_t number_of_frames) { … }
void OfflineAudioDestinationHandler::PrepareTaskRunnerForRendering() { … }
void OfflineAudioDestinationHandler::RestartRendering() { … }
}