NO-OP; Backport changes from Mixbus branch
authorRobin Gareus <robin@gareus.org>
Sun, 27 Nov 2016 21:54:05 +0000 (22:54 +0100)
committerRobin Gareus <robin@gareus.org>
Sun, 27 Nov 2016 21:54:23 +0000 (22:54 +0100)
libs/ardour/audio_diskstream.cc
libs/ardour/diskstream.cc
libs/ardour/track.cc
libs/surfaces/mackie/mackie_control_protocol.cc
libs/surfaces/mackie/mcp_buttons.cc
libs/surfaces/mackie/strip.cc

index 330b9d582acda0367d509993f54c0b1b2b98e339..53ab63961ded7bebb3720a7197bbc6dc934a80fe 100644 (file)
@@ -2174,6 +2174,22 @@ AudioDiskstream::set_align_style_from_io ()
                }
        }
 
+#ifdef MIXBUS
+       // compensate for latency when bouncing from master or mixbus.
+       // we need to use "ExistingMaterial" to pick up the master bus' latency
+       // see also Route::direct_feeds_according_to_reality
+       IOVector ios;
+       ios.push_back (_io);
+       if (_session.master_out() && ios.fed_by (_session.master_out()->output())) {
+               have_physical = true;
+       }
+       for (uint32_t n = 0; n < NUM_MIXBUSES && !have_physical; ++n) {
+               if (_session.get_mixbus (n) && ios.fed_by (_session.get_mixbus(n)->output())) {
+                       have_physical = true;
+               }
+       }
+#endif
+
        if (have_physical) {
                set_align_style (ExistingMaterial);
        } else {
index ebd11a1887d1e9c71991908e0fa23ee23561ffb8..a81c1e473d2a64548c29a5beb2880fd0f4bd8495 100644 (file)
@@ -260,6 +260,16 @@ Diskstream::set_capture_offset ()
                _capture_offset = 0;
                break;
        }
+#ifdef MIXBUS
+       framecnt_t port_offset;
+       if (_track->mixbus_internal_bounce (port_offset)) {
+               /* _capture_offset may become negative, but the sum
+                * _capture_offset + existing_material_offset
+                * will be postive.
+                */
+               _capture_offset -= port_offset;
+       }
+#endif
 
         DEBUG_TRACE (DEBUG::CaptureAlignment, string_compose ("%1: using IO latency, capture offset set to %2 with style = %3\n", name(), _capture_offset, enum_2_string (_alignment_style)));
 }
index 02c44eddf7dcb46b52b6599121949d8736a44fa3..7cdca70d3ba7941dd1a98920c12a0530f368132d 100644 (file)
@@ -27,6 +27,7 @@
 #include "ardour/playlist.h"
 #include "ardour/port.h"
 #include "ardour/processor.h"
+#include "ardour/profile.h"
 #include "ardour/record_enable_control.h"
 #include "ardour/record_safe_control.h"
 #include "ardour/route_group_specialized.h"
@@ -365,7 +366,8 @@ Track::no_roll (pframes_t nframes, framepos_t start_frame, framepos_t end_frame,
 
        /* no outputs? nothing to do ... what happens if we have sends etc. ? */
 
-       if (n_outputs().n_total() == 0) {
+       if (n_outputs().n_total() == 0 && !ARDOUR::Profile->get_mixbus()) {
+               //Note: Mixbus has its own output mechanism, so we should operate even if no explicit outputs are assigned
                return 0;
        }
 
index 2ea61cc9f0baf0b64ab0a71964f834e10b55c2a8..1a73ad56b9adad15f5dd2bd5a95f45f5d33b48ac 100644 (file)
@@ -320,7 +320,7 @@ MackieControlProtocol::get_sorted_stripables()
                        break;
                case Auxes: // in ardour, for now aux and buss are same. for mixbus, "Busses" are mixbuses, "Auxes" are ardour buses
 #ifdef MIXBUS
-                       if (!s->mixbus() && !is_track() && !s->presentation_info().hidden())
+                       if (!s->mixbus() && !is_track(s) && !s->presentation_info().hidden())
 #else
                        if (!is_track(s) && !s->presentation_info().hidden())
 #endif
index 5f3d2766c8c11513b6d143352a128e0387711377..3fbc8461113c514dfa5d865690c1d51ee01c9d1c 100644 (file)
@@ -934,6 +934,9 @@ MackieControlProtocol::miditracks_release (Mackie::Button&)
 Mackie::LedState
 MackieControlProtocol::inputs_press (Mackie::Button&)
 {
+#ifdef MIXBUS
+       set_view_mode (Mixer);  //in Mixbus, this is the same as Global View (avoid dead buttons)
+#endif
        return none;
 }
 Mackie::LedState
@@ -955,6 +958,9 @@ MackieControlProtocol::audiotracks_release (Mackie::Button&)
 Mackie::LedState
 MackieControlProtocol::audioinstruments_press (Mackie::Button& b)
 {
+#ifdef MIXBUS
+       set_view_mode (MidiTracks);  //in Mixbus, we do the same thing as MIDI Tracks ( aviod dead buttons )
+#endif
        return none;
 }
 
index 1c2fe8d1b9cbd80f5ccfe735fab80a999b207a0f..e7ce72cff872f6b8a330cd98794b24991c2ef9d7 100644 (file)
@@ -1341,6 +1341,12 @@ Strip::vpot_mode_string ()
        default:
                break;
        }
+#ifdef MIXBUS
+       //"None" mode, by definition (currently) shows the pan control above the fader.
+       //Mixbus controllers are created from a LADSPA so they don't have ac->desc().type
+       //For the forseeable future, we will just return "Pan" here.
+       return "Pan";
+#endif
 
        return "???";
 }