diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-20 21:26:20 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-02-20 21:26:20 +0000 |
commit | 326cd24c12d8b11402ef0c10507ecbdea8f86d7f (patch) | |
tree | 315d307f6f14439651b75be5206437970ad50c0f /libs/ardour/session_midi.cc | |
parent | 780e9d7ecb224a4f95de06d4af2d3795565bcec0 (diff) |
make MMC work again, make tracing MIDI input work again, add GUI control for MMC device ID ++
git-svn-id: svn://localhost/ardour2/trunk@1480 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_midi.cc')
-rw-r--r-- | libs/ardour/session_midi.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc index 8a553fb12d..24ba406087 100644 --- a/libs/ardour/session_midi.cc +++ b/libs/ardour/session_midi.cc @@ -126,9 +126,20 @@ Session::set_mtc_port (string port_tag) return 0; } +void +Session::set_mmc_device_id (uint32_t device_id) +{ + if (mmc) { + mmc->set_device_id (device_id); + } +} + int Session::set_mmc_port (string port_tag) { + MIDI::byte old_device_id; + bool reset_id = false; + if (port_tag.length() == 0) { if (_mmc_port == 0) { return 0; @@ -146,6 +157,8 @@ Session::set_mmc_port (string port_tag) _mmc_port = port; if (mmc) { + old_device_id = mmc->device_id(); + reset_id = true; delete mmc; } @@ -153,6 +166,9 @@ Session::set_mmc_port (string port_tag) MMC_CommandSignature, MMC_ResponseSignature); + if (reset_id) { + mmc->set_device_id (old_device_id); + } mmc->Play.connect (mem_fun (*this, &Session::mmc_deferred_play)); @@ -181,6 +197,7 @@ Session::set_mmc_port (string port_tag) mmc->TrackRecordStatusChange.connect (mem_fun (*this, &Session::mmc_record_enable)); + /* also handle MIDI SPP because its so common */ _mmc_port->input()->start.connect (mem_fun (*this, &Session::spp_start)); @@ -543,7 +560,6 @@ Session::mmc_pause (MIDI::MachineControl &mmc) static bool step_queued = false; void - Session::mmc_step (MIDI::MachineControl &mmc, int steps) { if (!Config->get_mmc_control()) { |