Index: media/audio/audio_parameters.cc |
=================================================================== |
--- media/audio/audio_parameters.cc (revision 128216) |
+++ media/audio/audio_parameters.cc (working copy) |
@@ -8,6 +8,7 @@ |
AudioParameters::AudioParameters() |
: format_(AUDIO_PCM_LINEAR), |
+ use_browser_mixer_(false), |
channel_layout_(CHANNEL_LAYOUT_NONE), |
sample_rate_(0), |
bits_per_sample_(0), |
@@ -15,10 +16,14 @@ |
channels_(0) { |
} |
-AudioParameters::AudioParameters(Format format, ChannelLayout channel_layout, |
- int sample_rate, int bits_per_sample, |
+AudioParameters::AudioParameters(Format format, |
+ bool use_browser_mixer, |
+ ChannelLayout channel_layout, |
+ int sample_rate, |
+ int bits_per_sample, |
int frames_per_buffer) |
: format_(format), |
+ use_browser_mixer_(use_browser_mixer), |
channel_layout_(channel_layout), |
sample_rate_(sample_rate), |
bits_per_sample_(bits_per_sample), |
@@ -26,10 +31,14 @@ |
channels_(ChannelLayoutToChannelCount(channel_layout)) { |
} |
-void AudioParameters::Reset(Format format, ChannelLayout channel_layout, |
- int sample_rate, int bits_per_sample, |
+void AudioParameters::Reset(Format format, |
+ bool use_browser_mixer, |
+ ChannelLayout channel_layout, |
+ int sample_rate, |
+ int bits_per_sample, |
int frames_per_buffer) { |
format_ = format; |
+ use_browser_mixer_ = use_browser_mixer; |
channel_layout_ = channel_layout; |
sample_rate_ = sample_rate; |
bits_per_sample_ = bits_per_sample; |
@@ -67,6 +76,8 @@ |
return true; |
if (a.format_ > b.format_) |
return false; |
+ if (a.use_browser_mixer_ != b.use_browser_mixer_) |
+ return a.use_browser_mixer_ < b.use_browser_mixer_; |
if (a.channels_ < b.channels_) |
return true; |
if (a.channels_ > b.channels_) |