Android-cuttlefish cvd tool
Public Member Functions | Private Attributes | List of all members
cuttlefish::webrtc_streaming::CfAudioDeviceModule Class Reference

#include <audio_device.h>

Inheritance diagram for cuttlefish::webrtc_streaming::CfAudioDeviceModule:
Inheritance graph
[legend]
Collaboration diagram for cuttlefish::webrtc_streaming::CfAudioDeviceModule:
Collaboration graph
[legend]

Public Member Functions

 CfAudioDeviceModule ()
 
 ~CfAudioDeviceModule () override=default
 
int GetMoreAudioData (void *data, int bytes_per_samples, int samples_per_channel, int num_channels, int sample_rate, bool &muted) override
 
int32_t ActiveAudioLayer (AudioLayer *audioLayer) const override
 
int32_t RegisterAudioCallback (webrtc::AudioTransport *audio_callback) override
 
int32_t Init () override
 
int32_t Terminate () override
 
bool Initialized () const override
 
int16_t PlayoutDevices () override
 
int16_t RecordingDevices () override
 
int32_t PlayoutDeviceName (uint16_t index, char name[webrtc::kAdmMaxDeviceNameSize], char guid[webrtc::kAdmMaxGuidSize]) override
 
int32_t RecordingDeviceName (uint16_t index, char name[webrtc::kAdmMaxDeviceNameSize], char guid[webrtc::kAdmMaxGuidSize]) override
 
int32_t SetPlayoutDevice (uint16_t index) override
 
int32_t SetPlayoutDevice (WindowsDeviceType device) override
 
int32_t SetRecordingDevice (uint16_t index) override
 
int32_t SetRecordingDevice (WindowsDeviceType device) override
 
int32_t PlayoutIsAvailable (bool *available) override
 
int32_t InitPlayout () override
 
bool PlayoutIsInitialized () const override
 
int32_t RecordingIsAvailable (bool *available) override
 
int32_t InitRecording () override
 
bool RecordingIsInitialized () const override
 
int32_t StartPlayout () override
 
int32_t StopPlayout () override
 
bool Playing () const override
 
int32_t StartRecording () override
 
int32_t StopRecording () override
 
bool Recording () const override
 
int32_t InitSpeaker () override
 
bool SpeakerIsInitialized () const override
 
int32_t InitMicrophone () override
 
bool MicrophoneIsInitialized () const override
 
int32_t SpeakerVolumeIsAvailable (bool *available) override
 
int32_t SetSpeakerVolume (uint32_t volume) override
 
int32_t SpeakerVolume (uint32_t *volume) const override
 
int32_t MaxSpeakerVolume (uint32_t *maxVolume) const override
 
int32_t MinSpeakerVolume (uint32_t *minVolume) const override
 
int32_t MicrophoneVolumeIsAvailable (bool *available) override
 
int32_t SetMicrophoneVolume (uint32_t volume) override
 
int32_t MicrophoneVolume (uint32_t *volume) const override
 
int32_t MaxMicrophoneVolume (uint32_t *maxVolume) const override
 
int32_t MinMicrophoneVolume (uint32_t *minVolume) const override
 
int32_t SpeakerMuteIsAvailable (bool *available) override
 
int32_t SetSpeakerMute (bool enable) override
 
int32_t SpeakerMute (bool *enabled) const override
 
int32_t MicrophoneMuteIsAvailable (bool *available) override
 
int32_t SetMicrophoneMute (bool enable) override
 
int32_t MicrophoneMute (bool *enabled) const override
 
int32_t StereoPlayoutIsAvailable (bool *available) const override
 
int32_t SetStereoPlayout (bool enable) override
 
int32_t StereoPlayout (bool *enabled) const override
 
int32_t StereoRecordingIsAvailable (bool *available) const override
 
int32_t SetStereoRecording (bool enable) override
 
int32_t StereoRecording (bool *enabled) const override
 
int32_t PlayoutDelay (uint16_t *delayMS) const override
 
bool BuiltInAECIsAvailable () const override
 
bool BuiltInAGCIsAvailable () const override
 
bool BuiltInNSIsAvailable () const override
 
int32_t EnableBuiltInAEC (bool enable) override
 
int32_t EnableBuiltInAGC (bool enable) override
 
int32_t EnableBuiltInNS (bool enable) override
 
