Index: media/audio/audio_parameters.h |
diff --git a/media/audio/audio_parameters.h b/media/audio/audio_parameters.h |
index 9b86d31186a7c2d33f6f0388b36a344f0855cd97..8c6458c417d3d25fdd58d49b88fb684638284ad7 100644 |
--- a/media/audio/audio_parameters.h |
+++ b/media/audio/audio_parameters.h |
@@ -56,6 +56,10 @@ class MEDIA_EXPORT AudioParameters { |
int channels, int input_channels, |
int sample_rate, int bits_per_sample, |
int frames_per_buffer); |
+ void Reset(Format format, ChannelLayout channel_layout, |
+ int channels, int input_channels, |
+ int sample_rate, int bits_per_sample, |
+ int frames_per_buffer, bool use_platform_aec); |
ajm
2013/12/06 04:30:49
If we agree on this approach, I'll add use_platfor
|
// Checks that all values are in the expected range. All limits are specified |
// in media::Limits. |
@@ -81,9 +85,15 @@ class MEDIA_EXPORT AudioParameters { |
int frames_per_buffer() const { return frames_per_buffer_; } |
int channels() const { return channels_; } |
int input_channels() const { return input_channels_; } |
+ bool use_platform_aec() const { |
+ return use_platform_aec_; |
+ } |
// Set to CHANNEL_LAYOUT_DISCRETE with given number of channels. |
void SetDiscreteChannels(int channels); |
+ void set_use_platform_aec(bool use) { |
+ use_platform_aec_ = use; |
+ } |
// Comparison with other AudioParams. |
bool operator==(const AudioParameters& other) const { |
@@ -93,7 +103,8 @@ class MEDIA_EXPORT AudioParameters { |
channels_ == other.channels() && |
input_channels_ == other.input_channels() && |
bits_per_sample_ == other.bits_per_sample() && |
- frames_per_buffer_ == other.frames_per_buffer(); |
+ frames_per_buffer_ == other.frames_per_buffer() && |
+ use_platform_aec_ == other.use_platform_aec(); |
} |
private: |
@@ -108,6 +119,8 @@ class MEDIA_EXPORT AudioParameters { |
int input_channels_; // Optional number of input channels. |
// Normally 0, but can be set to specify |
// synchronized I/O. |
+ bool use_platform_aec_; // Platform AEC is available, or should be |
+ // enabled, depending on context. |
}; |
// Comparison is useful when AudioParameters is used with std structures. |
@@ -122,7 +135,9 @@ inline bool operator<(const AudioParameters& a, const AudioParameters& b) { |
return a.sample_rate() < b.sample_rate(); |
if (a.bits_per_sample() != b.bits_per_sample()) |
return a.bits_per_sample() < b.bits_per_sample(); |
- return a.frames_per_buffer() < b.frames_per_buffer(); |
+ if (a.frames_per_buffer() != b.frames_per_buffer()) |
+ return a.frames_per_buffer() < b.frames_per_buffer(); |
+ return a.use_platform_aec() < b.use_platform_aec(); |
} |
} // namespace media |