(3.0 version) some Mackie-emulation systems (e.g. euphonix) send zero for the tick...
authorPaul Davis <paul@linuxaudiosystems.com>
Tue, 19 Oct 2010 15:43:05 +0000 (15:43 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Tue, 19 Oct 2010 15:43:05 +0000 (15:43 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7907 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/surfaces/mackie/mackie_port.cc

index 1443aaa425514fca64ea5fce4e280fdf0af10466..aa80fc0616d07f4a7e202c781246d54ba25f0023 100644 (file)
@@ -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 );
                                
                                /*