diff options
author | Robin Gareus <robin@gareus.org> | 2014-01-15 09:37:20 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-01-15 09:37:20 +0100 |
commit | 58def58bf50f29e42babdb5de7ca34819c00909f (patch) | |
tree | 75ac1c64665e5a33e074cb2011f0d3f955fcf72b /libs/ardour/speakers.cc | |
parent | 35c170937de6150ae09154f96e4920d30e83f6ce (diff) |
VBAP GUI convention: top == front ^= azimuth == .5
This allows to move from stereo,mono panners to VBAP and back
and also facilitates sharing pannables of all currently
existing panners with semantically similar results.
(somewhat dirty solution, this retains PBD::spherical_to_cartesian
and maps angles pretty much everywhere else)
Diffstat (limited to 'libs/ardour/speakers.cc')
-rw-r--r-- | libs/ardour/speakers.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/ardour/speakers.cc b/libs/ardour/speakers.cc index 2acc9659ef..bbad254f6e 100644 --- a/libs/ardour/speakers.cc +++ b/libs/ardour/speakers.cc @@ -149,7 +149,7 @@ Speakers::move_speaker (int id, const AngularVector& new_position) void Speakers::setup_default_speakers (uint32_t n) { - double o = 90.0; + double o = 180.0; /* default assignment of speaker position for n speakers */ @@ -229,12 +229,12 @@ Speakers::setup_default_speakers (uint32_t n) */ if (n % 2) { - deg = 90.0 - degree_step; + deg = 360 + o + degree_step; } else { - deg = 90.0; + deg = 360 + o; } - for (i = 0; i < n; ++i, deg += degree_step) { - add_speaker (AngularVector (deg, 0.0)); + for (i = 0; i < n; ++i, deg -= degree_step) { + add_speaker (AngularVector (fmod(deg, 360), 0.0)); } } } |