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

Unified Diff: media/audio/audio_parameters.cc

Issue 115413002: Enable platform echo cancellation through the AudioRecord path. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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
« no previous file with comments | « media/audio/audio_parameters.h ('k') | media/audio/cras/audio_manager_cras.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_parameters.cc
diff --git a/media/audio/audio_parameters.cc b/media/audio/audio_parameters.cc
index b7ea4870c23c2bf5f6b51c2bfbfaa5279c566ef1..fff815610fe52629ef0b96d6ad5897c26126d01b 100644
--- a/media/audio/audio_parameters.cc
+++ b/media/audio/audio_parameters.cc
@@ -16,7 +16,8 @@ AudioParameters::AudioParameters()
bits_per_sample_(0),
frames_per_buffer_(0),
channels_(0),
- input_channels_(0) {
+ input_channels_(0),
+ effects_(NO_EFFECTS) {
}
AudioParameters::AudioParameters(Format format, ChannelLayout channel_layout,
@@ -28,20 +29,38 @@ AudioParameters::AudioParameters(Format format, ChannelLayout channel_layout,
bits_per_sample_(bits_per_sample),
frames_per_buffer_(frames_per_buffer),
channels_(ChannelLayoutToChannelCount(channel_layout)),
- input_channels_(0) {
+ input_channels_(0),
+ effects_(NO_EFFECTS) {
}
AudioParameters::AudioParameters(Format format, ChannelLayout channel_layout,
int input_channels,
int sample_rate, int bits_per_sample,
- int frames_per_buffer)
+ int frames_per_buffer, int effects)
: format_(format),
channel_layout_(channel_layout),
sample_rate_(sample_rate),
bits_per_sample_(bits_per_sample),
frames_per_buffer_(frames_per_buffer),
channels_(ChannelLayoutToChannelCount(channel_layout)),
- input_channels_(input_channels) {
+ input_channels_(input_channels),
+ effects_(effects) {
+}
+
+AudioParameters::AudioParameters(Format format, ChannelLayout channel_layout,
+ int channels, int input_channels,
+ int sample_rate, int bits_per_sample,
+ int frames_per_buffer, int effects)
+ : format_(format),
+ channel_layout_(channel_layout),
+ sample_rate_(sample_rate),
+ bits_per_sample_(bits_per_sample),
+ frames_per_buffer_(frames_per_buffer),
+ channels_(channels),
+ input_channels_(input_channels),
+ effects_(effects) {
+ if (channel_layout != CHANNEL_LAYOUT_DISCRETE)
+ DCHECK_EQ(channels, ChannelLayoutToChannelCount(channel_layout));
}
void AudioParameters::Reset(Format format, ChannelLayout channel_layout,
@@ -95,9 +114,4 @@ base::TimeDelta AudioParameters::GetBufferDuration() const {
static_cast<float>(sample_rate_));
}
-void AudioParameters::SetDiscreteChannels(int channels) {
- channel_layout_ = CHANNEL_LAYOUT_DISCRETE;
- channels_ = channels;
-}
-
} // namespace media
« no previous file with comments | « media/audio/audio_parameters.h ('k') | media/audio/cras/audio_manager_cras.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698