Re: [Sndobj-devel] Problem with PushIn and Numpy array from h5py
Status: Abandoned
Brought to you by:
veplaini
From: Luigi C. <lui...@ya...> - 2009-06-30 15:10:18
|
--- Mar 30/6/09, Luigi Curzi <lui...@ya...> ha scritto: > Da: Luigi Curzi <lui...@ya...> > Oggetto: [Sndobj-devel] Problem with PushIn and Numpy array from h5py > A: snd...@li... > Data: Martedì 30 giugno 2009, 13:38 > > i use python-sndobj. > i created a sndthread with a callback function that pushes > in a slice from a numpy array in sndobj; the numpy array is > a view from an h5py file (created using h5py library > facilities) > > def __process_callback(self, channels): > if self.stream.pos_ptr < stop: > for i in > range(channels): > >self.channels[i].PushIn(self.stream.audiodata.get_slice(self.stream.pos_ptr, > > > > > self.stream.pos_ptr + 256, i) * 32768) > self.stream.pos_ptr += 256 > > i think that the problem is in h5py + sndthread, because > also without pushin function in the callback, application > crashes. > if i use same array in a qthread or in a python thread it > works without problems; > i forgot to explain that get_slice() is a method that retrieves a slice from an array stored in a h5 file (through h5py). thanks in advice. Luigi |