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

Side by Side Diff: media/audio/audio_io.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
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 #ifndef MEDIA_AUDIO_AUDIO_IO_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_IO_H_
6 #define MEDIA_AUDIO_AUDIO_IO_H_ 6 #define MEDIA_AUDIO_AUDIO_IO_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "media/audio/audio_buffers_state.h" 9 #include "media/audio/audio_buffers_state.h"
10 10
(...skipping 27 matching lines...) Expand all
38 38
39 39
40 // Models an audio stream that gets rendered to the audio hardware output. 40 // Models an audio stream that gets rendered to the audio hardware output.
41 // Because we support more audio streams than physically available channels 41 // Because we support more audio streams than physically available channels
42 // a given AudioOutputStream might or might not talk directly to hardware. 42 // a given AudioOutputStream might or might not talk directly to hardware.
43 // An audio stream allocates several buffers for audio data and calls 43 // An audio stream allocates several buffers for audio data and calls
44 // AudioSourceCallback::OnModeData() periodically to fill these buffers, 44 // AudioSourceCallback::OnModeData() periodically to fill these buffers,
45 // as the data is written to the audio device. Size of each packet is determined 45 // as the data is written to the audio device. Size of each packet is determined
46 // by |samples_per_packet| specified in AudioParameters when the stream is 46 // by |samples_per_packet| specified in AudioParameters when the stream is
47 // created. 47 // created.
48
49 namespace media {
50
48 class MEDIA_EXPORT AudioOutputStream { 51 class MEDIA_EXPORT AudioOutputStream {
49 public: 52 public:
50 // Audio sources must implement AudioSourceCallback. This interface will be 53 // Audio sources must implement AudioSourceCallback. This interface will be
51 // called in a random thread which very likely is a high priority thread. Do 54 // called in a random thread which very likely is a high priority thread. Do
52 // not rely on using this thread TLS or make calls that alter the thread 55 // not rely on using this thread TLS or make calls that alter the thread
53 // itself such as creating Windows or initializing COM. 56 // itself such as creating Windows or initializing COM.
54 class MEDIA_EXPORT AudioSourceCallback { 57 class MEDIA_EXPORT AudioSourceCallback {
55 public: 58 public:
56 virtual ~AudioSourceCallback() {} 59 virtual ~AudioSourceCallback() {}
57 60
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // Returns the microphone analog volume, with range [0, max_volume] inclusive. 169 // Returns the microphone analog volume, with range [0, max_volume] inclusive.
167 virtual double GetVolume() = 0; 170 virtual double GetVolume() = 0;
168 171
169 // Sets the Automatic Gain Control (AGC) state. 172 // Sets the Automatic Gain Control (AGC) state.
170 virtual void SetAutomaticGainControl(bool enabled) = 0; 173 virtual void SetAutomaticGainControl(bool enabled) = 0;
171 174
172 // Returns the Automatic Gain Control (AGC) state. 175 // Returns the Automatic Gain Control (AGC) state.
173 virtual bool GetAutomaticGainControl() = 0; 176 virtual bool GetAutomaticGainControl() = 0;
174 }; 177 };
175 178
179 } // namespace media
180
176 #endif // MEDIA_AUDIO_AUDIO_IO_H_ 181 #endif // MEDIA_AUDIO_AUDIO_IO_H_
OLDNEW
« no previous file with comments | « media/audio/audio_input_volume_unittest.cc ('k') | media/audio/audio_low_latency_input_output_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698