OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_CHROMEOS_PULSE_AUDIO_MIXER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_PULSE_AUDIO_MIXER_H_ |
6 #define CHROME_BROWSER_CHROMEOS_PULSE_AUDIO_MIXER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_PULSE_AUDIO_MIXER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/lock.h" | |
12 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
| 12 #include "base/synchronization/lock.h" |
13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
14 | 14 |
15 struct pa_context; | 15 struct pa_context; |
16 struct pa_cvolume; | 16 struct pa_cvolume; |
17 struct pa_threaded_mainloop; | 17 struct pa_threaded_mainloop; |
18 struct pa_operation; | 18 struct pa_operation; |
19 struct pa_sink_info; | 19 struct pa_sink_info; |
20 | 20 |
21 namespace chromeos { | 21 namespace chromeos { |
22 | 22 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 // The PulseAudio index of the main device being used. | 122 // The PulseAudio index of the main device being used. |
123 int device_id_; | 123 int device_id_; |
124 | 124 |
125 // Set to the number of channels on the main device. | 125 // Set to the number of channels on the main device. |
126 int last_channels_; | 126 int last_channels_; |
127 | 127 |
128 // For informational purposes only, just used to assert lock is held. | 128 // For informational purposes only, just used to assert lock is held. |
129 mutable int mainloop_lock_count_; | 129 mutable int mainloop_lock_count_; |
130 | 130 |
131 mutable Lock mixer_state_lock_; | 131 mutable base::Lock mixer_state_lock_; |
132 mutable State mixer_state_; | 132 mutable State mixer_state_; |
133 | 133 |
134 // Cached contexts for use in PulseAudio calls. | 134 // Cached contexts for use in PulseAudio calls. |
135 pa_context* pa_context_; | 135 pa_context* pa_context_; |
136 pa_threaded_mainloop* pa_mainloop_; | 136 pa_threaded_mainloop* pa_mainloop_; |
137 | 137 |
138 scoped_ptr<base::Thread> thread_; | 138 scoped_ptr<base::Thread> thread_; |
139 | 139 |
140 DISALLOW_COPY_AND_ASSIGN(PulseAudioMixer); | 140 DISALLOW_COPY_AND_ASSIGN(PulseAudioMixer); |
141 }; | 141 }; |
142 | 142 |
143 } // namespace chromeos | 143 } // namespace chromeos |
144 | 144 |
145 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::PulseAudioMixer); | 145 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::PulseAudioMixer); |
146 | 146 |
147 #endif // CHROME_BROWSER_CHROMEOS_PULSE_AUDIO_MIXER_H_ | 147 #endif // CHROME_BROWSER_CHROMEOS_PULSE_AUDIO_MIXER_H_ |
148 | 148 |
OLD | NEW |