Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • interfaces/python/aubioinput.py

    r228e8d8 r1f8e522  
    1010    import numpy
    1111    samples = numpy.frombuffer(buffer.data, dtype=numpy.float32)
    12     if chan == 1:
    13         return samples.T
    14     else:
    15         samples.resize([len(samples)/chan, chan])
    16         return samples.T
     12    samples.resize([len(samples)/chan, chan])
     13    return samples.T
    1714
    1815class AubioSink(gst.BaseSink):
     
    5653            if self.process:
    5754                self.process(v, self.pos)
    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
     55            self.pos += 1   
    6656        return gst.FLOW_OK
    6757
Note: See TracChangeset for help on using the changeset viewer.