pymumble icon indicating copy to clipboard operation
pymumble copied to clipboard

Reconnection error if voice from client to server is active

Open marcomac01 opened this issue 1 year ago • 0 comments

Hello. Whenever a disconnection occurs (i close murmur to simulate connection loss) if i try to send a sound to the server i get this error.

Traceback (most recent call last):
  File "/Users/marco/Desktop/clients/audio-only_client.py", line 47, in <module>
    mumble.sound_output.add_sound(data)
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pymumble_py3/soundoutput.py", line 161, in add_sound
    samples = int(self.encoder_framesize * PYMUMBLE_SAMPLERATE * 2 * self.channels)  # number of samples in an encoder frame
                  ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'

the code i am running is the example audio-only_client.py. the only change i made is enabling the reconnection via reconnect=True in the mumble object declaration if i comment the line mumble.sound_output.add_sound(data) it reconnects and i can listen.

marcomac01 avatar Dec 16 '23 19:12 marcomac01