#include "third_party/blink/renderer/modules/webaudio/offline_audio_context.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "media/base/audio_glitch_info.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_offline_audio_context_options.h"
#include "third_party/blink/renderer/core/dom/dom_exception.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/modules/webaudio/audio_listener.h"
#include "third_party/blink/renderer/modules/webaudio/deferred_task_handler.h"
#include "third_party/blink/renderer/modules/webaudio/offline_audio_completion_event.h"
#include "third_party/blink/renderer/modules/webaudio/offline_audio_destination_node.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/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
namespace blink {
OfflineAudioContext* OfflineAudioContext::Create(
ExecutionContext* context,
unsigned number_of_channels,
unsigned number_of_frames,
float sample_rate,
ExceptionState& exception_state) { … }
OfflineAudioContext* OfflineAudioContext::Create(
ExecutionContext* context,
const OfflineAudioContextOptions* options,
ExceptionState& exception_state) { … }
OfflineAudioContext::OfflineAudioContext(LocalDOMWindow* window,
unsigned number_of_channels,
uint32_t number_of_frames,
float sample_rate,
ExceptionState& exception_state)
: … { … }
OfflineAudioContext::~OfflineAudioContext() { … }
void OfflineAudioContext::Trace(Visitor* visitor) const { … }
ScriptPromise<AudioBuffer> OfflineAudioContext::startOfflineRendering(
ScriptState* script_state,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> OfflineAudioContext::suspendContext(
ScriptState* script_state,
double when,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> OfflineAudioContext::resumeContext(
ScriptState* script_state,
ExceptionState& exception_state) { … }
void OfflineAudioContext::FireCompletionEvent() { … }
bool OfflineAudioContext::HandlePreRenderTasks(
uint32_t frames_to_process,
const AudioIOPosition* output_position,
const AudioCallbackMetric* metric,
base::TimeDelta playout_delay,
const media::AudioGlitchInfo& glitch_info) { … }
void OfflineAudioContext::HandlePostRenderTasks() { … }
OfflineAudioDestinationHandler& OfflineAudioContext::DestinationHandler() { … }
void OfflineAudioContext::ResolveSuspendOnMainThread(size_t frame) { … }
void OfflineAudioContext::RejectPendingResolvers() { … }
bool OfflineAudioContext::IsPullingAudioGraph() const { … }
bool OfflineAudioContext::ShouldSuspend() { … }
bool OfflineAudioContext::HasPendingActivity() const { … }
}