Index: media/audio/audio_parameters.h |
diff --git a/media/audio/audio_parameters.h b/media/audio/audio_parameters.h |
index 9b86d31186a7c2d33f6f0388b36a344f0855cd97..089581c0b05c1bd7604412ffe05765505cb150fb 100644 |
--- a/media/audio/audio_parameters.h |
+++ b/media/audio/audio_parameters.h |
@@ -44,6 +44,13 @@ class MEDIA_EXPORT AudioParameters { |
kAudioCDSampleRate = 44100, |
}; |
+ // Bitmasks to determine whether certain platform (typically hardware) audio |
+ // effects should be enabled. |
+ enum PlatformEffectsMask { |
+ NO_EFFECTS = 0x0, |
+ ECHO_CANCELLER = 0x1 |
+ }; |
+ |
AudioParameters(); |
AudioParameters(Format format, ChannelLayout channel_layout, |
int sample_rate, int bits_per_sample, |
@@ -51,7 +58,12 @@ class MEDIA_EXPORT AudioParameters { |
AudioParameters(Format format, ChannelLayout channel_layout, |
ajm
2013/12/12 01:51:28
This existing constructor didn't have many call si
|
int input_channels, |
int sample_rate, int bits_per_sample, |
- int frames_per_buffer); |
+ int frames_per_buffer, int effects); |
+ AudioParameters(Format format, ChannelLayout channel_layout, |
+ int channels, int input_channels, |
+ int sample_rate, int bits_per_sample, |
+ int frames_per_buffer, int effects); |
+ |
void Reset(Format format, ChannelLayout channel_layout, |
int channels, int input_channels, |
int sample_rate, int bits_per_sample, |
@@ -81,6 +93,7 @@ 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_; } |
+ int effects() const { return effects_; } |
// Set to CHANNEL_LAYOUT_DISCRETE with given number of channels. |
void SetDiscreteChannels(int channels); |
@@ -93,7 +106,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() && |
+ effects_ == other.effects(); |
} |
private: |
@@ -108,6 +122,7 @@ class MEDIA_EXPORT AudioParameters { |
int input_channels_; // Optional number of input channels. |
// Normally 0, but can be set to specify |
// synchronized I/O. |
+ int effects_; // Bitmask of PlatformEffects. |
}; |
// Comparison is useful when AudioParameters is used with std structures. |