#include "ardour/graph.h"
#include "midi++/jack.h"
+#include "midi++/mmc.h"
#include "i18n.h"
: _engine (eng),
_target_transport_speed (0.0),
_requested_return_frame (-1),
- mmc (0),
- _mmc_port (default_mmc_port),
+ _mmc (0),
_mtc_port (default_mtc_port),
_midi_port (default_midi_port),
_midi_clock_port (default_midi_clock_port),
Crossfade::set_buffer_size (0);
- delete mmc;
+ delete _mmc;
/* not strictly necessary, but doing it here allows the shared_ptr debugging to work */
playlists.reset ();
snprintf (buf, sizeof (buf), _("out %" PRIu32), np+1);
shared_ptr<Bundle> c (new Bundle (buf, true));
- c->add_channel (_("mono"));
+ c->add_channel (_("mono"), DataType::AUDIO);
c->set_port (0, _engine.get_nth_physical_output (DataType::AUDIO, np));
add_bundle (c);
char buf[32];
snprintf (buf, sizeof(buf), _("out %" PRIu32 "+%" PRIu32), np + 1, np + 2);
shared_ptr<Bundle> c (new Bundle (buf, true));
- c->add_channel (_("L"));
+ c->add_channel (_("L"), DataType::AUDIO);
c->set_port (0, _engine.get_nth_physical_output (DataType::AUDIO, np));
- c->add_channel (_("R"));
+ c->add_channel (_("R"), DataType::AUDIO);
c->set_port (1, _engine.get_nth_physical_output (DataType::AUDIO, np + 1));
add_bundle (c);
snprintf (buf, sizeof (buf), _("in %" PRIu32), np+1);
shared_ptr<Bundle> c (new Bundle (buf, false));
- c->add_channel (_("mono"));
+ c->add_channel (_("mono"), DataType::AUDIO);
c->set_port (0, _engine.get_nth_physical_input (DataType::AUDIO, np));
add_bundle (c);
snprintf (buf, sizeof(buf), _("in %" PRIu32 "+%" PRIu32), np + 1, np + 2);
shared_ptr<Bundle> c (new Bundle (buf, false));
- c->add_channel (_("L"));
+ c->add_channel (_("L"), DataType::AUDIO);
c->set_port (0, _engine.get_nth_physical_input (DataType::AUDIO, np));
- c->add_channel (_("R"));
+ c->add_channel (_("R"), DataType::AUDIO);
c->set_port (1, _engine.get_nth_physical_input (DataType::AUDIO, np + 1));
add_bundle (c);
if (g_atomic_int_get (&_record_status) != Recording) {
g_atomic_int_set (&_record_status, Recording);
_last_record_location = _transport_frame;
- deliver_mmc(MIDI::MachineControl::cmdRecordStrobe, _last_record_location);
+ if (_mmc) {
+ _mmc->send (MIDI::MachineControlCommand (MIDI::MachineControl::cmdRecordStrobe));
+ }
if (Config->get_monitoring_model() == HardwareMonitoring && config.get_auto_input()) {
if ((!Config->get_latched_record_enable () && !play_loop) || force) {
g_atomic_int_set (&_record_status, Disabled);
+ if (_mmc) {
+ _mmc->send (MIDI::MachineControlCommand (MIDI::MachineControl::cmdRecordExit));
+ }
} else {
if (rs == Recording) {
g_atomic_int_set (&_record_status, Enabled);
}
}
- // FIXME: timestamp correct? [DR]
- // FIXME FIXME FIXME: rt_context? this must be called in the process thread.
- // does this /need/ to be sent in all cases?
- if (rt_context) {
- deliver_mmc (MIDI::MachineControl::cmdRecordExit, _transport_frame);
- }
-
if (Config->get_monitoring_model() == HardwareMonitoring && config.get_auto_input()) {
boost::shared_ptr<RouteList> rl = routes.reader ();
enable_record ();
}
} else {
- deliver_mmc (MIDI::MachineControl::cmdRecordPause, _transport_frame);
+ if (_mmc) {
+ _mmc->send (MIDI::MachineControlCommand (MIDI::MachineControl::cmdRecordPause));
+ }
RecordStateChanged (); /* EMIT SIGNAL */
}