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

Side by Side Diff: media/audio/simple_sources.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/simple_sources.h ('k') | media/audio/simple_sources_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/simple_sources.h" 5 #include "media/audio/simple_sources.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <math.h> 8 #include <math.h>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "media/audio/audio_io.h" 13 #include "media/audio/audio_io.h"
14 #include "media/base/data_buffer.h" 14 #include "media/base/data_buffer.h"
15 15
16 namespace media {
17
16 ////////////////////////////////////////////////////////////////////////////// 18 //////////////////////////////////////////////////////////////////////////////
17 // SineWaveAudioSource implementation. 19 // SineWaveAudioSource implementation.
18 20
19 SineWaveAudioSource::SineWaveAudioSource(Format format, int channels, 21 SineWaveAudioSource::SineWaveAudioSource(Format format, int channels,
20 double freq, double sample_freq) 22 double freq, double sample_freq)
21 : format_(format), 23 : format_(format),
22 channels_(channels), 24 channels_(channels),
23 freq_(freq), 25 freq_(freq),
24 sample_freq_(sample_freq), 26 sample_freq_(sample_freq),
25 time_state_(0) { 27 time_state_(0) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 } 91 }
90 92
91 void PushSource::ClearAll() { 93 void PushSource::ClearAll() {
92 // Cleanup() will discard all the data. 94 // Cleanup() will discard all the data.
93 CleanUp(); 95 CleanUp();
94 } 96 }
95 97
96 void PushSource::CleanUp() { 98 void PushSource::CleanUp() {
97 buffer_.Clear(); 99 buffer_.Clear();
98 } 100 }
101
102 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/simple_sources.h ('k') | media/audio/simple_sources_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698