From 7ac05ccfa562b4732070864360fab19da26854d7 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 11 Jan 2014 23:29:46 +0100 Subject: [PATCH] update default speaker position list --- libs/ardour/speakers.cc | 65 +++++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 12 deletions(-) diff --git a/libs/ardour/speakers.cc b/libs/ardour/speakers.cc index 51bae16585..2acc9659ef 100644 --- a/libs/ardour/speakers.cc +++ b/libs/ardour/speakers.cc @@ -149,32 +149,73 @@ Speakers::move_speaker (int id, const AngularVector& new_position) void Speakers::setup_default_speakers (uint32_t n) { + double o = 90.0; + /* default assignment of speaker position for n speakers */ assert (n>0); switch (n) { case 1: - add_speaker (AngularVector (0.0, 0.0)); + add_speaker (AngularVector (o +0.0, 0.0)); break; case 2: - add_speaker (AngularVector (0.0, 0.0)); - add_speaker (AngularVector (180.0, 0,0)); + add_speaker (AngularVector (o +60.0, 0.0)); + add_speaker (AngularVector (o -60.0, 0.0)); break; case 3: - /* top, bottom kind-of-left & bottom kind-of-right */ - add_speaker (AngularVector (90.0, 0.0)); - add_speaker (AngularVector (215.0, 0,0)); - add_speaker (AngularVector (335.0, 0,0)); + add_speaker (AngularVector (o +60.0, 0.0)); + add_speaker (AngularVector (o -60.0, 0.0)); + add_speaker (AngularVector (o +180.0, 0.0)); break; case 4: - /* clockwise from top left */ - add_speaker (AngularVector (135.0, 0.0)); - add_speaker (AngularVector (45.0, 0.0)); - add_speaker (AngularVector (335.0, 0.0)); - add_speaker (AngularVector (215.0, 0.0)); + /* 4.0 with regular spacing */ + add_speaker (AngularVector (o +45.0, 0.0)); + add_speaker (AngularVector (o -45.0, 0.0)); + add_speaker (AngularVector (o +135.0, 0.0)); + add_speaker (AngularVector (o -135.0, 0.0)); + break; + case 5: + /* 5.0 with regular spacing */ + add_speaker (AngularVector (o +72.0, 0.0)); + add_speaker (AngularVector (o -72.0, 0.0)); + add_speaker (AngularVector (o +0.0, 0.0)); + add_speaker (AngularVector (o +144.0, 0.0)); + add_speaker (AngularVector (o -144.0, 0.0)); + break; + case 6: + /* 6.0 with regular spacing */ + add_speaker (AngularVector (o +60.0, 0.0)); + add_speaker (AngularVector (o -60.0, 0.0)); + add_speaker (AngularVector (o +0.0, 0.0)); + add_speaker (AngularVector (o +120.0, 0.0)); + add_speaker (AngularVector (o -120.0, 0.0)); + add_speaker (AngularVector (o +180.0, 0.0)); + break; + case 7: + /* 7.0 with regular front spacing */ + add_speaker (AngularVector (o +45.0, 0.0)); + add_speaker (AngularVector (o -45.0, 0.0)); + add_speaker (AngularVector (o +0.0, 0.0)); + add_speaker (AngularVector (o +90.0, 0.0)); + add_speaker (AngularVector (o -90.0, 0.0)); + add_speaker (AngularVector (o +150.0, 0.0)); + add_speaker (AngularVector (o -150.0, 0.0)); + break; + case 10: + /* 5+4 with 45°/90° spacing */ + add_speaker (AngularVector (o +45.0, 0.0)); + add_speaker (AngularVector (o -45.0, 0.0)); + add_speaker (AngularVector (o +0.0, 0.0)); + add_speaker (AngularVector (o +135.0, 0.0)); + add_speaker (AngularVector (o -135.0, 0.0)); + add_speaker (AngularVector (o +45.0, 60.0)); + add_speaker (AngularVector (o -45.0, 60.0)); + add_speaker (AngularVector (o +135.0, 60.0)); + add_speaker (AngularVector (o -135.0, 60.0)); + add_speaker (AngularVector (o +0.0, 90.0)); break; default: