support for MMC track mute register, in addition to existing track record status register
git-svn-id: svn://localhost/ardour2/branches/3.0@6156 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5cfeaf4102
commit
47c88ff7d1
@ -154,6 +154,13 @@ class MachineControl : public sigc::trackable
|
||||
sigc::signal<void,MachineControl &,size_t,bool>
|
||||
TrackRecordStatusChange;
|
||||
|
||||
/* The second argument specifies the desired track record enabled
|
||||
status.
|
||||
*/
|
||||
|
||||
sigc::signal<void,MachineControl &,size_t,bool>
|
||||
TrackMuteChange;
|
||||
|
||||
/* The second argument points to a byte array containing
|
||||
the locate target value in MMC Standard Time Code
|
||||
format (5 bytes, roughly: hrs/mins/secs/frames/subframes)
|
||||
@ -196,7 +203,7 @@ class MachineControl : public sigc::trackable
|
||||
byte fixedSpeed;
|
||||
byte lifterDefeat;
|
||||
byte controlDisable;
|
||||
byte trackMute;
|
||||
byte trackMute[MMC_NTRACKS];
|
||||
byte failure;
|
||||
byte selectedTimeCode;
|
||||
byte shortSelectedTimeCode;
|
||||
@ -256,8 +263,8 @@ class MachineControl : public sigc::trackable
|
||||
int do_locate (byte *, size_t len);
|
||||
int do_step (byte *, size_t len);
|
||||
int do_shuttle (byte *, size_t len);
|
||||
|
||||
void write_track_record_ready (byte *, size_t len);
|
||||
|
||||
void write_track_status (byte *, size_t len, byte reg);
|
||||
};
|
||||
|
||||
} // namespace MIDI
|
||||
|
@ -464,7 +464,11 @@ MachineControl::do_masked_write (byte *msg, size_t len)
|
||||
|
||||
switch (msg[2]) {
|
||||
case 0x4f: /* Track Record Ready Status */
|
||||
write_track_record_ready (&msg[3], len - 3);
|
||||
write_track_status (&msg[3], len - 3, msg[2]);
|
||||
break;
|
||||
|
||||
case 0x62: /* track mute */
|
||||
write_track_status (&msg[3], len - 3, msg[2]);
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -478,8 +482,7 @@ MachineControl::do_masked_write (byte *msg, size_t len)
|
||||
}
|
||||
|
||||
void
|
||||
MachineControl::write_track_record_ready (byte *msg, size_t /*len*/)
|
||||
|
||||
MachineControl::write_track_status (byte *msg, size_t /*len*/, byte reg)
|
||||
{
|
||||
size_t n;
|
||||
ssize_t base_track;
|
||||
@ -549,14 +552,18 @@ MachineControl::write_track_record_ready (byte *msg, size_t /*len*/)
|
||||
bit set.
|
||||
*/
|
||||
|
||||
if (msg[2] & (1<<n)) {
|
||||
trackRecordStatus[base_track+n] = true;
|
||||
TrackRecordStatusChange (*this, base_track+n,
|
||||
true);
|
||||
} else {
|
||||
trackRecordStatus[base_track+n] = false;
|
||||
TrackRecordStatusChange (*this, base_track+n,
|
||||
false);
|
||||
bool val = (msg[2] & (1<<n));
|
||||
|
||||
switch (reg) {
|
||||
case 0x4f:
|
||||
trackRecordStatus[base_track+n] = val;
|
||||
TrackRecordStatusChange (*this, base_track+n, val);
|
||||
break;
|
||||
|
||||
case 0x62:
|
||||
trackMute[base_track+n] = val;
|
||||
TrackMuteChange (*this, base_track+n, val);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user