From 326d227323c8a584bd86f75fa48da9e5bdd0d804 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 19 Oct 2010 15:43:05 +0000 Subject: [PATCH] (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 --- libs/surfaces/mackie/mackie_port.cc | 6 ++++++ 1 file changed, 6 insertions(+) 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 ); /*