int32_t GetPlayoutUnderrunCount () const override
 
virtual int GetMoreAudioData (void *data, int bytes_per_sample, int samples_per_channel, int num_channels, int sample_rate, bool &muted)=0
 

Private Attributes

webrtc::AudioTransport * audio_callback_ = nullptr
 
bool stereo_playout_enabled_ = true
 
bool stereo_recording_enabled_ = true
 
std::atomic< bool > playing_ = false
 
std::atomic< bool > recording_ = false
 

Additional Inherited Members

- Protected Member Functions inherited from cuttlefish::webrtc_streaming::AudioSource
virtual ~AudioSource ()=default
 

Constructor & Destructor Documentation

◆ CfAudioDeviceModule()

cuttlefish::webrtc_streaming::CfAudioDeviceModule::CfAudioDeviceModule ( )

◆ ~CfAudioDeviceModule()

cuttlefish::webrtc_streaming::CfAudioDeviceModule::~CfAudioDeviceModule ( )
overridedefault

Member Function Documentation

◆ ActiveAudioLayer()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::ActiveAudioLayer ( AudioLayer *  audioLayer) const
override

◆ BuiltInAECIsAvailable()

bool cuttlefish::webrtc_streaming::CfAudioDeviceModule::BuiltInAECIsAvailable ( ) const
override

◆ BuiltInAGCIsAvailable()

bool cuttlefish::webrtc_streaming::CfAudioDeviceModule::BuiltInAGCIsAvailable ( ) const
override

◆ BuiltInNSIsAvailable()

bool cuttlefish::webrtc_streaming::CfAudioDeviceModule::BuiltInNSIsAvailable ( ) const
override

◆ EnableBuiltInAEC()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::EnableBuiltInAEC ( bool  enable)
override

◆ EnableBuiltInAGC()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::EnableBuiltInAGC ( bool  enable)
override

◆ EnableBuiltInNS()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::EnableBuiltInNS ( bool  enable)
override

◆ GetMoreAudioData()

int cuttlefish::webrtc_streaming::CfAudioDeviceModule::GetMoreAudioData ( void *  data,
int  bytes_per_samples,
int  samples_per_channel,
int  num_channels,
int  sample_rate,
bool &  muted 
)
overridevirtual

◆ GetPlayoutUnderrunCount()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::GetPlayoutUnderrunCount ( ) const
override

◆ Init()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::Init ( )
override

◆ Initialized()

bool cuttlefish::webrtc_streaming::CfAudioDeviceModule::Initialized ( ) const
override

◆ InitMicrophone()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::InitMicrophone ( )
override

◆ InitPlayout()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::InitPlayout ( )
override

◆ InitRecording()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::InitRecording ( )
override

◆ InitSpeaker()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::InitSpeaker ( )
override

◆ MaxMicrophoneVolume()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::MaxMicrophoneVolume ( uint32_t *  maxVolume) const
override

◆ MaxSpeakerVolume()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::MaxSpeakerVolume ( uint32_t *  maxVolume) const
override

◆ MicrophoneIsInitialized()

bool cuttlefish::webrtc_streaming::CfAudioDeviceModule::MicrophoneIsInitialized ( ) const
override

◆ MicrophoneMute()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::MicrophoneMute ( bool *  enabled) const
override

◆ MicrophoneMuteIsAvailable()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::MicrophoneMuteIsAvailable ( bool *  available)
override

◆ MicrophoneVolume()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::MicrophoneVolume ( uint32_t *  volume) const
override

◆ MicrophoneVolumeIsAvailable()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::MicrophoneVolumeIsAvailable ( bool *  available)
override

◆ MinMicrophoneVolume()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::MinMicrophoneVolume ( uint32_t *  minVolume) const
override

◆ MinSpeakerVolume()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::MinSpeakerVolume ( uint32_t *  minVolume) const
override

◆ Playing()

bool cuttlefish::webrtc_streaming::CfAudioDeviceModule::Playing ( ) const
override

◆ PlayoutDelay()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::PlayoutDelay ( uint16_t *  delayMS) const
override

◆ PlayoutDeviceName()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::PlayoutDeviceName ( uint16_t  index,
char  name[webrtc::kAdmMaxDeviceNameSize],
char  guid[webrtc::kAdmMaxGuidSize] 
)
override

