13
0

L: livetrax does not need the Cue midi port

This commit is contained in:
Ben Loftis 2024-05-31 08:18:02 -05:00
parent 5663a2ddd3
commit 07a52faefe
2 changed files with 14 additions and 0 deletions

View File

@ -84,8 +84,10 @@ MidiPortManager::create_ports ()
p = AudioEngine::instance()->register_output_port (DataType::MIDI, X_("MIDI Clock out"), false, TransportGenerator);
_midi_clock_output_port= std::dynamic_pointer_cast<MidiPort> (p);
#ifndef LIVETRAX
p = AudioEngine::instance()->register_input_port (DataType::MIDI, X_("Cue Control in"));
_trigger_input_port= std::dynamic_pointer_cast<MidiPort> (p);
#endif
}
void
@ -98,7 +100,9 @@ MidiPortManager::set_midi_port_states (const XMLNodeList&nodes)
ports.insert (make_pair (_mtc_output_port->name(), _mtc_output_port));
ports.insert (make_pair (_midi_clock_output_port->name(), _midi_clock_output_port));
#ifndef LIVETRAX
ports.insert (make_pair (_trigger_input_port->name(), _trigger_input_port));
#endif
ports.insert (make_pair (_mmc_in->name(), _mmc_in));
ports.insert (make_pair (_mmc_out->name(), _mmc_out));
ports.insert (make_pair (_vkbd_out->name(), _vkbd_out));
@ -128,7 +132,9 @@ MidiPortManager::get_midi_port_states () const
ports.insert (make_pair (_mtc_output_port->name(), _mtc_output_port));
ports.insert (make_pair (_midi_clock_output_port->name(), _midi_clock_output_port));
#ifndef LIVETRAX
ports.insert (make_pair (_trigger_input_port->name(), _trigger_input_port));
#endif
ports.insert (make_pair (_mmc_in->name(), _mmc_in));
ports.insert (make_pair (_mmc_out->name(), _mmc_out));
ports.insert (make_pair (_vkbd_out->name(), _vkbd_out));
@ -156,7 +162,9 @@ MidiPortManager::set_public_latency (bool playback)
pl.push_back (_mtc_output_port);
pl.push_back (_midi_clock_output_port);
#ifndef LIVETRAX
pl.push_back (_trigger_input_port);
#endif
pl.push_back (_mmc_in);
pl.push_back (_mmc_out);
pl.push_back (_vkbd_out);

View File

@ -3085,11 +3085,13 @@ TriggerBox::static_init (Session & s)
input_parser = std::shared_ptr<MIDI::Parser>(new MIDI::Parser); /* leak */
Config->ParameterChanged.connect_same_thread (static_connections, boost::bind (&TriggerBox::static_parameter_changed, _1));
input_parser->any.connect_same_thread (midi_input_connection, boost::bind (&TriggerBox::midi_input_handler, _1, _2, _3, _4));
#ifndef LIVETRAX
std::dynamic_pointer_cast<MidiPort> (s.trigger_input_port())->set_trace (input_parser);
std::string const& dtip (Config->get_default_trigger_input_port());
if (!dtip.empty () && s.engine().get_port_by_name (dtip)) {
s.trigger_input_port()->connect (dtip);
}
#endif
}
void
@ -3148,6 +3150,10 @@ TriggerBox::set_cue_recording (bool yn)
void
TriggerBox::input_port_check ()
{
#ifdef LIVETRAX
return;
#endif
if (Config->get_default_trigger_input_port().empty()) {
return;
}