diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-08-06 14:19:19 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-08-06 14:19:19 +0000 |
commit | b9b6ba8be490622dff662c23d9c77c9eee1291b3 (patch) | |
tree | db5eaba409c1808ecce47e97623d0fe110ac6d8d /libs/midi++2/mmc.cc | |
parent | 684ef0eb7a1ca371a1e93fdceb271aa9d40a7dae (diff) |
merge changes to libmidi++ API from 2.0-ongoing
git-svn-id: svn://localhost/ardour2/trunk@2256 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/midi++2/mmc.cc')
-rw-r--r-- | libs/midi++2/mmc.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libs/midi++2/mmc.cc b/libs/midi++2/mmc.cc index 28d6393fb4..1ede281c28 100644 --- a/libs/midi++2/mmc.cc +++ b/libs/midi++2/mmc.cc @@ -202,7 +202,8 @@ MachineControl::MachineControl (Port &p, float version, build_mmc_cmd_map (); - _device_id = 0; + _receive_device_id = 0; + _send_device_id = 0x7f; if ((parser = _port.input()) != 0) { parser->mmc.connect @@ -214,10 +215,15 @@ MachineControl::MachineControl (Port &p, float version, } void -MachineControl::set_device_id (byte id) +MachineControl::set_receive_device_id (byte id) +{ + _receive_device_id = id & 0x7f; +} +void +MachineControl::set_send_device_id (byte id) { - _device_id = id & 0x7f; + _send_device_id = id & 0x7f; } bool @@ -258,14 +264,14 @@ MachineControl::process_mmc_message (Parser &p, byte *msg, size_t len) */ #if 0 - cerr << "*** me = " << (int) _device_id << " MMC message: len = " << len << "\n\t"; + cerr << "*** me = " << (int) _receive_device_id << " MMC message: len = " << len << "\n\t"; for (size_t i = 0; i < len; i++) { cerr << hex << (int) msg[i] << dec << ' '; } cerr << endl; #endif - if (msg[1] != 0x7f && msg[1] != _device_id) { + if (msg[1] != 0x7f && msg[1] != _receive_device_id) { return; } |