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

Side by Side Diff: webrtc/modules/audio_device/mac/audio_device_mac.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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 virtual bool SpeakerIsInitialized() const; 116 virtual bool SpeakerIsInitialized() const;
117 virtual int32_t InitMicrophone(); 117 virtual int32_t InitMicrophone();
118 virtual bool MicrophoneIsInitialized() const; 118 virtual bool MicrophoneIsInitialized() const;
119 119
120 // Speaker volume controls 120 // Speaker volume controls
121 virtual int32_t SpeakerVolumeIsAvailable(bool& available); 121 virtual int32_t SpeakerVolumeIsAvailable(bool& available);
122 virtual int32_t SetSpeakerVolume(uint32_t volume); 122 virtual int32_t SetSpeakerVolume(uint32_t volume);
123 virtual int32_t SpeakerVolume(uint32_t& volume) const; 123 virtual int32_t SpeakerVolume(uint32_t& volume) const;
124 virtual int32_t MaxSpeakerVolume(uint32_t& maxVolume) const; 124 virtual int32_t MaxSpeakerVolume(uint32_t& maxVolume) const;
125 virtual int32_t MinSpeakerVolume(uint32_t& minVolume) const; 125 virtual int32_t MinSpeakerVolume(uint32_t& minVolume) const;
126 virtual int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const;
127 126
128 // Microphone volume controls 127 // Microphone volume controls
129 virtual int32_t MicrophoneVolumeIsAvailable(bool& available); 128 virtual int32_t MicrophoneVolumeIsAvailable(bool& available);
130 virtual int32_t SetMicrophoneVolume(uint32_t volume); 129 virtual int32_t SetMicrophoneVolume(uint32_t volume);
131 virtual int32_t MicrophoneVolume(uint32_t& volume) const; 130 virtual int32_t MicrophoneVolume(uint32_t& volume) const;
132 virtual int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const; 131 virtual int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const;
133 virtual int32_t MinMicrophoneVolume(uint32_t& minVolume) const; 132 virtual int32_t MinMicrophoneVolume(uint32_t& minVolume) const;
134 virtual int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const;
135 133
136 // Microphone mute control 134 // Microphone mute control
137 virtual int32_t MicrophoneMuteIsAvailable(bool& available); 135 virtual int32_t MicrophoneMuteIsAvailable(bool& available);
138 virtual int32_t SetMicrophoneMute(bool enable); 136 virtual int32_t SetMicrophoneMute(bool enable);
139 virtual int32_t MicrophoneMute(bool& enabled) const; 137 virtual int32_t MicrophoneMute(bool& enabled) const;
140 138
141 // Speaker mute control 139 // Speaker mute control
142 virtual int32_t SpeakerMuteIsAvailable(bool& available); 140 virtual int32_t SpeakerMuteIsAvailable(bool& available);
143 virtual int32_t SetSpeakerMute(bool enable); 141 virtual int32_t SetSpeakerMute(bool enable);
144 virtual int32_t SpeakerMute(bool& enabled) const; 142 virtual int32_t SpeakerMute(bool& enabled) const;
145 143
146 // Microphone boost control
147 virtual int32_t MicrophoneBoostIsAvailable(bool& available);
148 virtual int32_t SetMicrophoneBoost(bool enable);
149 virtual int32_t MicrophoneBoost(bool& enabled) const;
150
151 // Stereo support 144 // Stereo support
152 virtual int32_t StereoPlayoutIsAvailable(bool& available); 145 virtual int32_t StereoPlayoutIsAvailable(bool& available);
153 virtual int32_t SetStereoPlayout(bool enable); 146 virtual int32_t SetStereoPlayout(bool enable);
154 virtual int32_t StereoPlayout(bool& enabled) const; 147 virtual int32_t StereoPlayout(bool& enabled) const;
155 virtual int32_t StereoRecordingIsAvailable(bool& available); 148 virtual int32_t StereoRecordingIsAvailable(bool& available);
156 virtual int32_t SetStereoRecording(bool enable); 149 virtual int32_t SetStereoRecording(bool enable);
157 virtual int32_t StereoRecording(bool& enabled) const; 150 virtual int32_t StereoRecording(bool& enabled) const;
158 151
159 // Delay information and control 152 // Delay information and control
160 virtual int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
161 uint16_t sizeMS);
162 virtual int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
163 uint16_t& sizeMS) const;
164 virtual int32_t PlayoutDelay(uint16_t& delayMS) const; 153 virtual int32_t PlayoutDelay(uint16_t& delayMS) const;
165 virtual int32_t RecordingDelay(uint16_t& delayMS) const; 154 virtual int32_t RecordingDelay(uint16_t& delayMS) const;
166 155
167 // CPU load
168 virtual int32_t CPULoad(uint16_t& load) const;
169
170 virtual bool PlayoutWarning() const; 156 virtual bool PlayoutWarning() const;
171 virtual bool PlayoutError() const; 157 virtual bool PlayoutError() const;
172 virtual bool RecordingWarning() const; 158 virtual bool RecordingWarning() const;
173 virtual bool RecordingError() const; 159 virtual bool RecordingError() const;
174 virtual void ClearPlayoutWarning(); 160 virtual void ClearPlayoutWarning();
175 virtual void ClearPlayoutError(); 161 virtual void ClearPlayoutError();
176 virtual void ClearRecordingWarning(); 162 virtual void ClearRecordingWarning();
177 virtual void ClearRecordingError(); 163 virtual void ClearRecordingError();
178 164
179 virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer); 165 virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 bool _outputDeviceIsSpecified; 291 bool _outputDeviceIsSpecified;
306 292
307 uint8_t _recChannels; 293 uint8_t _recChannels;
308 uint8_t _playChannels; 294 uint8_t _playChannels;
309 295
310 Float32* _captureBufData; 296 Float32* _captureBufData;
311 SInt16* _renderBufData; 297 SInt16* _renderBufData;
312 298
313 SInt16 _renderConvertData[PLAY_BUF_SIZE_IN_SAMPLES]; 299 SInt16 _renderConvertData[PLAY_BUF_SIZE_IN_SAMPLES];
314 300
315 AudioDeviceModule::BufferType _playBufType;
316
317 bool _initialized; 301 bool _initialized;
318 bool _isShutDown; 302 bool _isShutDown;
319 bool _recording; 303 bool _recording;
320 bool _playing; 304 bool _playing;
321 bool _recIsInitialized; 305 bool _recIsInitialized;
322 bool _playIsInitialized; 306 bool _playIsInitialized;
323 bool _AGC; 307 bool _AGC;
324 308
325 // Atomically set varaibles 309 // Atomically set varaibles
326 int32_t _renderDeviceIsAlive; 310 int32_t _renderDeviceIsAlive;
(...skipping 15 matching lines...) Expand all
342 326
343 uint32_t _captureLatencyUs; 327 uint32_t _captureLatencyUs;
344 uint32_t _renderLatencyUs; 328 uint32_t _renderLatencyUs;
345 329
346 // Atomically set variables 330 // Atomically set variables
347 mutable int32_t _captureDelayUs; 331 mutable int32_t _captureDelayUs;
348 mutable int32_t _renderDelayUs; 332 mutable int32_t _renderDelayUs;
349 333
350 int32_t _renderDelayOffsetSamples; 334 int32_t _renderDelayOffsetSamples;
351 335
352 uint16_t _playBufDelayFixed; // fixed playback delay
353
354 uint16_t _playWarning; 336 uint16_t _playWarning;
355 uint16_t _playError; 337 uint16_t _playError;
356 uint16_t _recWarning; 338 uint16_t _recWarning;
357 uint16_t _recError; 339 uint16_t _recError;
358 340
359 PaUtilRingBuffer* _paCaptureBuffer; 341 PaUtilRingBuffer* _paCaptureBuffer;
360 PaUtilRingBuffer* _paRenderBuffer; 342 PaUtilRingBuffer* _paRenderBuffer;
361 343
362 semaphore_t _renderSemaphore; 344 semaphore_t _renderSemaphore;
363 semaphore_t _captureSemaphore; 345 semaphore_t _captureSemaphore;
364 346
365 int _captureBufSizeSamples; 347 int _captureBufSizeSamples;
366 int _renderBufSizeSamples; 348 int _renderBufSizeSamples;
367 349
368 // Typing detection 350 // Typing detection
369 // 0x5c is key "9", after that comes function keys. 351 // 0x5c is key "9", after that comes function keys.
370 bool prev_key_state_[0x5d]; 352 bool prev_key_state_[0x5d];
371 353
372 int get_mic_volume_counter_ms_; 354 int get_mic_volume_counter_ms_;
373 }; 355 };
374 356
375 } // namespace webrtc 357 } // namespace webrtc
376 358
377 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_MAC_AUDIO_DEVICE_MAC_H_ 359 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_MAC_AUDIO_DEVICE_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698