diff options
author | Robin Gareus <robin@gareus.org> | 2014-01-11 23:29:23 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-01-11 23:38:27 +0100 |
commit | d3e1d542803922250937be16b598f2c052948cba (patch) | |
tree | cc86916e5e1689e5e4339a9d0276c70c62478279 /libs/panners/vbap/vbap_speakers.h | |
parent | 80127f9ccade3292a22377173d44a72619497950 (diff) |
VBAP backend re-work (part two): speaker positioning
* clean up source (whitespace)
* fix speaker 3x3 matrix iteration
* update math to go along with Ardour Cartesian -- fixes rounding errors
* fix division by zero in cross_prod()
* disable old debug output
(NB PBD::spherical_to_cartesian() returns
3.7494e-33, 6.12323e-17, 1 for azimuth 90 elevation 90 distance 1
while it should return
0.000000, 0.000000, 1 for azimuth 90 elevation 90 distance 1
IOW cos(90.0 * 2.0 * M_PI / 360.0) != 0
Cause unknown. This is currently worked around check in vec_length()
)
Diffstat (limited to 'libs/panners/vbap/vbap_speakers.h')
-rw-r--r-- | libs/panners/vbap/vbap_speakers.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/panners/vbap/vbap_speakers.h b/libs/panners/vbap/vbap_speakers.h index b2f8b3c9dd..c3e90ce646 100644 --- a/libs/panners/vbap/vbap_speakers.h +++ b/libs/panners/vbap/vbap_speakers.h @@ -84,11 +84,11 @@ private: struct ls_triplet_chain *next; }; - static float vec_angle(PBD::CartesianVector v1, PBD::CartesianVector v2); - static float vec_length(PBD::CartesianVector v1); - static float vec_prod(PBD::CartesianVector v1, PBD::CartesianVector v2); - static float vol_p_side_lgth(int i, int j,int k, const std::vector<Speaker>&); - static void cross_prod(PBD::CartesianVector v1,PBD::CartesianVector v2, PBD::CartesianVector *res); + static double vec_angle(PBD::CartesianVector v1, PBD::CartesianVector v2); + static double vec_length(PBD::CartesianVector v1); + static double vec_prod(PBD::CartesianVector v1, PBD::CartesianVector v2); + static double vol_p_side_lgth(int i, int j,int k, const std::vector<Speaker>&); + static void cross_prod(PBD::CartesianVector v1,PBD::CartesianVector v2, PBD::CartesianVector *res); void update (); int any_ls_inside_triplet (int a, int b, int c); |