chromium/third_party/blink/renderer/modules/webaudio/realtime_audio_destination_handler.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/modules/webaudio/realtime_audio_destination_handler.h"

#include "base/feature_list.h"
#include "media/base/output_device_info.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/platform/web_audio_latency_hint.h"
#include "third_party/blink/public/platform/web_audio_sink_descriptor.h"
#include "third_party/blink/public/web/web_local_frame.h"
#include "third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.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/cross_thread_audio_worklet_processor_info.h"
#include "third_party/blink/renderer/modules/webrtc/webrtc_audio_device_impl.h"
#include "third_party/blink/renderer/platform/audio/audio_destination.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/bindings/exception_messages.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_copier_base.h"

namespace blink {

namespace {

constexpr unsigned kDefaultNumberOfInputChannels =;

}  // namespace

scoped_refptr<RealtimeAudioDestinationHandler>
RealtimeAudioDestinationHandler::Create(
    AudioNode& node,
    const WebAudioSinkDescriptor& sink_descriptor,
    const WebAudioLatencyHint& latency_hint,
    std::optional<float> sample_rate,
    bool update_echo_cancellation_on_first_start) {}

RealtimeAudioDestinationHandler::RealtimeAudioDestinationHandler(
    AudioNode& node,
    const WebAudioSinkDescriptor& sink_descriptor,
    const WebAudioLatencyHint& latency_hint,
    std::optional<float> sample_rate,
    bool update_echo_cancellation_on_first_start)
    :{}

RealtimeAudioDestinationHandler::~RealtimeAudioDestinationHandler() {}

void RealtimeAudioDestinationHandler::Dispose() {}

AudioContext* RealtimeAudioDestinationHandler::Context() const {}

void RealtimeAudioDestinationHandler::Initialize() {}

void RealtimeAudioDestinationHandler::Uninitialize() {}

void RealtimeAudioDestinationHandler::SetChannelCount(
    unsigned channel_count,
    ExceptionState& exception_state) {}

void RealtimeAudioDestinationHandler::StartRendering() {}

void RealtimeAudioDestinationHandler::StopRendering() {}

void RealtimeAudioDestinationHandler::Pause() {}

void RealtimeAudioDestinationHandler::Resume() {}

void RealtimeAudioDestinationHandler::RestartRendering() {}

uint32_t RealtimeAudioDestinationHandler::MaxChannelCount() const {}

double RealtimeAudioDestinationHandler::SampleRate() const {}

void RealtimeAudioDestinationHandler::Render(
    AudioBus* destination_bus,
    uint32_t number_of_frames,
    const AudioIOPosition& output_position,
    const AudioCallbackMetric& metric,
    base::TimeDelta playout_delay,
    const media::AudioGlitchInfo& glitch_info) {}

void RealtimeAudioDestinationHandler::OnRenderError() {}

// A flag for using FakeAudioWorker when an AudioContext with "playback"
// latency outputs silence.
BASE_FEATURE();

void RealtimeAudioDestinationHandler::SetDetectSilenceIfNecessary(
    bool has_automatic_pull_nodes) {}

void RealtimeAudioDestinationHandler::SetDetectSilence(bool detect_silence) {}

uint32_t RealtimeAudioDestinationHandler::GetCallbackBufferSize() const {}

int RealtimeAudioDestinationHandler::GetFramesPerBuffer() const {}

base::TimeDelta RealtimeAudioDestinationHandler::GetPlatformBufferDuration()
    const {}

void RealtimeAudioDestinationHandler::CreatePlatformDestination() {}

void RealtimeAudioDestinationHandler::StartPlatformDestination() {}

void RealtimeAudioDestinationHandler::StopPlatformDestination() {}

void RealtimeAudioDestinationHandler::PrepareTaskRunnerForWorklet() {}

void RealtimeAudioDestinationHandler::SetSinkDescriptor(
    const WebAudioSinkDescriptor& sink_descriptor,
    media::OutputDeviceStatusCB callback) {}

void RealtimeAudioDestinationHandler::
    invoke_onrendererror_from_platform_for_testing() {}

bool RealtimeAudioDestinationHandler::
    get_platform_destination_is_playing_for_testing() {}

}  // namespace blink