From 2f8c92f261586f68a976efce0cfcdd0401f402e0 Mon Sep 17 00:00:00 2001 From: Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> Date: Mon, 6 Nov 2023 18:37:11 +0300 Subject: dont try to understand it, feel it --- pkg/messages/types/svcVoiceInit.go | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 pkg/messages/types/svcVoiceInit.go (limited to 'pkg/messages/types/svcVoiceInit.go') diff --git a/pkg/messages/types/svcVoiceInit.go b/pkg/messages/types/svcVoiceInit.go deleted file mode 100644 index eb6093f..0000000 --- a/pkg/messages/types/svcVoiceInit.go +++ /dev/null @@ -1,29 +0,0 @@ -package messages - -import ( - "github.com/pektezol/bitreader" -) - -type SvcVoiceInit struct { - Codec string - Quality uint8 - SampleRate int32 -} - -func ParseSvcVoiceInit(reader *bitreader.Reader) SvcVoiceInit { - svcVoiceInit := SvcVoiceInit{ - Codec: reader.TryReadString(), - Quality: reader.TryReadUInt8(), - } - if svcVoiceInit.Quality == 0b11111111 { - svcVoiceInit.SampleRate = reader.TryReadSInt32() - } else { - if svcVoiceInit.Codec == "vaudio_celt" { - svcVoiceInit.SampleRate = 22050 - } else { - svcVoiceInit.SampleRate = 11025 - } - } - - return svcVoiceInit -} -- cgit v1.2.3