]> sigrok.org Git - libsigrokdecode.git/commitdiff
midi: Fix two incorrect sample numbers.
authorUwe Hermann <redacted>
Wed, 15 Oct 2014 13:22:48 +0000 (15:22 +0200)
committerUwe Hermann <redacted>
Wed, 15 Oct 2014 13:22:48 +0000 (15:22 +0200)
decoders/midi/pd.py

index 68a8369bc2d7f38053af1282b55edbe49644070e..296cee47e12be8d53fcc8452a32dac9318f1b0a9 100644 (file)
@@ -70,7 +70,7 @@ class Decoder(srd.Decoder):
         c = self.cmd
         if len(c) < 3:
             return
-        self.es_block = self.ss
+        self.es_block = self.es
         msg, chan, note, velocity = c[0] & 0xf0, (c[0] & 0x0f) + 1, c[1], c[2]
         s = 'note off' if (velocity == 0) else status_bytes[msg]
         self.putx([0, ['Channel %d: %s (note = %d, velocity = %d)' % \
@@ -162,7 +162,7 @@ class Decoder(srd.Decoder):
 
     def handle_sysrealtime_msg(self, newbyte):
         # System realtime message: 0b11111ttt (t = message type)
-        self.es_block = self.ss
+        self.es_block = self.es
         self.putx([0, ['System realtime message: %s' % status_bytes[newbyte]]])
         self.cmd, self.state = [], 'IDLE'