Use array geometry in Beamformer

R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/35559004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@8000 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
aluebs@webrtc.org
2015-01-05 21:58:58 +00:00
parent a37bf2c4fe
commit fb7a039e9d
6 changed files with 51 additions and 16 deletions

View File

@ -13,6 +13,7 @@
#include <stddef.h> // size_t
#include <stdio.h> // FILE
#include <vector>
#include "webrtc/base/platform_file.h"
#include "webrtc/common.h"
@ -82,12 +83,25 @@ struct ExperimentalNs {
bool enabled;
};
// Coordinates in meters.
struct Point {
Point(float x, float y, float z) {
c[0] = x;
c[1] = y;
c[2] = z;
}
float c[3];
};
// Use to enable beamforming. Must be provided through the constructor. It will
// have no impact if used with AudioProcessing::SetExtraOptions().
struct Beamforming {
Beamforming() : enabled(false) {}
explicit Beamforming(bool enabled) : enabled(enabled) {}
bool enabled;
Beamforming(bool enabled, const std::vector<Point>& array_geometry)
: enabled(enabled),
array_geometry(array_geometry) {}
const bool enabled;
const std::vector<Point> array_geometry;
};
static const int kAudioProcMaxNativeSampleRateHz = 32000;