mumble-ruby icon indicating copy to clipboard operation
mumble-ruby copied to clipboard

play_file instantly transfers entire file

Open Xasin opened this issue 5 years ago • 0 comments

Hi! I wanted to use your library to add a Mumble-Based bot for my Lasertag game, using the play_file function to send TTS commands to the server.

While trying it, I noticed that the audio often sounded quite compressed and weird, and I was able to isolate two problems:

  1. The input file needs to be the same samplerate as the Mumble client is set to. If the file is of a different samplerate ... Well, it's completely ignored. A warning on console and in the documentation would be appreciated
  2. The connection does not delay sending at all. All samples are sent immediately, which seems to confuse the Mumble Server. In my tests, it was never able to properly play longer files. A simple fix was to add a "sleep sampleSize/sampleRate" in the loop that sends the data, but I am sure there is a smoother way to handle this.

Xasin avatar Oct 02 '19 09:10 Xasin