Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: webrtc/modules/audio_device/include/audio_device.h

Issue 3006803002: Removes unused APIs from the ADM (part II) (Closed)
Patch Set: nit Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_device/include/audio_device.h
diff --git a/webrtc/modules/audio_device/include/audio_device.h b/webrtc/modules/audio_device/include/audio_device.h
index a1276d939203fd238a5c39bf70ffe1e2b4eb6c0b..1eedf1eef201584982fe339d2ca9271e84a9b8da 100644
--- a/webrtc/modules/audio_device/include/audio_device.h
+++ b/webrtc/modules/audio_device/include/audio_device.h
@@ -40,6 +40,8 @@ class AudioDeviceModule : public RefCountedModule {
kDefaultDevice = -2
};
+ // Deprecated.
+ // TODO(henrika): to be removed.
enum BufferType {
kFixedBufferSize = 0,
kAdaptiveBufferSize = 1
@@ -127,7 +129,9 @@ class AudioDeviceModule : public RefCountedModule {
virtual int32_t SpeakerVolume(uint32_t* volume) const = 0;
virtual int32_t MaxSpeakerVolume(uint32_t* maxVolume) const = 0;
virtual int32_t MinSpeakerVolume(uint32_t* minVolume) const = 0;
- virtual int32_t SpeakerVolumeStepSize(uint16_t* stepSize) const = 0;
+ // Deprecated.
+ // TODO(henrika): to be removed.
+ virtual int32_t SpeakerVolumeStepSize(uint16_t* stepSize) const { return -1; }
// Microphone volume controls
virtual int32_t MicrophoneVolumeIsAvailable(bool* available) = 0;
@@ -135,7 +139,11 @@ class AudioDeviceModule : public RefCountedModule {
virtual int32_t MicrophoneVolume(uint32_t* volume) const = 0;
virtual int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const = 0;
virtual int32_t MinMicrophoneVolume(uint32_t* minVolume) const = 0;
- virtual int32_t MicrophoneVolumeStepSize(uint16_t* stepSize) const = 0;
+ // Deprecated.
+ // TODO(henrika): to be removed.
+ virtual int32_t MicrophoneVolumeStepSize(uint16_t* stepSize) const {
+ return -1;
+ }
// Speaker mute control
virtual int32_t SpeakerMuteIsAvailable(bool* available) = 0;
@@ -147,10 +155,11 @@ class AudioDeviceModule : public RefCountedModule {
virtual int32_t SetMicrophoneMute(bool enable) = 0;
virtual int32_t MicrophoneMute(bool* enabled) const = 0;
- // Microphone boost control
- virtual int32_t MicrophoneBoostIsAvailable(bool* available) = 0;
- virtual int32_t SetMicrophoneBoost(bool enable) = 0;
- virtual int32_t MicrophoneBoost(bool* enabled) const = 0;
+ // Deprecated.
+ // TODO(henrika): to be removed.
+ virtual int32_t MicrophoneBoostIsAvailable(bool* available) { return -1; }
+ virtual int32_t SetMicrophoneBoost(bool enable) { return -1; }
+ virtual int32_t MicrophoneBoost(bool* enabled) const { return -1; }
// Stereo support
virtual int32_t StereoPlayoutIsAvailable(bool* available) const = 0;
@@ -162,23 +171,29 @@ class AudioDeviceModule : public RefCountedModule {
virtual int32_t SetRecordingChannel(const ChannelType channel) = 0;
virtual int32_t RecordingChannel(ChannelType* channel) const = 0;
- // Delay information and control
+ // Deprecated.
+ // TODO(henrika): to be removed.
virtual int32_t SetPlayoutBuffer(const BufferType type,
- uint16_t sizeMS = 0) = 0;
- virtual int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const = 0;
+ uint16_t sizeMS = 0) { return -1; }
+ virtual int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const {
+ return -1;
+ }
+ // Delay information and control
virtual int32_t PlayoutDelay(uint16_t* delayMS) const = 0;
virtual int32_t RecordingDelay(uint16_t* delayMS) const = 0;
- // CPU load
- virtual int32_t CPULoad(uint16_t* load) const = 0;
+ // Deprecated.
+ // TODO(henrika): to be removed.
+ virtual int32_t CPULoad(uint16_t* load) const { return -1; }
- // Recording of raw PCM data
+ // Deprecated.
+ // TODO(henrika): to be removed.
virtual int32_t StartRawOutputFileRecording(
- const char pcmFileNameUTF8[kAdmMaxFileNameSize]) = 0;
- virtual int32_t StopRawOutputFileRecording() = 0;
+ const char pcmFileNameUTF8[kAdmMaxFileNameSize]) { return -1; }
+ virtual int32_t StopRawOutputFileRecording() { return -1; }
virtual int32_t StartRawInputFileRecording(
- const char pcmFileNameUTF8[kAdmMaxFileNameSize]) = 0;
- virtual int32_t StopRawInputFileRecording() = 0;
+ const char pcmFileNameUTF8[kAdmMaxFileNameSize]) { return -1; }
+ virtual int32_t StopRawInputFileRecording() { return -1; }
// Native sample rate controls (samples/sec)
virtual int32_t SetRecordingSampleRate(const uint32_t samplesPerSec) = 0;
@@ -186,8 +201,11 @@ class AudioDeviceModule : public RefCountedModule {
virtual int32_t SetPlayoutSampleRate(const uint32_t samplesPerSec) = 0;
virtual int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const = 0;
+ // Deprecated.
+ // TODO(henrika): to be removed.
+ virtual int32_t ResetAudioDevice() { return -1; }
+
// Mobile device specific functions
- virtual int32_t ResetAudioDevice() = 0;
virtual int32_t SetLoudspeakerStatus(bool enable) = 0;
virtual int32_t GetLoudspeakerStatus(bool* enabled) const = 0;
« no previous file with comments | « webrtc/modules/audio_device/dummy/file_audio_device.cc ('k') | webrtc/modules/audio_device/include/fake_audio_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698