summaryrefslogtreecommitdiff
path: root/libs/surfaces
diff options
context:
space:
mode:
authorLen Ovens <len@ovenwerks.net>2016-10-30 17:50:38 -0700
committerLen Ovens <len@ovenwerks.net>2016-10-30 17:50:38 -0700
commit77c91067691974d469fd0a9ba713863903e62a33 (patch)
tree727128da6725da0af83aaf9c83b4384e4fc4c05c /libs/surfaces
parent3f0130f8ead44fe6576a33bbe6b3b52156a15248 (diff)
OSC: Make Aux buses able to be separate.
Diffstat (limited to 'libs/surfaces')
-rw-r--r--libs/surfaces/osc/osc.cc30
-rw-r--r--libs/surfaces/osc/osc.h2
-rw-r--r--libs/surfaces/osc/osc_gui.cc13
-rw-r--r--libs/surfaces/osc/osc_gui.h1
4 files changed, 39 insertions, 7 deletions
diff --git a/libs/surfaces/osc/osc.cc b/libs/surfaces/osc/osc.cc
index a7208e8ab2..4c56a239c6 100644
--- a/libs/surfaces/osc/osc.cc
+++ b/libs/surfaces/osc/osc.cc
@@ -844,7 +844,14 @@ OSC::catchall (const char *path, const char* types, lo_arg **argv, int argc, lo_
current_value_query (path, len, argv, argc, msg);
ret = 0;
- } else if (strcmp (path, "/strip/listen") == 0) {
+ } else
+ if (!strncmp (path, "/cue/", 5)) {
+
+ //cue_parse (path, types, argv, argc, msg)
+
+ ret = 0;
+ } else
+ if (strcmp (path, "/strip/listen") == 0) {
cerr << "set up listener\n";
@@ -874,7 +881,8 @@ OSC::catchall (const char *path, const char* types, lo_arg **argv, int argc, lo_
ret = 0;
- } else if (strcmp (path, "/strip/ignore") == 0) {
+ } else
+ if (strcmp (path, "/strip/ignore") == 0) {
for (int n = 0; n < argc; ++n) {
@@ -3366,8 +3374,22 @@ OSC::get_sorted_stripables(std::bitset<32> types)
if (types[1] && (s->presentation_info().flags() & PresentationInfo::MidiTrack)) {
sorted.push_back (s);
} else
- if (types[2] && (s->presentation_info().flags() & PresentationInfo::AudioBus)) {
- sorted.push_back (s);
+/* if (types[2] && (s->presentation_info().flags() & PresentationInfo::AudioBus)) {
+ sorted.push_back (s); */
+ if ((s->presentation_info().flags() & PresentationInfo::AudioBus)) {
+ boost::shared_ptr<Route> r = boost::dynamic_pointer_cast<Route> (s);
+ // r->feeds (session->master_out()) may make more sense
+ if (r->direct_feeds_according_to_reality (session->master_out())) {
+ // this is a bus
+ if (types[2]) {
+ sorted.push_back (s);
+ }
+ } else {
+ // this is an Aux out
+ if (types[7]) {
+ sorted.push_back (s);
+ }
+ }
} else
if (types[3] && (s->presentation_info().flags() & PresentationInfo::MidiBus)) {
sorted.push_back (s);
diff --git a/libs/surfaces/osc/osc.h b/libs/surfaces/osc/osc.h
index e15eb9a454..15c0b89bdc 100644
--- a/libs/surfaces/osc/osc.h
+++ b/libs/surfaces/osc/osc.h
@@ -98,6 +98,8 @@ class OSC : public ARDOUR::ControlProtocol, public AbstractUI<OSCUIRequest>
typedef std::vector<boost::shared_ptr<ARDOUR::Stripable> > Sorted;
Sorted get_sorted_stripables(std::bitset<32> types);
+ // cue
+ //Sorted cue_get_sorted_stripables(boost::shared_ptr<Route> aux);
// keep a surface's global setup by remote server url
struct OSCSurface {
diff --git a/libs/surfaces/osc/osc_gui.cc b/libs/surfaces/osc/osc_gui.cc
index 5b7e749fb5..9b1c29a3ad 100644
--- a/libs/surfaces/osc/osc_gui.cc
+++ b/libs/surfaces/osc/osc_gui.cc
@@ -212,6 +212,12 @@ OSC_GUI::OSC_GUI (OSC& p)
sttable->attach (audio_buses, 1, 2, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
++stn;
+ label = manage (new Gtk::Label(_("Audio Auxes:")));
+ label->set_alignment(1, .5);
+ sttable->attach (*label, 0, 1, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
+ sttable->attach (audio_auxes, 1, 2, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0), 0, 0);
+ ++stn;
+
label = manage (new Gtk::Label(_("Midi Buses:")));
label->set_alignment(1, .5);
sttable->attach (*label, 0, 1, stn, stn+1, AttachOptions(FILL|EXPAND), AttachOptions(0));
@@ -366,6 +372,7 @@ OSC_GUI::OSC_GUI (OSC& p)
audio_tracks.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::set_bitsets));
midi_tracks.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::set_bitsets));
audio_buses.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::set_bitsets));
+ audio_auxes.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::set_bitsets));
midi_buses.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::set_bitsets));
control_masters.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::set_bitsets));
master_type.signal_clicked().connect (sigc::mem_fun (*this, &OSC_GUI::set_bitsets));
@@ -671,9 +678,9 @@ OSC_GUI::calculate_strip_types ()
if (monitor_type.get_active()) {
stvalue += 64;
}
- /*if (Auditioner_type.get_active()) {
- stvalue += 128; // this one has no user accessable controls
- }*/
+ if (audio_auxes.get_active()) {
+ stvalue += 128;
+ }
if (selected_tracks.get_active()) {
stvalue += 256;
}
diff --git a/libs/surfaces/osc/osc_gui.h b/libs/surfaces/osc/osc_gui.h
index e1ae823952..ae3640c1ee 100644
--- a/libs/surfaces/osc/osc_gui.h
+++ b/libs/surfaces/osc/osc_gui.h
@@ -80,6 +80,7 @@ private:
Gtk::CheckButton audio_tracks;
Gtk::CheckButton midi_tracks;
Gtk::CheckButton audio_buses;
+ Gtk::CheckButton audio_auxes;
Gtk::CheckButton midi_buses;
Gtk::CheckButton control_masters;
Gtk::CheckButton master_type;