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

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

Issue 9965076: Revert 130180 - 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) 2012 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
18 ////////////////////////////////////////////////////////////////////////////// 16 //////////////////////////////////////////////////////////////////////////////
19 // SineWaveAudioSource implementation. 17 // SineWaveAudioSource implementation.
20 18
21 SineWaveAudioSource::SineWaveAudioSource(Format format, int channels, 19 SineWaveAudioSource::SineWaveAudioSource(Format format, int channels,
22 double freq, double sample_freq) 20 double freq, double sample_freq)
23 : format_(format), 21 : format_(format),
24 channels_(channels), 22 channels_(channels),
25 freq_(freq), 23 freq_(freq),
26 sample_freq_(sample_freq), 24 sample_freq_(sample_freq),
27 time_state_(0) { 25 time_state_(0) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 89 }
92 90
93 void PushSource::ClearAll() { 91 void PushSource::ClearAll() {
94 // Cleanup() will discard all the data. 92 // Cleanup() will discard all the data.
95 CleanUp(); 93 CleanUp();
96 } 94 }
97 95
98 void PushSource::CleanUp() { 96 void PushSource::CleanUp() {
99 buffer_.Clear(); 97 buffer_.Clear();
100 } 98 }
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