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

Unified Diff: media/audio/audio_parameters.cc

Issue 9691001: Audio software mixer. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 9 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
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_)

Powered by Google App Engine
This is Rietveld 408576698