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 #include "chrome/browser/chromeos/audio_handler.h" | 5 #include "chrome/browser/chromeos/audio_handler.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/singleton.h" | 10 #include "base/singleton.h" |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 (kMaxVolumeDb - kMinVolumeDb), 1/kVolumeBias); | 163 (kMaxVolumeDb - kMinVolumeDb), 1/kVolumeBias); |
164 } | 164 } |
165 | 165 |
166 // static | 166 // static |
167 double AudioHandler::PercentToVolumeDb(double volume_percent) { | 167 double AudioHandler::PercentToVolumeDb(double volume_percent) { |
168 return pow(volume_percent / 100.0, kVolumeBias) * | 168 return pow(volume_percent / 100.0, kVolumeBias) * |
169 (kMaxVolumeDb - kMinVolumeDb) + kMinVolumeDb; | 169 (kMaxVolumeDb - kMinVolumeDb) + kMinVolumeDb; |
170 } | 170 } |
171 | 171 |
172 // static | 172 // static |
173 AudioHandler* AudioHandler::instance() { | 173 AudioHandler* AudioHandler::GetInstance() { |
174 return Singleton<AudioHandler>::get(); | 174 return Singleton<AudioHandler>::get(); |
175 } | 175 } |
176 | 176 |
177 } // namespace chromeos | 177 } // namespace chromeos |
OLD | NEW |