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

Unified Diff: content/common/media/audio_param_traits.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: content/common/media/audio_param_traits.cc
===================================================================
--- content/common/media/audio_param_traits.cc (revision 128216)
+++ content/common/media/audio_param_traits.cc (working copy)
@@ -4,6 +4,8 @@
#include "content/common/media/audio_param_traits.h"
+#include <string>
+
#include "base/stringprintf.h"
#include "media/audio/audio_parameters.h"
@@ -12,6 +14,7 @@
void ParamTraits<AudioParameters>::Write(Message* m,
const AudioParameters& p) {
m->WriteInt(static_cast<int>(p.format()));
+ m->WriteBool(p.use_browser_mixer());
m->WriteInt(static_cast<int>(p.channel_layout()));
m->WriteInt(p.sample_rate());
m->WriteInt(p.bits_per_sample());
@@ -24,8 +27,10 @@
AudioParameters* r) {
int format, channel_layout, sample_rate, bits_per_sample,
frames_per_buffer, channels;
+ bool use_browser_mixer;
if (!m->ReadInt(iter, &format) ||
+ !m->ReadBool(iter, &use_browser_mixer) ||
!m->ReadInt(iter, &channel_layout) ||
!m->ReadInt(iter, &sample_rate) ||
!m->ReadInt(iter, &bits_per_sample) ||
@@ -33,6 +38,7 @@
!m->ReadInt(iter, &channels))
return false;
r->Reset(static_cast<AudioParameters::Format>(format),
+ use_browser_mixer,
static_cast<ChannelLayout>(channel_layout),
sample_rate, bits_per_sample, frames_per_buffer);
return true;

Powered by Google App Engine
This is Rietveld 408576698