| Index: media/audio/audio_parameters.h
|
| diff --git a/media/audio/audio_parameters.h b/media/audio/audio_parameters.h
|
| index 3820d8cc3c91de2f3f7168d58074d2b25f8a4072..0e6de44d3bd8f9746b1b06a5cfe940e4685b265d 100644
|
| --- a/media/audio/audio_parameters.h
|
| +++ b/media/audio/audio_parameters.h
|
| @@ -57,15 +57,21 @@ class MEDIA_EXPORT AudioParameters {
|
| };
|
|
|
| AudioParameters();
|
| - AudioParameters(Format format, ChannelLayout channel_layout,
|
| - int sample_rate, int bits_per_sample,
|
| - int frames_per_buffer);
|
| - AudioParameters(Format format, ChannelLayout channel_layout,
|
| - int sample_rate, int bits_per_sample,
|
| - int frames_per_buffer, int effects);
|
| - AudioParameters(Format format, ChannelLayout channel_layout,
|
| - int channels, int sample_rate, int bits_per_sample,
|
| - int frames_per_buffer, int effects);
|
| + AudioParameters(Format format,
|
| + ChannelLayout channel_layout,
|
| + int sample_rate,
|
| + int bits_per_sample,
|
| + int frames_per_buffer,
|
| + const std::string& mic_positions = "",
|
| + int effects = NO_EFFECTS);
|
| + AudioParameters(Format format,
|
| + int channels,
|
| + ChannelLayout channel_layout,
|
| + int sample_rate,
|
| + int bits_per_sample,
|
| + int frames_per_buffer,
|
| + const std::string& mic_positions = "",
|
| + int effects = NO_EFFECTS);
|
|
|
| void Reset(Format format, ChannelLayout channel_layout,
|
| int channels, int sample_rate, int bits_per_sample,
|
| @@ -102,6 +108,7 @@ class MEDIA_EXPORT AudioParameters {
|
| int frames_per_buffer() const { return frames_per_buffer_; }
|
| int channels() const { return channels_; }
|
| int effects() const { return effects_; }
|
| + const std::string& mic_positions() const { return mic_positions_; }
|
|
|
| private:
|
| // These members are mutable to support entire struct assignment. They should
|
| @@ -114,6 +121,24 @@ class MEDIA_EXPORT AudioParameters {
|
|
|
| int channels_; // Number of channels. Value set based on
|
| // |channel_layout|.
|
| +
|
| + // Whitespace-separated microphone positions using Cartesian coordinates in
|
| + // meters with ordering x, y, z.
|
| + // x: the horizontal dimension, with positive to the right from the camera's
|
| + // perspective.
|
| + // y: the depth dimension, with positive forward from the camera's
|
| + // perspective.
|
| + // z: the vertical dimension, with positive upwards.
|
| + //
|
| + // Usually, the center of the microphone array will be treated as the origin
|
| + // (often the position of the camera). The string is formatted as:
|
| + // "x1 y1 z1 ... zn yn zn" for an n-microphone array.
|
| + // For example, a two-mic device with 4 cm of horizontal spacing would use:
|
| + // "-0.02 0 0 0.02 0 0"
|
| + //
|
| + // The empty string indicates unknown positions.
|
| + std::string mic_positions_;
|
| +
|
| int effects_; // Bitmask using PlatformEffectsMask.
|
| };
|
|
|
|
|