When I was trying to play a wave file with PyAudio-0.2.11 in a python-3.10.1 virtualenv(created with python-3.9.0 venv and upgraded), I received an exception and nothing is played, others just go well.
Exception in thread WavPlayer:rsrc/sound.wav:
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1009, in _bootstrap_inner
self.run()
File "/Code/py/tetris/tetris.py", line 39, in run
self.play()
File "/Code/py/tetris/tetris.py", line 35, in play
self.stream.write(data)
File "/Code/py/tetris/.venv/lib/python3.10/site-packages/pyaudio.py", line 584, in write
pa.write_stream(self._stream, frames, num_frames,
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
I do not know what '#' format
stands for, and I am sure that my code has nothing to do with C API, but it run well under python-3.9.x, is that a problem with the PyAudio library itself? How can I solve that?