This is a fix to address PCM data being passed in that doesn't match the sample frame length. I encounted this while using mpg123 with the error:
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib64/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/***/mumble.py", line 108, in run
self.loop()
File "/***/mumble.py", line 170, in loop
self.sound_output.send_audio() # send outgoing audio if available
File "/***/soundoutput.py", line 73, in send_audio
encoded = self.encoder.encode(to_encode)
File "/***/pyopus/opus.py", line 47, in encode
return self.encoder.encode(pcm, len(pcm))
File "copus.pyx", line 50, in copus.OpusEncoder.encode (copus.c:1324)
SystemError: Negative size passed to PyString_FromStringAndSize
Tested on Arch Linux x86_64, may be that this is actually intended behaviour and it is required to pass in 'cleaned' PCM.
This is a fix to address PCM data being passed in that doesn't match the sample frame length. I encounted this while using mpg123 with the error:
Tested on Arch Linux x86_64, may be that this is actually intended behaviour and it is required to pass in 'cleaned' PCM.