◆ PlayoutDevices()

int16_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::PlayoutDevices ( )
override

◆ PlayoutIsAvailable()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::PlayoutIsAvailable ( bool *  available)
override

◆ PlayoutIsInitialized()

bool cuttlefish::webrtc_streaming::CfAudioDeviceModule::PlayoutIsInitialized ( ) const
override

◆ Recording()

bool cuttlefish::webrtc_streaming::CfAudioDeviceModule::Recording ( ) const
override

◆ RecordingDeviceName()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::RecordingDeviceName ( uint16_t  index,
char  name[webrtc::kAdmMaxDeviceNameSize],
char  guid[webrtc::kAdmMaxGuidSize] 
)
override

◆ RecordingDevices()

int16_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::RecordingDevices ( )
override

◆ RecordingIsAvailable()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::RecordingIsAvailable ( bool *  available)
override

◆ RecordingIsInitialized()

bool cuttlefish::webrtc_streaming::CfAudioDeviceModule::RecordingIsInitialized ( ) const
override

◆ RegisterAudioCallback()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::RegisterAudioCallback ( webrtc::AudioTransport *  audio_callback)
override

◆ SetMicrophoneMute()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::SetMicrophoneMute ( bool  enable)
override

◆ SetMicrophoneVolume()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::SetMicrophoneVolume ( uint32_t  volume)
override

◆ SetPlayoutDevice() [1/2]

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::SetPlayoutDevice ( uint16_t  index)
override

◆ SetPlayoutDevice() [2/2]

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::SetPlayoutDevice ( WindowsDeviceType  device)
override

◆ SetRecordingDevice() [1/2]

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::SetRecordingDevice ( uint16_t  index)
override

◆ SetRecordingDevice() [2/2]

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::SetRecordingDevice ( WindowsDeviceType  device)
override

◆ SetSpeakerMute()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::SetSpeakerMute ( bool  enable)
override

◆ SetSpeakerVolume()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::SetSpeakerVolume ( uint32_t  volume)
override

◆ SetStereoPlayout()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::SetStereoPlayout ( bool  enable)
override

◆ SetStereoRecording()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::SetStereoRecording ( bool  enable)
override

◆ SpeakerIsInitialized()

bool cuttlefish::webrtc_streaming::CfAudioDeviceModule::SpeakerIsInitialized ( ) const
override

◆ SpeakerMute()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::SpeakerMute ( bool *  enabled) const
override

◆ SpeakerMuteIsAvailable()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::SpeakerMuteIsAvailable ( bool *  available)
override

◆ SpeakerVolume()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::SpeakerVolume ( uint32_t *  volume) const
override

◆ SpeakerVolumeIsAvailable()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::SpeakerVolumeIsAvailable ( bool *  available)
override

◆ StartPlayout()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::StartPlayout ( )
override

◆ StartRecording()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::StartRecording ( )
override

◆ StereoPlayout()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::StereoPlayout ( bool *  enabled) const
override

◆ StereoPlayoutIsAvailable()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::StereoPlayoutIsAvailable ( bool *  available) const
override

◆ StereoRecording()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::StereoRecording ( bool *  enabled) const
override

◆ StereoRecordingIsAvailable()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::StereoRecordingIsAvailable ( bool *  available) const
override

◆ StopPlayout()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::StopPlayout ( )
override

◆ StopRecording()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::StopRecording ( )
override

◆ Terminate()

int32_t cuttlefish::webrtc_streaming::CfAudioDeviceModule::Terminate ( )
override

Member Data Documentation

◆ audio_callback_

webrtc::AudioTransport* cuttlefish::webrtc_streaming::CfAudioDeviceModule::audio_callback_ = nullptr
private

◆ playing_

std::atomic<bool> cuttlefish::webrtc_streaming::CfAudioDeviceModule::playing_ = false
private

◆ recording_

std::atomic<bool> cuttlefish::webrtc_streaming::CfAudioDeviceModule::recording_ = false
private

◆ stereo_playout_enabled_

bool cuttlefish::webrtc_streaming::CfAudioDeviceModule::stereo_playout_enabled_ = true
private

◆ stereo_recording_enabled_

bool cuttlefish::webrtc_streaming::CfAudioDeviceModule::stereo_recording_enabled_ = true
private

The documentation for this class was generated from the following files: