Closed Prior99 closed 9 years ago
The thread freezes and hangs in some loop, causing one core to run at 100%.
I think it is somehow related to the type of the package,
if( type === MumbleConnection.codec.Celt ) {
// Celt header is two bytes.
header = packet[0];
headerLength = 1;
frameLength = header & 0x7F;
terminateAudio = ( frameLength === 0 );
moreFrames = ( header & 0x80 );
} else if( type === MumbleConnection.codec.Opus ) {
// Opus header is two bytes.
var headerVarint = util.fromVarint( packet );
header = headerVarint.value;
headerLength = headerVarint.length;
frameLength = header & 0x1FFF;
terminateAudio = header & 0x2000;
moreFrames = false;
}
This does not match whisper messages
The problem is, that the type was ignored and if it is not 0 (so we are receiving a whispering packet) the packet got stuck. This can be fixed by only taking the least significant 3 bits into account and ignore the target.
This should also cause problems when a packet encoded in other that opus or celt is received.
The bot can whisper to user but cannot be whispered to. It just doesn't receive the data at all. Even if you log the data directly in MumbleSocket there wont be any output. Has the bot to tell the server that it can be whispered to or some special option?