#include <map>
-#include <pbd/error.h>
-#include <midi++/mmc.h>
-#include <midi++/port.h>
-#include <midi++/parser.h>
+#include "pbd/error.h"
+#include "midi++/mmc.h"
+#include "midi++/port.h"
+#include "midi++/parser.h"
using namespace std;
using namespace MIDI;
+using namespace PBD;
static std::map<int,string> mmc_cmd_map;
static void build_mmc_cmd_map ()
}
-MachineControl::MachineControl (Port &p, float version,
- CommandSignature &csig,
- ResponseSignature &rsig)
+MachineControl::MachineControl (Port &p, float /*version*/,
+ CommandSignature & /*csig*/,
+ ResponseSignature & /*rsig*/)
: _port (p)
{
build_mmc_cmd_map ();
- _device_id = 1;
+ _receive_device_id = 0;
+ _send_device_id = 0x7f;
if ((parser = _port.input()) != 0) {
parser->mmc.connect
}
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
}
void
-MachineControl::process_mmc_message (Parser &p, byte *msg, size_t len)
+MachineControl::process_mmc_message (Parser &, byte *msg, size_t len)
{
size_t skiplen;
*/
#if 0
- cerr << "*** 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;
}
}
void
-MachineControl::write_track_record_ready (byte *msg, size_t len)
+MachineControl::write_track_record_ready (byte *msg, size_t /*len*/)
{
size_t n;
}
int
-MachineControl::do_locate (byte *msg, size_t msglen)
+MachineControl::do_locate (byte *msg, size_t /*msglen*/)
{
if (msg[2] == 0) {
}
int
-MachineControl::do_step (byte *msg, size_t msglen)
+MachineControl::do_step (byte *msg, size_t /*msglen*/)
{
int steps = msg[2] & 0x3f;
}
int
-MachineControl::do_shuttle (byte *msg, size_t msglen)
+MachineControl::do_shuttle (byte *msg, size_t /*msglen*/)
{
size_t forward;