OLD | NEW |
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // Set this const to 1 to account for peeked and used data in latency calculatio
n | 88 // Set this const to 1 to account for peeked and used data in latency calculatio
n |
89 const uint32_t WEBRTC_PA_CAPTURE_BUFFER_LATENCY_ADJUSTMENT = 0; | 89 const uint32_t WEBRTC_PA_CAPTURE_BUFFER_LATENCY_ADJUSTMENT = 0; |
90 | 90 |
91 namespace webrtc | 91 namespace webrtc |
92 { | 92 { |
93 class EventWrapper; | 93 class EventWrapper; |
94 | 94 |
95 class AudioDeviceLinuxPulse: public AudioDeviceGeneric | 95 class AudioDeviceLinuxPulse: public AudioDeviceGeneric |
96 { | 96 { |
97 public: | 97 public: |
98 AudioDeviceLinuxPulse(const int32_t id); | 98 AudioDeviceLinuxPulse(); |
99 virtual ~AudioDeviceLinuxPulse(); | 99 virtual ~AudioDeviceLinuxPulse(); |
100 | 100 |
101 // Retrieve the currently utilized audio layer | 101 // Retrieve the currently utilized audio layer |
102 int32_t ActiveAudioLayer( | 102 int32_t ActiveAudioLayer( |
103 AudioDeviceModule::AudioLayer& audioLayer) const override; | 103 AudioDeviceModule::AudioLayer& audioLayer) const override; |
104 | 104 |
105 // Main initializaton and termination | 105 // Main initializaton and termination |
106 InitStatus Init() override; | 106 InitStatus Init() override; |
107 int32_t Terminate() override; | 107 int32_t Terminate() override; |
108 bool Initialized() const override; | 108 bool Initialized() const override; |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 | 282 |
283 rtc::CriticalSection _critSect; | 283 rtc::CriticalSection _critSect; |
284 EventWrapper& _timeEventRec; | 284 EventWrapper& _timeEventRec; |
285 EventWrapper& _timeEventPlay; | 285 EventWrapper& _timeEventPlay; |
286 EventWrapper& _recStartEvent; | 286 EventWrapper& _recStartEvent; |
287 EventWrapper& _playStartEvent; | 287 EventWrapper& _playStartEvent; |
288 | 288 |
289 // TODO(pbos): Remove unique_ptr and use directly without resetting. | 289 // TODO(pbos): Remove unique_ptr and use directly without resetting. |
290 std::unique_ptr<rtc::PlatformThread> _ptrThreadPlay; | 290 std::unique_ptr<rtc::PlatformThread> _ptrThreadPlay; |
291 std::unique_ptr<rtc::PlatformThread> _ptrThreadRec; | 291 std::unique_ptr<rtc::PlatformThread> _ptrThreadRec; |
292 int32_t _id; | |
293 | 292 |
294 AudioMixerManagerLinuxPulse _mixerManager; | 293 AudioMixerManagerLinuxPulse _mixerManager; |
295 | 294 |
296 uint16_t _inputDeviceIndex; | 295 uint16_t _inputDeviceIndex; |
297 uint16_t _outputDeviceIndex; | 296 uint16_t _outputDeviceIndex; |
298 bool _inputDeviceIsSpecified; | 297 bool _inputDeviceIsSpecified; |
299 bool _outputDeviceIsSpecified; | 298 bool _outputDeviceIsSpecified; |
300 | 299 |
301 int sample_rate_hz_; | 300 int sample_rate_hz_; |
302 uint8_t _recChannels; | 301 uint8_t _recChannels; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 pa_buffer_attr _playBufferAttr; | 368 pa_buffer_attr _playBufferAttr; |
370 pa_buffer_attr _recBufferAttr; | 369 pa_buffer_attr _recBufferAttr; |
371 | 370 |
372 char _oldKeyState[32]; | 371 char _oldKeyState[32]; |
373 Display* _XDisplay; | 372 Display* _XDisplay; |
374 }; | 373 }; |
375 | 374 |
376 } | 375 } |
377 | 376 |
378 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_DEVICE_PULSE_LINUX_H_ | 377 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_DEVICE_PULSE_LINUX_H_ |
OLD | NEW |