- def decode(self, ss, es, data):
- if not self.samplerate:
- raise SamplerateError('Cannot decode without samplerate.')
-
- for (self.samplenum, (step, direction)) in data:
- if step == 1 and self.oldstep == 0:
- self.step(self.samplenum, direction)
- self.oldstep = step
+ def decode(self):
+ while True:
+ step, direction = self.wait({0: 'r'})
+ self.step(self.samplenum, direction)