
Reconnection bug (sound does not return upon entering range)

Packet corruption

Race conditions (crackling, crashes)

Incorrect sample calculation

Oversized receive buffer

Static vector in hot path
Game-level fixes

Sound wouldn't come back when you got close to someone
You'd leave the voice chat range → get close again → total silence. You had to reconnect for it to work again. Now the audio resumes automatically when you return to the range.

Voice chat would cut out during
map changes / reconnections
When changing maps or reconnecting, voice chat would stop working. The microphone would detect your voice as “background noise” because it remembered the sound levels from the previous session. Now it recalibrates upon reconnecting.

Crackling / noise when changing a player’s volume
If you adjusted a speaker’s volume while they were speaking, it could cause crackling or glitches. Now volume changes are smooth without interrupting the audio.

Corrupted packets caused disconnections or silence
If a voice packet arrived malformed, it could corrupt subsequent packets and desynchronize the connection. In the worst case, the client would disconnect. Now the server validates correctly before processing.

Excessive memory usage when receiving voice
Each voice packet allocated ~768KB of memory when it only needed ~6KB. With multiple players speaking, RAM usage skyrocketed. Now it uses only what is necessary.