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

Side by Side Diff: media/audio/cras/cras_input.cc

Issue 1542013004: Switch to standard integer types in media/, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more stddef Created 5 years 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
« no previous file with comments | « media/audio/cras/cras_input.h ('k') | media/audio/cras/cras_input_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "media/audio/cras/cras_input.h" 5 #include "media/audio/cras/cras_input.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/macros.h"
10 #include "base/time/time.h" 11 #include "base/time/time.h"
11 #include "media/audio/audio_manager.h" 12 #include "media/audio/audio_manager.h"
12 #include "media/audio/cras/audio_manager_cras.h" 13 #include "media/audio/cras/audio_manager_cras.h"
13 14
14 namespace media { 15 namespace media {
15 16
16 CrasInputStream::CrasInputStream(const AudioParameters& params, 17 CrasInputStream::CrasInputStream(const AudioParameters& params,
17 AudioManagerCras* manager, 18 AudioManagerCras* manager,
18 const std::string& device_id) 19 const std::string& device_id)
19 : audio_manager_(manager), 20 : audio_manager_(manager),
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 332
332 double CrasInputStream::GetVolumeRatioFromDecibels(double dB) const { 333 double CrasInputStream::GetVolumeRatioFromDecibels(double dB) const {
333 return pow(10, dB / 20.0); 334 return pow(10, dB / 20.0);
334 } 335 }
335 336
336 double CrasInputStream::GetDecibelsFromVolumeRatio(double volume_ratio) const { 337 double CrasInputStream::GetDecibelsFromVolumeRatio(double volume_ratio) const {
337 return 20 * log10(volume_ratio); 338 return 20 * log10(volume_ratio);
338 } 339 }
339 340
340 } // namespace media 341 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/cras/cras_input.h ('k') | media/audio/cras/cras_input_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698