VBAP backend re-work (part two): speaker positioning
authorRobin Gareus <robin@gareus.org>
Sat, 11 Jan 2014 22:29:23 +0000 (23:29 +0100)
committerPaul Davis <paul@linuxaudiosystems.com>
Mon, 13 Jan 2014 14:37:34 +0000 (09:37 -0500)
commit1bf9c4c990ccc7f308a38a2eba91fbdb4bb93292
treeda63b337567093ec5a5b1cebff7381c574883a33
parent112de00841ffd5bbd78b6747eee23fe471fb412a
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