show transport master ports in their own "Sync" bundle in the global port matrices
This commit is contained in:
parent
cd5eae3556
commit
ca022f6bb7
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "midi++/mmc.h"
|
||||
|
||||
#include "ardour/audio_port.h"
|
||||
#include "ardour/async_midi_port.h"
|
||||
#include "ardour/audioengine.h"
|
||||
#include "ardour/auditioner.h"
|
||||
|
@ -39,6 +40,8 @@
|
|||
#include "ardour/profile.h"
|
||||
#include "ardour/session.h"
|
||||
#include "ardour/sidechain.h"
|
||||
#include "ardour/transport_master.h"
|
||||
#include "ardour/transport_master_manager.h"
|
||||
#include "ardour/user_bundle.h"
|
||||
|
||||
#include "control_protocol/control_protocol.h"
|
||||
|
@ -452,20 +455,41 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
|
|||
|
||||
if (type == DataType::AUDIO || type == DataType::NIL) {
|
||||
if (!inputs) {
|
||||
|
||||
program->add_bundle (session->the_auditioner()->output()->bundle());
|
||||
program->add_bundle (session->click_io()->bundle());
|
||||
|
||||
/* Note: the LTC ports do not have the usual ":audio_out 1" postfix, so
|
||||
* program->add_bundle (session->ltc_output_io()->bundle());
|
||||
* won't work
|
||||
*/
|
||||
|
||||
boost::shared_ptr<Bundle> ltc (new Bundle (_("LTC Out"), inputs));
|
||||
ltc->add_channel (_("LTC Out"), DataType::AUDIO, session->engine().make_port_name_non_relative (session->ltc_output_port()->name()));
|
||||
program->add_bundle (ltc);
|
||||
|
||||
} else {
|
||||
// XXX TRANSPORTMASTERS
|
||||
//boost::shared_ptr<Bundle> ltc (new Bundle (_("LTC In"), inputs));
|
||||
// ltc->add_channel (_("LTC In"), DataType::AUDIO, session->engine().make_port_name_non_relative (session->ltc_input_port()->name()));
|
||||
// program->add_bundle (ltc);
|
||||
|
||||
boost::shared_ptr<Bundle> sync (new Bundle (_("Sync"), inputs));
|
||||
AudioEngine* ae = AudioEngine::instance();
|
||||
TransportMasterManager::TransportMasters const & tm (TransportMasterManager::instance().transport_masters());
|
||||
|
||||
for (TransportMasterManager::TransportMasters::const_iterator i = tm.begin(); i != tm.end(); ++i) {
|
||||
|
||||
boost::shared_ptr<Port> port = (*i)->port ();
|
||||
|
||||
if (!port) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!boost::dynamic_pointer_cast<AudioPort> (port)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
sync->add_channel ((*i)->name(), DataType::AUDIO, ae->make_port_name_non_relative (port->name()));
|
||||
}
|
||||
|
||||
program->add_bundle (sync);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -504,19 +528,27 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
|
|||
if ((type == DataType::MIDI || type == DataType::NIL)) {
|
||||
boost::shared_ptr<Bundle> sync (new Bundle (_("Sync"), inputs));
|
||||
AudioEngine* ae = AudioEngine::instance();
|
||||
TransportMasterManager::TransportMasters const & tm (TransportMasterManager::instance().transport_masters());
|
||||
|
||||
if (inputs) {
|
||||
// XXX TRANSPORTMASTER
|
||||
// sync->add_channel (
|
||||
// _("MTC in"), DataType::MIDI, ae->make_port_name_non_relative (session->mtc_input_port()->name())
|
||||
// );
|
||||
// sync->add_channel (
|
||||
// _("MIDI clock in"), DataType::MIDI, ae->make_port_name_non_relative (session->midi_clock_input_port()->name())
|
||||
//);
|
||||
sync->add_channel (
|
||||
_("MMC in"), DataType::MIDI, ae->make_port_name_non_relative (session->mmc_input_port()->name())
|
||||
);
|
||||
|
||||
for (TransportMasterManager::TransportMasters::const_iterator i = tm.begin(); i != tm.end(); ++i) {
|
||||
boost::shared_ptr<Port> port = (*i)->port ();
|
||||
if (!port) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!boost::dynamic_pointer_cast<MidiPort> (port)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
sync->add_channel ((*i)->name(), DataType::MIDI, ae->make_port_name_non_relative (port->name()));
|
||||
}
|
||||
|
||||
sync->add_channel (_("MMC in"), DataType::MIDI, ae->make_port_name_non_relative (session->mmc_input_port()->name()));
|
||||
|
||||
} else {
|
||||
|
||||
sync->add_channel (
|
||||
_("MTC out"), DataType::MIDI, ae->make_port_name_non_relative (session->mtc_output_port()->name())
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue