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

Unified Diff: content/common/media/media_param_traits.cc

Issue 99033003: Enable platform echo cancellation through the AudioRecord path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 7 years 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/media_param_traits.cc
diff --git a/content/common/media/media_param_traits.cc b/content/common/media/media_param_traits.cc
index f6eaec1a85ffccb0eda2a822bb6ab2921d6c417f..b51579e0817f04a665ae7cced7f564ec0f2eb3bb 100644
--- a/content/common/media/media_param_traits.cc
+++ b/content/common/media/media_param_traits.cc
@@ -25,6 +25,7 @@ void ParamTraits<AudioParameters>::Write(Message* m,
m->WriteInt(p.frames_per_buffer());
m->WriteInt(p.channels());
m->WriteInt(p.input_channels());
+ m->WriteBool(p.use_platform_aec());
}
bool ParamTraits<AudioParameters>::Read(const Message* m,
@@ -32,6 +33,7 @@ bool ParamTraits<AudioParameters>::Read(const Message* m,
AudioParameters* r) {
int format, channel_layout, sample_rate, bits_per_sample,
frames_per_buffer, channels, input_channels;
+ bool use_platform_aec;
if (!m->ReadInt(iter, &format) ||
!m->ReadInt(iter, &channel_layout) ||
@@ -39,11 +41,13 @@ bool ParamTraits<AudioParameters>::Read(const Message* m,
!m->ReadInt(iter, &bits_per_sample) ||
!m->ReadInt(iter, &frames_per_buffer) ||
!m->ReadInt(iter, &channels) ||
- !m->ReadInt(iter, &input_channels))
+ !m->ReadInt(iter, &input_channels) ||
+ !m->ReadBool(iter, &use_platform_aec))
return false;
r->Reset(static_cast<AudioParameters::Format>(format),
static_cast<ChannelLayout>(channel_layout), channels,
- input_channels, sample_rate, bits_per_sample, frames_per_buffer);
+ input_channels, sample_rate, bits_per_sample, frames_per_buffer,
+ use_platform_aec);
if (!r->IsValid())
return false;
return true;

Powered by Google App Engine
This is Rietveld 408576698