VBAP backend re-work (part two): speaker positioning
authorRobin Gareus <robin@gareus.org>
Sat, 11 Jan 2014 22:29:23 +0000 (23:29 +0100)
committerRobin Gareus <robin@gareus.org>
Sat, 11 Jan 2014 22:38:27 +0000 (23:38 +0100)
commitd3e1d542803922250937be16b598f2c052948cba
treecc86916e5e1689e5e4339a9d0276c70c62478279
parent80127f9ccade3292a22377173d44a72619497950
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()
)
libs/panners/vbap/vbap_speakers.cc
libs/panners/vbap/vbap_speakers.h