diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2022-11-10 22:59:32 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-16 21:39:40 +0300 |
| commit | 9f5e8f230d35fffb106088b72e5fdb148905f450 (patch) | |
| tree | 2f22a5357a7bea2ce516b9a5e56e21435414529a /packets/messages/types/SvcVoiceInit.go | |
| parent | upgraded to v1.2.3 (diff) | |
| download | sdp.go-9f5e8f230d35fffb106088b72e5fdb148905f450.tar.gz sdp.go-9f5e8f230d35fffb106088b72e5fdb148905f450.tar.bz2 sdp.go-9f5e8f230d35fffb106088b72e5fdb148905f450.zip | |
added almost all net/svc messages - currently broken
Diffstat (limited to 'packets/messages/types/SvcVoiceInit.go')
| -rw-r--r-- | packets/messages/types/SvcVoiceInit.go | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/packets/messages/types/SvcVoiceInit.go b/packets/messages/types/SvcVoiceInit.go new file mode 100644 index 0000000..3e18a7b --- /dev/null +++ b/packets/messages/types/SvcVoiceInit.go | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | package types | ||
| 2 | |||
| 3 | import "github.com/pektezol/bitreader" | ||
| 4 | |||
| 5 | type SvcVoiceInit struct { | ||
| 6 | Codec string | ||
| 7 | Quality uint8 | ||
| 8 | Unk float32 | ||
| 9 | } | ||
| 10 | |||
| 11 | func ParseSvcVoiceInit(reader *bitreader.ReaderType) SvcVoiceInit { | ||
| 12 | svcvoiceinit := SvcVoiceInit{ | ||
| 13 | Codec: reader.TryReadString(), | ||
| 14 | Quality: reader.TryReadInt8(), | ||
| 15 | } | ||
| 16 | if svcvoiceinit.Quality == 255 { | ||
| 17 | svcvoiceinit.Unk = reader.TryReadFloat32() | ||
| 18 | } | ||
| 19 | return svcvoiceinit | ||
| 20 | } | ||