OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 |
11 #ifndef WEBRTC_AUDIO_DEVICE_AUDIO_MIXER_MANAGER_ALSA_LINUX_H | 11 #ifndef WEBRTC_AUDIO_DEVICE_AUDIO_MIXER_MANAGER_ALSA_LINUX_H |
12 #define WEBRTC_AUDIO_DEVICE_AUDIO_MIXER_MANAGER_ALSA_LINUX_H | 12 #define WEBRTC_AUDIO_DEVICE_AUDIO_MIXER_MANAGER_ALSA_LINUX_H |
13 | 13 |
| 14 #include "webrtc/base/criticalsection.h" |
14 #include "webrtc/modules/audio_device/include/audio_device.h" | 15 #include "webrtc/modules/audio_device/include/audio_device.h" |
15 #include "webrtc/modules/audio_device/linux/alsasymboltable_linux.h" | 16 #include "webrtc/modules/audio_device/linux/alsasymboltable_linux.h" |
16 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" | |
17 #include "webrtc/typedefs.h" | 17 #include "webrtc/typedefs.h" |
18 | 18 |
19 #include <alsa/asoundlib.h> | 19 #include <alsa/asoundlib.h> |
20 | 20 |
21 namespace webrtc | 21 namespace webrtc |
22 { | 22 { |
23 | 23 |
24 class AudioMixerManagerLinuxALSA | 24 class AudioMixerManagerLinuxALSA |
25 { | 25 { |
26 public: | 26 public: |
(...skipping 29 matching lines...) Expand all Loading... |
56 public: | 56 public: |
57 AudioMixerManagerLinuxALSA(const int32_t id); | 57 AudioMixerManagerLinuxALSA(const int32_t id); |
58 ~AudioMixerManagerLinuxALSA(); | 58 ~AudioMixerManagerLinuxALSA(); |
59 | 59 |
60 private: | 60 private: |
61 int32_t LoadMicMixerElement() const; | 61 int32_t LoadMicMixerElement() const; |
62 int32_t LoadSpeakerMixerElement() const; | 62 int32_t LoadSpeakerMixerElement() const; |
63 void GetControlName(char *controlName, char* deviceName) const; | 63 void GetControlName(char *controlName, char* deviceName) const; |
64 | 64 |
65 private: | 65 private: |
66 CriticalSectionWrapper& _critSect; | 66 rtc::CriticalSection _critSect; |
67 int32_t _id; | 67 int32_t _id; |
68 mutable snd_mixer_t* _outputMixerHandle; | 68 mutable snd_mixer_t* _outputMixerHandle; |
69 char _outputMixerStr[kAdmMaxDeviceNameSize]; | 69 char _outputMixerStr[kAdmMaxDeviceNameSize]; |
70 mutable snd_mixer_t* _inputMixerHandle; | 70 mutable snd_mixer_t* _inputMixerHandle; |
71 char _inputMixerStr[kAdmMaxDeviceNameSize]; | 71 char _inputMixerStr[kAdmMaxDeviceNameSize]; |
72 mutable snd_mixer_elem_t* _outputMixerElement; | 72 mutable snd_mixer_elem_t* _outputMixerElement; |
73 mutable snd_mixer_elem_t* _inputMixerElement; | 73 mutable snd_mixer_elem_t* _inputMixerElement; |
74 }; | 74 }; |
75 | 75 |
76 } | 76 } |
77 | 77 |
78 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_MIXER_MANAGER_ALSA_LINUX
_H_ | 78 #endif // MODULES_AUDIO_DEVICE_MAIN_SOURCE_LINUX_AUDIO_MIXER_MANAGER_ALSA_LINUX
_H_ |
OLD | NEW |