audiostream
audiostream copied to clipboard
Python3 support
Hello,
It seems that audiostream is not yet ready for python3. I tried to fix a few errors but then my knowledge found its limits.
-
In sources directory, two files have problems with arrays (waves.pyx and puredata.pyx): search for lines like that :
buf = array('h', '\x00' * self.chunksize)
It seems that this is easy to fix by just adding a 'b':buf = array('h', b'\x00' * self.chunksize)
There are a few iterations only of them. -
Then in waves.pyx there are a few uses of "next" that is no more valid in python3. I tried to change them with the new syntax but it was not sufficient or proper I am afraid.
Nice work trying to port it to python3 which is very helpful by the why. If the obj is an iterator the in python2 it will have a next() method but for py3 just use the built in next() Py2 obj.next() Py3 next(obj)
I have managed to fix all the errors for python3 on my local version (I am getting some sound), I am going to push all the changes gradually.
I merged all PR, is it ok for you @JPfeP ?
Hi tito,
Yes, perfecto.
The multisin example would need py3 update too, but I don't have time neither motivation for this. The pd examples work fine.