Index: media/audio/audio_parameters.h |
diff --git a/media/audio/audio_parameters.h b/media/audio/audio_parameters.h |
index 3820d8cc3c91de2f3f7168d58074d2b25f8a4072..c6638e7741c9d5fcc89b00ffdecdb6705ea55973 100644 |
--- a/media/audio/audio_parameters.h |
+++ b/media/audio/audio_parameters.h |
@@ -9,6 +9,7 @@ |
#include "base/basictypes.h" |
#include "base/time/time.h" |
+#include "media/audio/point.h" |
#include "media/base/channel_layout.h" |
#include "media/base/media_export.h" |
@@ -57,15 +58,25 @@ 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::vector<Point>& mic_positions = std::vector<Point>(), |
+ 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::vector<Point>& mic_positions = std::vector<Point>(), |
+ int effects = NO_EFFECTS); |
+ |
+ ~AudioParameters(); |
void Reset(Format format, ChannelLayout channel_layout, |
int channels, int sample_rate, int bits_per_sample, |
@@ -102,6 +113,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::vector<Point>& mic_positions() const { return mic_positions_; } |
private: |
// These members are mutable to support entire struct assignment. They should |
@@ -114,6 +126,20 @@ class MEDIA_EXPORT AudioParameters { |
int channels_; // Number of channels. Value set based on |
// |channel_layout|. |
+ |
+ // Microphone positions using Cartesian coordinates: |
+ // 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). |
+ // |
+ // An empty vector indicates unknown positions. |
+ std::vector<Point> mic_positions_; |
mcasas
2015/09/02 03:05:37
const?
ajm
2015/09/02 06:41:48
The members aren't const to allow copy assignment
|
+ |
int effects_; // Bitmask using PlatformEffectsMask. |
mcasas
2015/09/02 03:05:37
const?
And perhaps l.121-l.127 as well?
Is strang
mcasas
2015/09/02 03:05:37
const?
And perhaps l.121-l.127 as well?
Is strang
ajm
2015/09/02 06:41:48
As above.
|
}; |