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_AUDIO_MIXER_ALSA_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_AUDIO_MIXER_ALSA_H_ |
6 #define CHROME_BROWSER_CHROMEOS_AUDIO_MIXER_ALSA_H_ | 6 #define CHROME_BROWSER_CHROMEOS_AUDIO_MIXER_ALSA_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/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
14 #include "chrome/browser/chromeos/audio_mixer.h" | 14 #include "chrome/browser/chromeos/audio_mixer.h" |
15 #include "chrome/browser/prefs/pref_member.h" | 15 |
| 16 class PrefService; |
16 | 17 |
17 struct _snd_mixer_elem; | 18 struct _snd_mixer_elem; |
18 struct _snd_mixer; | 19 struct _snd_mixer; |
19 | 20 |
20 namespace chromeos { | 21 namespace chromeos { |
21 | 22 |
22 class AudioMixerAlsa : public AudioMixer { | 23 class AudioMixerAlsa : public AudioMixer { |
23 public: | 24 public: |
24 AudioMixerAlsa(); | 25 AudioMixerAlsa(); |
25 virtual ~AudioMixerAlsa(); | 26 virtual ~AudioMixerAlsa(); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 double save_volume_; | 90 double save_volume_; |
90 | 91 |
91 mutable base::Lock mixer_state_lock_; | 92 mutable base::Lock mixer_state_lock_; |
92 mutable State mixer_state_; | 93 mutable State mixer_state_; |
93 | 94 |
94 // Cached contexts for use in ALSA calls. | 95 // Cached contexts for use in ALSA calls. |
95 _snd_mixer* alsa_mixer_; | 96 _snd_mixer* alsa_mixer_; |
96 _snd_mixer_elem* elem_master_; | 97 _snd_mixer_elem* elem_master_; |
97 _snd_mixer_elem* elem_pcm_; | 98 _snd_mixer_elem* elem_pcm_; |
98 | 99 |
99 IntegerPrefMember mute_pref_; | 100 PrefService* prefs_; |
100 DoublePrefMember volume_pref_; | |
101 | 101 |
102 scoped_ptr<base::Thread> thread_; | 102 scoped_ptr<base::Thread> thread_; |
103 | 103 |
104 DISALLOW_COPY_AND_ASSIGN(AudioMixerAlsa); | 104 DISALLOW_COPY_AND_ASSIGN(AudioMixerAlsa); |
105 }; | 105 }; |
106 | 106 |
107 } // namespace chromeos | 107 } // namespace chromeos |
108 | 108 |
109 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::AudioMixerAlsa); | 109 DISABLE_RUNNABLE_METHOD_REFCOUNT(chromeos::AudioMixerAlsa); |
110 | 110 |
111 #endif // CHROME_BROWSER_CHROMEOS_AUDIO_MIXER_ALSA_H_ | 111 #endif // CHROME_BROWSER_CHROMEOS_AUDIO_MIXER_ALSA_H_ |
112 | |
OLD | NEW |