When quality is 255, an extra field is included in the VoiceInit
message. This field is the sampling rate for the voice codec selected.
This commit simply renames that field from extra_data as it is
currently known.
Interestingly, this field is present, but doesn't match when CELT HQ is
used. If sv_voicecodec = vaudio_celt_high on the server, the sampling
rate is still specified as 22050 Hz(as for CELT non-HQ) rather than the
expected 44100 Hz. The client code will instead look for vaudio_celt
and vaudio_celt_high as codec name, and use these to to index a lookup
table that specifies the correct sampling rate and frame size. For
vaudio_celt 22050 Hz with 512 samples per frame is used, while
vaudio_celt_high uses 44100 Hz with 1024 samples per frame.
When quality is 255, an extra field is included in the VoiceInit message. This field is the sampling rate for the voice codec selected. This commit simply renames that field from
extra_data
as it is currently known.Interestingly, this field is present, but doesn't match when CELT HQ is used. If
sv_voicecodec = vaudio_celt_high
on the server, the sampling rate is still specified as 22050 Hz(as for CELT non-HQ) rather than the expected 44100 Hz. The client code will instead look forvaudio_celt
andvaudio_celt_high
as codec name, and use these to to index a lookup table that specifies the correct sampling rate and frame size. Forvaudio_celt
22050 Hz with 512 samples per frame is used, whilevaudio_celt_high
uses 44100 Hz with 1024 samples per frame.