chromium/remoting/protocol/webrtc_audio_module.cc

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

#include "remoting/protocol/webrtc_audio_module.h"

#include <memory>

#include "base/functional/bind.h"
#include "base/task/single_thread_task_runner.h"
#include "base/timer/timer.h"

namespace remoting::protocol {

namespace {

const int kSamplingRate =;

// Webrtc uses 10ms frames.
const int kFrameLengthMs =;
const int kSamplesPerFrame =;

constexpr base::TimeDelta kPollInterval =;
const int kChannels =;
const int kBytesPerSample =;

}  // namespace

// webrtc::AudioDeviceModule is a generic interface that aims to provide all
// functionality normally supported audio input/output devices, but most of
// the functions are never called in Webrtc. This class implements only
// functions that are actually used. All unused functions are marked as
// NOTREACHED().

WebrtcAudioModule::WebrtcAudioModule() = default;
WebrtcAudioModule::~WebrtcAudioModule() = default;

void WebrtcAudioModule::SetAudioTaskRunner(
    scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner) {}

int32_t WebrtcAudioModule::ActiveAudioLayer(AudioLayer* audio_layer) const {}

int32_t WebrtcAudioModule::RegisterAudioCallback(
    webrtc::AudioTransport* audio_transport) {}

int32_t WebrtcAudioModule::Init() {}

int32_t WebrtcAudioModule::Terminate() {}

bool WebrtcAudioModule::Initialized() const {}

int16_t WebrtcAudioModule::PlayoutDevices() {}

int16_t WebrtcAudioModule::RecordingDevices() {}

int32_t WebrtcAudioModule::PlayoutDeviceName(
    uint16_t index,
    char name[webrtc::kAdmMaxDeviceNameSize],
    char guid[webrtc::kAdmMaxGuidSize]) {}

int32_t WebrtcAudioModule::RecordingDeviceName(
    uint16_t index,
    char name[webrtc::kAdmMaxDeviceNameSize],
    char guid[webrtc::kAdmMaxGuidSize]) {}

int32_t WebrtcAudioModule::SetPlayoutDevice(uint16_t index) {}

int32_t WebrtcAudioModule::SetPlayoutDevice(WindowsDeviceType device) {}

int32_t WebrtcAudioModule::SetRecordingDevice(uint16_t index) {}

int32_t WebrtcAudioModule::SetRecordingDevice(WindowsDeviceType device) {}

int32_t WebrtcAudioModule::PlayoutIsAvailable(bool* available) {}

int32_t WebrtcAudioModule::InitPlayout() {}

bool WebrtcAudioModule::PlayoutIsInitialized() const {}

int32_t WebrtcAudioModule::RecordingIsAvailable(bool* available) {}

int32_t WebrtcAudioModule::InitRecording() {}

bool WebrtcAudioModule::RecordingIsInitialized() const {}

int32_t WebrtcAudioModule::StartPlayout() {}

int32_t WebrtcAudioModule::StopPlayout() {}

bool WebrtcAudioModule::Playing() const {}

int32_t WebrtcAudioModule::StartRecording() {}

int32_t WebrtcAudioModule::StopRecording() {}

bool WebrtcAudioModule::Recording() const {}

int32_t WebrtcAudioModule::InitSpeaker() {}

bool WebrtcAudioModule::SpeakerIsInitialized() const {}

int32_t WebrtcAudioModule::InitMicrophone() {}

bool WebrtcAudioModule::MicrophoneIsInitialized() const {}

int32_t WebrtcAudioModule::SpeakerVolumeIsAvailable(bool* available) {}

int32_t WebrtcAudioModule::SetSpeakerVolume(uint32_t volume) {}

int32_t WebrtcAudioModule::SpeakerVolume(uint32_t* volume) const {}

int32_t WebrtcAudioModule::MaxSpeakerVolume(uint32_t* max_volume) const {}

int32_t WebrtcAudioModule::MinSpeakerVolume(uint32_t* min_volume) const {}

int32_t WebrtcAudioModule::MicrophoneVolumeIsAvailable(bool* available) {}

int32_t WebrtcAudioModule::SetMicrophoneVolume(uint32_t volume) {}

int32_t WebrtcAudioModule::MicrophoneVolume(uint32_t* volume) const {}

int32_t WebrtcAudioModule::MaxMicrophoneVolume(uint32_t* max_volume) const {}

int32_t WebrtcAudioModule::MinMicrophoneVolume(uint32_t* min_volume) const {}

int32_t WebrtcAudioModule::SpeakerMuteIsAvailable(bool* available) {}

int32_t WebrtcAudioModule::SetSpeakerMute(bool enable) {}

int32_t WebrtcAudioModule::SpeakerMute(bool* enabled) const {}

int32_t WebrtcAudioModule::MicrophoneMuteIsAvailable(bool* available) {}

int32_t WebrtcAudioModule::SetMicrophoneMute(bool enable) {}

int32_t WebrtcAudioModule::MicrophoneMute(bool* enabled) const {}

int32_t WebrtcAudioModule::StereoPlayoutIsAvailable(bool* available) const {}

int32_t WebrtcAudioModule::SetStereoPlayout(bool enable) {}

int32_t WebrtcAudioModule::StereoPlayout(bool* enabled) const {}

int32_t WebrtcAudioModule::StereoRecordingIsAvailable(bool* available) const {}

int32_t WebrtcAudioModule::SetStereoRecording(bool enable) {}

int32_t WebrtcAudioModule::StereoRecording(bool* enabled) const {}

int32_t WebrtcAudioModule::PlayoutDelay(uint16_t* delay_ms) const {}

bool WebrtcAudioModule::BuiltInAECIsAvailable() const {}

bool WebrtcAudioModule::BuiltInAGCIsAvailable() const {}

bool WebrtcAudioModule::BuiltInNSIsAvailable() const {}

int32_t WebrtcAudioModule::EnableBuiltInAEC(bool enable) {}

int32_t WebrtcAudioModule::EnableBuiltInAGC(bool enable) {}

int32_t WebrtcAudioModule::EnableBuiltInNS(bool enable) {}

#if defined(WEBRTC_IOS)
int WebrtcAudioModule::GetPlayoutAudioParameters(
    webrtc::AudioParameters* params) const {
  NOTREACHED_IN_MIGRATION();
  return -1;
}

int WebrtcAudioModule::GetRecordAudioParameters(
    webrtc::AudioParameters* params) const {
  NOTREACHED_IN_MIGRATION();
  return -1;
}
#endif  // WEBRTC_IOS

void WebrtcAudioModule::StartPlayoutOnAudioThread() {}

void WebrtcAudioModule::StopPlayoutOnAudioThread() {}

void WebrtcAudioModule::PollFromSource() {}

}  // namespace remoting::protocol