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

Side by Side Diff: media/audio/alsa/alsa_output.h

Issue 481193003: Remove AudioBuffersState usage in Chromium (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix audio muter build buster. Created 6 years, 2 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/BUILD.gn ('k') | media/audio/alsa/alsa_output.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // Creates an output stream based on the ALSA PCM interface. 5 // Creates an output stream based on the ALSA PCM interface.
6 // 6 //
7 // On device write failure, the stream will move itself to an invalid state. 7 // On device write failure, the stream will move itself to an invalid state.
8 // No more data will be pulled from the data source, or written to the device. 8 // No more data will be pulled from the data source, or written to the device.
9 // All calls to public API functions will either no-op themselves, or return an 9 // All calls to public API functions will either no-op themselves, or return an
10 // error if possible. Specifically, If the stream is in an error state, Open() 10 // error if possible. Specifically, If the stream is in an error state, Open()
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 bool IsOnAudioThread() const; 147 bool IsOnAudioThread() const;
148 148
149 // API for Proxying calls to the AudioSourceCallback provided during 149 // API for Proxying calls to the AudioSourceCallback provided during
150 // Start(). 150 // Start().
151 // 151 //
152 // TODO(ajwong): This is necessary because the ownership semantics for the 152 // TODO(ajwong): This is necessary because the ownership semantics for the
153 // |source_callback_| object are incorrect in AudioRenderHost. The callback 153 // |source_callback_| object are incorrect in AudioRenderHost. The callback
154 // is passed into the output stream, but ownership is not transfered which 154 // is passed into the output stream, but ownership is not transfered which
155 // requires a synchronization on access of the |source_callback_| to avoid 155 // requires a synchronization on access of the |source_callback_| to avoid
156 // using a deleted callback. 156 // using a deleted callback.
157 int RunDataCallback(AudioBus* audio_bus, AudioBuffersState buffers_state); 157 int RunDataCallback(AudioBus* audio_bus, uint32 total_bytes_delay);
158 void RunErrorCallback(int code); 158 void RunErrorCallback(int code);
159 159
160 // Changes the AudioSourceCallback to proxy calls to. Pass in NULL to 160 // Changes the AudioSourceCallback to proxy calls to. Pass in NULL to
161 // release ownership of the currently registered callback. 161 // release ownership of the currently registered callback.
162 void set_source_callback(AudioSourceCallback* callback); 162 void set_source_callback(AudioSourceCallback* callback);
163 163
164 // Configuration constants from the constructor. Referenceable by all threads 164 // Configuration constants from the constructor. Referenceable by all threads
165 // since they are constants. 165 // since they are constants.
166 const std::string requested_device_name_; 166 const std::string requested_device_name_;
167 const snd_pcm_format_t pcm_format_; 167 const snd_pcm_format_t pcm_format_;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 220
221 DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream); 221 DISALLOW_COPY_AND_ASSIGN(AlsaPcmOutputStream);
222 }; 222 };
223 223
224 MEDIA_EXPORT std::ostream& operator<<(std::ostream& os, 224 MEDIA_EXPORT std::ostream& operator<<(std::ostream& os,
225 AlsaPcmOutputStream::InternalState); 225 AlsaPcmOutputStream::InternalState);
226 226
227 }; // namespace media 227 }; // namespace media
228 228
229 #endif // MEDIA_AUDIO_ALSA_ALSA_OUTPUT_H_ 229 #endif // MEDIA_AUDIO_ALSA_ALSA_OUTPUT_H_
OLDNEW
« no previous file with comments | « media/audio/BUILD.gn ('k') | media/audio/alsa/alsa_output.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698