Revert 6090 "Removes parts of the webrtc::VoEHardwareMedia sub A..."
> Removes parts of the webrtc::VoEHardwareMedia sub API as part of a clean-up operation where the goal is to remove unused APIs. > > BUG=3206 > R=andrew@webrtc.org, niklas.enbom@webrtc.org > > Review URL: https://webrtc-codereview.appspot.com/18399004 TBR=henrika@webrtc.org Review URL: https://webrtc-codereview.appspot.com/15459004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6091 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -70,6 +70,12 @@ public:
|
||||
virtual int GetPlayoutDeviceName(int index, char strNameUTF8[128],
|
||||
char strGuidUTF8[128]) = 0;
|
||||
|
||||
// Checks if the sound card is available to be opened for recording.
|
||||
virtual int GetRecordingDeviceStatus(bool& isAvailable) = 0;
|
||||
|
||||
// Checks if the sound card is available to be opened for playout.
|
||||
virtual int GetPlayoutDeviceStatus(bool& isAvailable) = 0;
|
||||
|
||||
// Sets the audio device used for recording.
|
||||
virtual int SetRecordingDevice(
|
||||
int index, StereoChannel recordingChannel = kStereoBoth) = 0;
|
||||
@ -83,24 +89,47 @@ public:
|
||||
// Gets the currently used (active) audio device layer.
|
||||
virtual int GetAudioDeviceLayer(AudioLayers& audioLayer) = 0;
|
||||
|
||||
// Gets the VoiceEngine's current CPU consumption in terms of the percent
|
||||
// of total CPU availability. [Windows only]
|
||||
virtual int GetCPULoad(int& loadPercent) = 0;
|
||||
|
||||
// Not supported
|
||||
virtual int ResetAudioDevice() = 0;
|
||||
|
||||
// Not supported
|
||||
virtual int AudioDeviceControl(
|
||||
unsigned int par1, unsigned int par2, unsigned int par3) = 0;
|
||||
|
||||
// Not supported
|
||||
virtual int SetLoudspeakerStatus(bool enable) = 0;
|
||||
|
||||
// Not supported
|
||||
virtual int GetLoudspeakerStatus(bool& enabled) = 0;
|
||||
|
||||
// Native sample rate controls (samples/sec)
|
||||
virtual int SetRecordingSampleRate(unsigned int samples_per_sec) = 0;
|
||||
virtual int RecordingSampleRate(unsigned int* samples_per_sec) const = 0;
|
||||
virtual int SetPlayoutSampleRate(unsigned int samples_per_sec) = 0;
|
||||
virtual int PlayoutSampleRate(unsigned int* samples_per_sec) const = 0;
|
||||
|
||||
// To be removed. Don't use.
|
||||
virtual int EnableBuiltInAEC(bool enable) { return -1; }
|
||||
virtual bool BuiltInAECIsEnabled() const { return -1; }
|
||||
virtual int GetRecordingDeviceStatus(bool& isAvailable) { return -1; }
|
||||
virtual int GetPlayoutDeviceStatus(bool& isAvailable) { return -1; }
|
||||
virtual int ResetAudioDevice() { return -1; }
|
||||
virtual int AudioDeviceControl(unsigned int par1, unsigned int par2,
|
||||
unsigned int par3) { return -1; }
|
||||
virtual int SetLoudspeakerStatus(bool enable) { return -1; }
|
||||
virtual int GetLoudspeakerStatus(bool& enabled) { return -1; }
|
||||
virtual int GetCPULoad(int& loadPercent) { return -1; }
|
||||
|
||||
// *Experimental - not recommended for use.*
|
||||
// Enables the Windows Core Audio built-in AEC. Fails on other platforms.
|
||||
//
|
||||
// Currently incompatible with the standard VoE AEC and AGC; don't attempt
|
||||
// to enable them while this is active.
|
||||
//
|
||||
// Must be called before VoEBase::StartSend(). When enabled:
|
||||
// 1. VoEBase::StartPlayout() must be called before VoEBase::StartSend().
|
||||
// 2. VoEBase::StopSend() should be called before VoEBase::StopPlayout().
|
||||
// The reverse order may cause garbage audio to be rendered or the
|
||||
// capture side to halt until StopSend() is called.
|
||||
//
|
||||
// As a consequence, SetPlayoutDevice() should be used with caution
|
||||
// during a call. It will function, but may cause the above issues for
|
||||
// the duration it takes to complete. (In practice, it should complete
|
||||
// fast enough to avoid audible degradation).
|
||||
virtual int EnableBuiltInAEC(bool enable) = 0;
|
||||
virtual bool BuiltInAECIsEnabled() const = 0;
|
||||
|
||||
protected:
|
||||
VoEHardware() {}
|
||||
|
||||
Reference in New Issue
Block a user