diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-10-19 15:43:05 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-10-19 15:43:05 +0000 |
commit | 326d227323c8a584bd86f75fa48da9e5bdd0d804 (patch) | |
tree | cbbdef810e8dfbaddf29cca52611149c17c6ef3c /libs/surfaces/mackie/mackie_port.cc | |
parent | ed5e141b7188187687bbbcd0dea5b3b74834ddd7 (diff) |
(3.0 version) some Mackie-emulation systems (e.g. euphonix) send zero for the tick count when the jog wheel is moved, so accomodate this by pretending that they reported 1 tick
git-svn-id: svn://localhost/ardour2/branches/3.0@7907 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/mackie/mackie_port.cc')
-rw-r--r-- | libs/surfaces/mackie/mackie_port.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libs/surfaces/mackie/mackie_port.cc b/libs/surfaces/mackie/mackie_port.cc index 1443aaa425..aa80fc0616 100644 --- a/libs/surfaces/mackie/mackie_port.cc +++ b/libs/surfaces/mackie/mackie_port.cc @@ -444,6 +444,12 @@ void MackiePort::handle_midi_any (MIDI::Parser &, MIDI::byte * raw_bytes, size_t state.sign = ( raw_bytes[2] & 0x40 ) == 0 ? 1 : -1; // bytes[2] & 0b00111111 (0x3f) gives delta state.ticks = ( raw_bytes[2] & 0x3f); + if (state.ticks == 0) { + /* euphonix and perhaps other devices send zero + when they mean 1, we think. + */ + state.ticks = 1; + } state.delta = float( state.ticks ) / float( 0x3f ); /* |