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

Side by Side Diff: media/audio/audio_input_stream_impl.cc

Issue 9805001: Move media/audio files into media namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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_input_stream_impl.h ('k') | media/audio/audio_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 "base/logging.h" 5 #include "base/logging.h"
6 #include "media/audio/audio_input_stream_impl.h" 6 #include "media/audio/audio_input_stream_impl.h"
7 7
8 namespace media {
9
8 static const int kMinIntervalBetweenVolumeUpdatesMs = 1000; 10 static const int kMinIntervalBetweenVolumeUpdatesMs = 1000;
9 11
10 AudioInputStreamImpl::AudioInputStreamImpl() 12 AudioInputStreamImpl::AudioInputStreamImpl()
11 : agc_is_enabled_(false), 13 : agc_is_enabled_(false),
12 max_volume_(0.0), 14 max_volume_(0.0),
13 normalized_volume_(0.0) { 15 normalized_volume_(0.0) {
14 } 16 }
15 17
16 AudioInputStreamImpl::~AudioInputStreamImpl() {} 18 AudioInputStreamImpl::~AudioInputStreamImpl() {}
17 19
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 max_volume_ = GetMaxVolume(); 61 max_volume_ = GetMaxVolume();
60 } 62 }
61 63
62 if (max_volume_ != 0.0) { 64 if (max_volume_ != 0.0) {
63 // Retrieve the current volume level by asking the audio hardware. 65 // Retrieve the current volume level by asking the audio hardware.
64 // Range is normalized to [0.0,1.0] or [0.0, 1.5] on Linux. 66 // Range is normalized to [0.0,1.0] or [0.0, 1.5] on Linux.
65 normalized_volume_ = GetVolume() / max_volume_; 67 normalized_volume_ = GetVolume() / max_volume_;
66 } 68 }
67 } 69 }
68 70
71 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_input_stream_impl.h ('k') | media/audio/audio_input_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698