Changes in interfaces/python/aubioinput.py [1f8e522:228e8d8]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
interfaces/python/aubioinput.py
r1f8e522 r228e8d8 10 10 import numpy 11 11 samples = numpy.frombuffer(buffer.data, dtype=numpy.float32) 12 samples.resize([len(samples)/chan, chan]) 13 return samples.T 12 if chan == 1: 13 return samples.T 14 else: 15 samples.resize([len(samples)/chan, chan]) 16 return samples.T 14 17 15 18 class AubioSink(gst.BaseSink): … … 53 56 if self.process: 54 57 self.process(v, self.pos) 55 self.pos += 1 58 self.pos += 1 59 remaining = self.adapter.available() 60 if remaining < blocksize and remaining > 0: 61 block = self.adapter.take_buffer(remaining) 62 v = gst_buffer_to_numpy_array(block, chan) 63 if self.process: 64 self.process(v, self.pos) 65 self.pos += 1 56 66 return gst.FLOW_OK 57 67
Note: See TracChangeset
for help on using the changeset viewer.