tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

audio_device_dummy.cc (5110B)


      1 /*
      2 *  Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
      3 *
      4 *  Use of this source code is governed by a BSD-style license
      5 *  that can be found in the LICENSE file in the root of the source
      6 *  tree. An additional intellectual property rights grant can be found
      7 *  in the file PATENTS.  All contributing project authors may
      8 *  be found in the AUTHORS file in the root of the source tree.
      9 */
     10 
     11 #include "modules/audio_device/dummy/audio_device_dummy.h"
     12 
     13 #include <cstdint>
     14 
     15 #include "api/audio/audio_device.h"
     16 #include "api/audio/audio_device_defines.h"
     17 #include "modules/audio_device/audio_device_buffer.h"
     18 #include "modules/audio_device/audio_device_generic.h"
     19 
     20 namespace webrtc {
     21 
     22 int32_t AudioDeviceDummy::ActiveAudioLayer(
     23    AudioDeviceModule::AudioLayer& /* audioLayer */) const {
     24  return -1;
     25 }
     26 
     27 AudioDeviceGeneric::InitStatus AudioDeviceDummy::Init() {
     28  return InitStatus::OK;
     29 }
     30 
     31 int32_t AudioDeviceDummy::Terminate() {
     32  return 0;
     33 }
     34 
     35 bool AudioDeviceDummy::Initialized() const {
     36  return true;
     37 }
     38 
     39 int16_t AudioDeviceDummy::PlayoutDevices() {
     40  return -1;
     41 }
     42 
     43 int16_t AudioDeviceDummy::RecordingDevices() {
     44  return -1;
     45 }
     46 
     47 int32_t AudioDeviceDummy::PlayoutDeviceName(
     48    uint16_t /* index */,
     49    char /* name */[kAdmMaxDeviceNameSize],
     50    char /* guid */[kAdmMaxGuidSize]) {
     51  return -1;
     52 }
     53 
     54 int32_t AudioDeviceDummy::RecordingDeviceName(
     55    uint16_t /* index */,
     56    char /* name */[kAdmMaxDeviceNameSize],
     57    char /* guid */[kAdmMaxGuidSize]) {
     58  return -1;
     59 }
     60 
     61 int32_t AudioDeviceDummy::SetPlayoutDevice(uint16_t /* index */) {
     62  return -1;
     63 }
     64 
     65 int32_t AudioDeviceDummy::SetPlayoutDevice(
     66    AudioDeviceModule::WindowsDeviceType /* device */) {
     67  return -1;
     68 }
     69 
     70 int32_t AudioDeviceDummy::SetRecordingDevice(uint16_t /* index */) {
     71  return -1;
     72 }
     73 
     74 int32_t AudioDeviceDummy::SetRecordingDevice(
     75    AudioDeviceModule::WindowsDeviceType /* device */) {
     76  return -1;
     77 }
     78 
     79 int32_t AudioDeviceDummy::PlayoutIsAvailable(bool& /* available */) {
     80  return -1;
     81 }
     82 
     83 int32_t AudioDeviceDummy::InitPlayout() {
     84  return -1;
     85 }
     86 
     87 bool AudioDeviceDummy::PlayoutIsInitialized() const {
     88  return false;
     89 }
     90 
     91 int32_t AudioDeviceDummy::RecordingIsAvailable(bool& /* available */) {
     92  return -1;
     93 }
     94 
     95 int32_t AudioDeviceDummy::InitRecording() {
     96  return -1;
     97 }
     98 
     99 bool AudioDeviceDummy::RecordingIsInitialized() const {
    100  return false;
    101 }
    102 
    103 int32_t AudioDeviceDummy::StartPlayout() {
    104  return -1;
    105 }
    106 
    107 int32_t AudioDeviceDummy::StopPlayout() {
    108  return 0;
    109 }
    110 
    111 bool AudioDeviceDummy::Playing() const {
    112  return false;
    113 }
    114 
    115 int32_t AudioDeviceDummy::StartRecording() {
    116  return -1;
    117 }
    118 
    119 int32_t AudioDeviceDummy::StopRecording() {
    120  return 0;
    121 }
    122 
    123 bool AudioDeviceDummy::Recording() const {
    124  return false;
    125 }
    126 
    127 int32_t AudioDeviceDummy::InitSpeaker() {
    128  return -1;
    129 }
    130 
    131 bool AudioDeviceDummy::SpeakerIsInitialized() const {
    132  return false;
    133 }
    134 
    135 int32_t AudioDeviceDummy::InitMicrophone() {
    136  return -1;
    137 }
    138 
    139 bool AudioDeviceDummy::MicrophoneIsInitialized() const {
    140  return false;
    141 }
    142 
    143 int32_t AudioDeviceDummy::SpeakerVolumeIsAvailable(bool& /* available */) {
    144  return -1;
    145 }
    146 
    147 int32_t AudioDeviceDummy::SetSpeakerVolume(uint32_t /* volume */) {
    148  return -1;
    149 }
    150 
    151 int32_t AudioDeviceDummy::SpeakerVolume(uint32_t& /* volume */) const {
    152  return -1;
    153 }
    154 
    155 int32_t AudioDeviceDummy::MaxSpeakerVolume(uint32_t& /* maxVolume */) const {
    156  return -1;
    157 }
    158 
    159 int32_t AudioDeviceDummy::MinSpeakerVolume(uint32_t& /* minVolume */) const {
    160  return -1;
    161 }
    162 
    163 int32_t AudioDeviceDummy::MicrophoneVolumeIsAvailable(bool& /* available */) {
    164  return -1;
    165 }
    166 
    167 int32_t AudioDeviceDummy::SetMicrophoneVolume(uint32_t /* volume */) {
    168  return -1;
    169 }
    170 
    171 int32_t AudioDeviceDummy::MicrophoneVolume(uint32_t& /* volume */) const {
    172  return -1;
    173 }
    174 
    175 int32_t AudioDeviceDummy::MaxMicrophoneVolume(uint32_t& /* maxVolume */) const {
    176  return -1;
    177 }
    178 
    179 int32_t AudioDeviceDummy::MinMicrophoneVolume(uint32_t& /* minVolume */) const {
    180  return -1;
    181 }
    182 
    183 int32_t AudioDeviceDummy::SpeakerMuteIsAvailable(bool& /* available */) {
    184  return -1;
    185 }
    186 
    187 int32_t AudioDeviceDummy::SetSpeakerMute(bool /* enable */) {
    188  return -1;
    189 }
    190 
    191 int32_t AudioDeviceDummy::SpeakerMute(bool& /* enabled */) const {
    192  return -1;
    193 }
    194 
    195 int32_t AudioDeviceDummy::MicrophoneMuteIsAvailable(bool& /* available */) {
    196  return -1;
    197 }
    198 
    199 int32_t AudioDeviceDummy::SetMicrophoneMute(bool /* enable */) {
    200  return -1;
    201 }
    202 
    203 int32_t AudioDeviceDummy::MicrophoneMute(bool& /* enabled */) const {
    204  return -1;
    205 }
    206 
    207 int32_t AudioDeviceDummy::StereoPlayoutIsAvailable(bool& /* available */) {
    208  return -1;
    209 }
    210 int32_t AudioDeviceDummy::SetStereoPlayout(bool /* enable */) {
    211  return -1;
    212 }
    213 
    214 int32_t AudioDeviceDummy::StereoPlayout(bool& /* enabled */) const {
    215  return -1;
    216 }
    217 
    218 int32_t AudioDeviceDummy::StereoRecordingIsAvailable(bool& /* available */) {
    219  return -1;
    220 }
    221 
    222 int32_t AudioDeviceDummy::SetStereoRecording(bool /* enable */) {
    223  return -1;
    224 }
    225 
    226 int32_t AudioDeviceDummy::StereoRecording(bool& /* enabled */) const {
    227  return -1;
    228 }
    229 
    230 int32_t AudioDeviceDummy::PlayoutDelay(uint16_t& /* delayMS */) const {
    231  return -1;
    232 }
    233 
    234 void AudioDeviceDummy::AttachAudioBuffer(AudioDeviceBuffer* /* audioBuffer */) {
    235 }
    236 }  // namespace webrtc