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

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

Issue 18052007: Use a direct include of time headers in media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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
« no previous file with comments | « media/audio/audio_util.cc ('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/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/time.h" 12 #include "base/time/time.h"
13 #include "media/audio/audio_manager.h" 13 #include "media/audio/audio_manager.h"
14 #include "media/audio/cras/audio_manager_cras.h" 14 #include "media/audio/cras/audio_manager_cras.h"
15 #include "media/audio/linux/alsa_util.h" 15 #include "media/audio/linux/alsa_util.h"
16 16
17 namespace media { 17 namespace media {
18 18
19 CrasInputStream::CrasInputStream(const AudioParameters& params, 19 CrasInputStream::CrasInputStream(const AudioParameters& params,
20 AudioManagerCras* manager) 20 AudioManagerCras* manager)
21 : audio_manager_(manager), 21 : audio_manager_(manager),
22 bytes_per_frame_(0), 22 bytes_per_frame_(0),
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 270
271 double CrasInputStream::GetVolumeRatioFromDecibels(double dB) const { 271 double CrasInputStream::GetVolumeRatioFromDecibels(double dB) const {
272 return pow(10, dB / 20.0); 272 return pow(10, dB / 20.0);
273 } 273 }
274 274
275 double CrasInputStream::GetDecibelsFromVolumeRatio(double volume_ratio) const { 275 double CrasInputStream::GetDecibelsFromVolumeRatio(double volume_ratio) const {
276 return 20 * log10(volume_ratio); 276 return 20 * log10(volume_ratio);
277 } 277 }
278 278
279 } // namespace media 279 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_util.cc ('k') | media/audio/cras/cras_input_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698