Rantanen / node-mumble

Mumble client in Node.js
MIT License
155 stars 48 forks source link

user.outputStream() audio broken #55

Open Prior99 opened 9 years ago

Prior99 commented 9 years ago

When 'true' is not supplied to the .outputStream() method zero-frames will be inbetween each frame. (At least it sounds like this, I am not an audioengineer). However the audio is corrupted. This does not occure, when .outputStream(true) is used, which afaik skips frames which are silence.

soanaphikeste commented 9 years ago

Actually true must be supplied as the second parameter for this to work (.outputStream(undefined, true) for all users). This paramter is also not documented in the wiki.

Prior99 commented 9 years ago

@soanaphikeste no, true as parameter was added in order to skip silence. Before this parameter was added even if a user was not talking all the time 0 was written into the buffer for example for writing records to disk. Later on the parameter was added so that when a user was not talking no 'data' events would be emitted with 0s only. Omitting frames of silence was set as default behaviour then.

Prior99 commented 9 years ago

Possibly the 0 frames inbetween have been there for some time but filtering out silent frames by setting the parameter to true hid this bug.

Rantanen commented 9 years ago

I'll try to find time tomorrow to take a look at this. Been a bit busy with work the last two days.