OSC: Make Aux buses able to be separate.
authorLen Ovens <len@ovenwerks.net>
Mon, 31 Oct 2016 00:50:38 +0000 (17:50 -0700)
committerLen Ovens <len@ovenwerks.net>
Mon, 31 Oct 2016 00:50:38 +0000 (17:50 -0700)
libs/surfaces/osc/osc.cc
libs/surfaces/osc/osc.h
libs/surfaces/osc/osc_gui.cc
libs/surfaces/osc/osc_gui.h

index a7208e8ab2380031b0a31e122f4c4b6edbe981d2..4c56a239c6c456415a817f0173f25f622075b75a 100644 (file)
@@ -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);
index e15eb9a45463eaa97ce418651b8476080cb7412b..15c0b89bdcf4a623182da52bb00fef826bb31ebd 100644 (file)
@@ -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 {
index 5b7e749fb5ed2748d7954c9d02326d373e926fb1..9b1c29a3ad2b9bb14c3b02fbd03d9de7e3404019 100644 (file)
@@ -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;
        }
index e1ae82395211867f9ce9e3bb79d43f1e2004f14c..ae3640c1eea8e56315dc77004c5af92fb80e1aac 100644 (file)
@@ -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;