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

Side by Side Diff: chrome/browser/chromeos/audio_mixer_alsa.cc

Issue 6248026: Rename Real* to Double* in values.* and dependent files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More renames Created 9 years, 10 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 | Annotate | Revision Log
OLDNEW
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 #include "chrome/browser/chromeos/audio_mixer_alsa.h" 5 #include "chrome/browser/chromeos/audio_mixer_alsa.h"
6 6
7 #include <alsa/asoundlib.h> 7 #include <alsa/asoundlib.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 base::AutoLock lock(mixer_state_lock_); 161 base::AutoLock lock(mixer_state_lock_);
162 // If we think it's ready, verify it is actually so. 162 // If we think it's ready, verify it is actually so.
163 if ((mixer_state_ == READY) && (alsa_mixer_ == NULL)) 163 if ((mixer_state_ == READY) && (alsa_mixer_ == NULL))
164 mixer_state_ = IN_ERROR; 164 mixer_state_ = IN_ERROR;
165 return mixer_state_; 165 return mixer_state_;
166 } 166 }
167 167
168 // static 168 // static
169 void AudioMixerAlsa::RegisterPrefs(PrefService* local_state) { 169 void AudioMixerAlsa::RegisterPrefs(PrefService* local_state) {
170 if (!local_state->FindPreference(prefs::kAudioVolume)) 170 if (!local_state->FindPreference(prefs::kAudioVolume))
171 local_state->RegisterRealPref(prefs::kAudioVolume, kPrefVolumeInvalid); 171 local_state->RegisterDoublePref(prefs::kAudioVolume, kPrefVolumeInvalid);
172 if (!local_state->FindPreference(prefs::kAudioMute)) 172 if (!local_state->FindPreference(prefs::kAudioMute))
173 local_state->RegisterIntegerPref(prefs::kAudioMute, kPrefMuteInvalid); 173 local_state->RegisterIntegerPref(prefs::kAudioMute, kPrefMuteInvalid);
174 } 174 }
175 175
176 //////////////////////////////////////////////////////////////////////////////// 176 ////////////////////////////////////////////////////////////////////////////////
177 // Private functions follow 177 // Private functions follow
178 178
179 void AudioMixerAlsa::DoInit(InitDoneCallback* callback) { 179 void AudioMixerAlsa::DoInit(InitDoneCallback* callback) {
180 bool success = InitializeAlsaMixer(); 180 bool success = InitializeAlsaMixer();
181 181
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 441
442 void AudioMixerAlsa::SetElementMuted_Locked(snd_mixer_elem_t* elem, bool mute) { 442 void AudioMixerAlsa::SetElementMuted_Locked(snd_mixer_elem_t* elem, bool mute) {
443 int enabled = mute ? 0 : 1; 443 int enabled = mute ? 0 : 1;
444 snd_mixer_selem_set_playback_switch_all(elem, enabled); 444 snd_mixer_selem_set_playback_switch_all(elem, enabled);
445 445
446 VLOG(1) << "Set playback switch " << snd_mixer_selem_get_name(elem) 446 VLOG(1) << "Set playback switch " << snd_mixer_selem_get_name(elem)
447 << " to " << enabled; 447 << " to " << enabled;
448 } 448 }
449 449
450 } // namespace chromeos 450 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698