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

Side by Side Diff: webrtc/modules/audio_device/dummy/file_audio_device.h

Issue 3006803002: Removes unused APIs from the ADM (part II) (Closed)
Patch Set: nit Created 3 years, 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 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 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 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 bool SpeakerIsInitialized() const override; 95 bool SpeakerIsInitialized() const override;
96 int32_t InitMicrophone() override; 96 int32_t InitMicrophone() override;
97 bool MicrophoneIsInitialized() const override; 97 bool MicrophoneIsInitialized() const override;
98 98
99 // Speaker volume controls 99 // Speaker volume controls
100 int32_t SpeakerVolumeIsAvailable(bool& available) override; 100 int32_t SpeakerVolumeIsAvailable(bool& available) override;
101 int32_t SetSpeakerVolume(uint32_t volume) override; 101 int32_t SetSpeakerVolume(uint32_t volume) override;
102 int32_t SpeakerVolume(uint32_t& volume) const override; 102 int32_t SpeakerVolume(uint32_t& volume) const override;
103 int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override; 103 int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override;
104 int32_t MinSpeakerVolume(uint32_t& minVolume) const override; 104 int32_t MinSpeakerVolume(uint32_t& minVolume) const override;
105 int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override;
106 105
107 // Microphone volume controls 106 // Microphone volume controls
108 int32_t MicrophoneVolumeIsAvailable(bool& available) override; 107 int32_t MicrophoneVolumeIsAvailable(bool& available) override;
109 int32_t SetMicrophoneVolume(uint32_t volume) override; 108 int32_t SetMicrophoneVolume(uint32_t volume) override;
110 int32_t MicrophoneVolume(uint32_t& volume) const override; 109 int32_t MicrophoneVolume(uint32_t& volume) const override;
111 int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override; 110 int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override;
112 int32_t MinMicrophoneVolume(uint32_t& minVolume) const override; 111 int32_t MinMicrophoneVolume(uint32_t& minVolume) const override;
113 int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override;
114 112
115 // Speaker mute control 113 // Speaker mute control
116 int32_t SpeakerMuteIsAvailable(bool& available) override; 114 int32_t SpeakerMuteIsAvailable(bool& available) override;
117 int32_t SetSpeakerMute(bool enable) override; 115 int32_t SetSpeakerMute(bool enable) override;
118 int32_t SpeakerMute(bool& enabled) const override; 116 int32_t SpeakerMute(bool& enabled) const override;
119 117
120 // Microphone mute control 118 // Microphone mute control
121 int32_t MicrophoneMuteIsAvailable(bool& available) override; 119 int32_t MicrophoneMuteIsAvailable(bool& available) override;
122 int32_t SetMicrophoneMute(bool enable) override; 120 int32_t SetMicrophoneMute(bool enable) override;
123 int32_t MicrophoneMute(bool& enabled) const override; 121 int32_t MicrophoneMute(bool& enabled) const override;
124 122
125 // Microphone boost control
126 int32_t MicrophoneBoostIsAvailable(bool& available) override;
127 int32_t SetMicrophoneBoost(bool enable) override;
128 int32_t MicrophoneBoost(bool& enabled) const override;
129
130 // Stereo support 123 // Stereo support
131 int32_t StereoPlayoutIsAvailable(bool& available) override; 124 int32_t StereoPlayoutIsAvailable(bool& available) override;
132 int32_t SetStereoPlayout(bool enable) override; 125 int32_t SetStereoPlayout(bool enable) override;
133 int32_t StereoPlayout(bool& enabled) const override; 126 int32_t StereoPlayout(bool& enabled) const override;
134 int32_t StereoRecordingIsAvailable(bool& available) override; 127 int32_t StereoRecordingIsAvailable(bool& available) override;
135 int32_t SetStereoRecording(bool enable) override; 128 int32_t SetStereoRecording(bool enable) override;
136 int32_t StereoRecording(bool& enabled) const override; 129 int32_t StereoRecording(bool& enabled) const override;
137 130
138 // Delay information and control 131 // Delay information and control
139 int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
140 uint16_t sizeMS) override;
141 int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
142 uint16_t& sizeMS) const override;
143 int32_t PlayoutDelay(uint16_t& delayMS) const override; 132 int32_t PlayoutDelay(uint16_t& delayMS) const override;
144 int32_t RecordingDelay(uint16_t& delayMS) const override; 133 int32_t RecordingDelay(uint16_t& delayMS) const override;
145 134
146 // CPU load
147 int32_t CPULoad(uint16_t& load) const override;
148
149 bool PlayoutWarning() const override; 135 bool PlayoutWarning() const override;
150 bool PlayoutError() const override; 136 bool PlayoutError() const override;
151 bool RecordingWarning() const override; 137 bool RecordingWarning() const override;
152 bool RecordingError() const override; 138 bool RecordingError() const override;
153 void ClearPlayoutWarning() override; 139 void ClearPlayoutWarning() override;
154 void ClearPlayoutError() override; 140 void ClearPlayoutError() override;
155 void ClearRecordingWarning() override; 141 void ClearRecordingWarning() override;
156 void ClearRecordingError() override; 142 void ClearRecordingError() override;
157 143
158 void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override; 144 void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override;
159 145
160 private: 146 private:
161 static bool RecThreadFunc(void*); 147 static bool RecThreadFunc(void*);
162 static bool PlayThreadFunc(void*); 148 static bool PlayThreadFunc(void*);
163 bool RecThreadProcess(); 149 bool RecThreadProcess();
164 bool PlayThreadProcess(); 150 bool PlayThreadProcess();
165 151
166 int32_t _playout_index; 152 int32_t _playout_index;
167 int32_t _record_index; 153 int32_t _record_index;
168 AudioDeviceModule::BufferType _playBufType;
169 AudioDeviceBuffer* _ptrAudioBuffer; 154 AudioDeviceBuffer* _ptrAudioBuffer;
170 int8_t* _recordingBuffer; // In bytes. 155 int8_t* _recordingBuffer; // In bytes.
171 int8_t* _playoutBuffer; // In bytes. 156 int8_t* _playoutBuffer; // In bytes.
172 uint32_t _recordingFramesLeft; 157 uint32_t _recordingFramesLeft;
173 uint32_t _playoutFramesLeft; 158 uint32_t _playoutFramesLeft;
174 rtc::CriticalSection _critSect; 159 rtc::CriticalSection _critSect;
175 160
176 size_t _recordingBufferSizeIn10MS; 161 size_t _recordingBufferSizeIn10MS;
177 size_t _recordingFramesIn10MS; 162 size_t _recordingFramesIn10MS;
178 size_t _playoutFramesIn10MS; 163 size_t _playoutFramesIn10MS;
179 164
180 // TODO(pbos): Make plain members instead of pointers and stop resetting them. 165 // TODO(pbos): Make plain members instead of pointers and stop resetting them.
181 std::unique_ptr<rtc::PlatformThread> _ptrThreadRec; 166 std::unique_ptr<rtc::PlatformThread> _ptrThreadRec;
182 std::unique_ptr<rtc::PlatformThread> _ptrThreadPlay; 167 std::unique_ptr<rtc::PlatformThread> _ptrThreadPlay;
183 168
184 bool _playing; 169 bool _playing;
185 bool _recording; 170 bool _recording;
186 int64_t _lastCallPlayoutMillis; 171 int64_t _lastCallPlayoutMillis;
187 int64_t _lastCallRecordMillis; 172 int64_t _lastCallRecordMillis;
188 173
189 FileWrapper& _outputFile; 174 FileWrapper& _outputFile;
190 FileWrapper& _inputFile; 175 FileWrapper& _inputFile;
191 std::string _outputFilename; 176 std::string _outputFilename;
192 std::string _inputFilename; 177 std::string _inputFilename;
193 }; 178 };
194 179
195 } // namespace webrtc 180 } // namespace webrtc
196 181
197 #endif // WEBRTC_AUDIO_DEVICE_FILE_AUDIO_DEVICE_H 182 #endif // WEBRTC_AUDIO_DEVICE_FILE_AUDIO_DEVICE_H
OLDNEW
« no previous file with comments | « webrtc/modules/audio_device/dummy/audio_device_dummy.cc ('k') | webrtc/modules/audio_device/dummy/file_audio_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698