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

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

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/pulse/pulse_output.cc ('k') | media/audio/simple_sources.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 #ifndef MEDIA_AUDIO_SIMPLE_SOURCES_H_ 5 #ifndef MEDIA_AUDIO_SIMPLE_SOURCES_H_
6 #define MEDIA_AUDIO_SIMPLE_SOURCES_H_ 6 #define MEDIA_AUDIO_SIMPLE_SOURCES_H_
7 7
8 #include <list> 8 #include <list>
9 9
10 #include "media/audio/audio_io.h" 10 #include "media/audio/audio_io.h"
11 #include "media/base/seekable_buffer.h" 11 #include "media/base/seekable_buffer.h"
12 12
13 namespace media {
14
13 // An audio source that produces a pure sinusoidal tone. 15 // An audio source that produces a pure sinusoidal tone.
14 class MEDIA_EXPORT SineWaveAudioSource 16 class MEDIA_EXPORT SineWaveAudioSource
15 : public AudioOutputStream::AudioSourceCallback { 17 : public AudioOutputStream::AudioSourceCallback {
16 public: 18 public:
17 enum Format { 19 enum Format {
18 FORMAT_8BIT_LINEAR_PCM, 20 FORMAT_8BIT_LINEAR_PCM,
19 FORMAT_16BIT_LINEAR_PCM, 21 FORMAT_16BIT_LINEAR_PCM,
20 }; 22 };
21 // |channels| is the number of audio channels, |freq| is the frequency in 23 // |channels| is the number of audio channels, |freq| is the frequency in
22 // hertz and it has to be less than half of the sampling frequency 24 // hertz and it has to be less than half of the sampling frequency
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Discard all buffered data and reset to initial state. 83 // Discard all buffered data and reset to initial state.
82 void ClearAll(); 84 void ClearAll();
83 85
84 private: 86 private:
85 // Free acquired resources. 87 // Free acquired resources.
86 void CleanUp(); 88 void CleanUp();
87 89
88 media::SeekableBuffer buffer_; 90 media::SeekableBuffer buffer_;
89 }; 91 };
90 92
93 } // namespace media
94
91 #endif // MEDIA_AUDIO_SIMPLE_SOURCES_H_ 95 #endif // MEDIA_AUDIO_SIMPLE_SOURCES_H_
OLDNEW
« no previous file with comments | « media/audio/pulse/pulse_output.cc ('k') | media/audio/simple_sources.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698