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

Unified Diff: media/audio/audio_parameters.h

Issue 11878032: Plumb |input_channels| all the way to AudioManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/audio/audio_output_ipc.h ('k') | media/audio/audio_parameters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_parameters.h
===================================================================
--- media/audio/audio_parameters.h (revision 181072)
+++ media/audio/audio_parameters.h (working copy)
@@ -46,7 +46,12 @@
AudioParameters(Format format, ChannelLayout channel_layout,
int sample_rate, int bits_per_sample,
int frames_per_buffer);
+ AudioParameters(Format format, ChannelLayout channel_layout,
+ int input_channels,
+ int sample_rate, int bits_per_sample,
+ int frames_per_buffer);
void Reset(Format format, ChannelLayout channel_layout,
+ int input_channels,
int sample_rate, int bits_per_sample,
int frames_per_buffer);
@@ -69,6 +74,7 @@
int bits_per_sample() const { return bits_per_sample_; }
int frames_per_buffer() const { return frames_per_buffer_; }
int channels() const { return channels_; }
+ int input_channels() const { return input_channels_; }
private:
Format format_; // Format of the stream.
@@ -79,6 +85,9 @@
int channels_; // Number of channels. Value set based on
// |channel_layout|.
+ int input_channels_; // Optional number of input channels.
+ // Normally 0, but can be set to specify
+ // synchronized I/O.
};
// Comparison is useful when AudioParameters is used with std structures.
@@ -87,6 +96,8 @@
return a.format() < b.format();
if (a.channels() != b.channels())
return a.channels() < b.channels();
+ if (a.input_channels() != b.input_channels())
+ return a.input_channels() < b.input_channels();
if (a.sample_rate() != b.sample_rate())
return a.sample_rate() < b.sample_rate();
if (a.bits_per_sample() != b.bits_per_sample())
« no previous file with comments | « media/audio/audio_output_ipc.h ('k') | media/audio/audio_parameters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698