diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-11-06 18:37:11 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-11-06 18:37:11 +0300 |
| commit | 2f8c92f261586f68a976efce0cfcdd0401f402e0 (patch) | |
| tree | 33189cc48987789dff4e7fba0a74d2b2326f0a04 /pkg/messages/types/svcVoiceData.go | |
| parent | convert cm ticks correctly (diff) | |
| download | sdp.go-2f8c92f261586f68a976efce0cfcdd0401f402e0.tar.gz sdp.go-2f8c92f261586f68a976efce0cfcdd0401f402e0.tar.bz2 sdp.go-2f8c92f261586f68a976efce0cfcdd0401f402e0.zip | |
dont try to understand it, feel itlp-parser
Diffstat (limited to 'pkg/messages/types/svcVoiceData.go')
| -rw-r--r-- | pkg/messages/types/svcVoiceData.go | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/pkg/messages/types/svcVoiceData.go b/pkg/messages/types/svcVoiceData.go deleted file mode 100644 index 6ac8050..0000000 --- a/pkg/messages/types/svcVoiceData.go +++ /dev/null | |||
| @@ -1,25 +0,0 @@ | |||
| 1 | package messages | ||
| 2 | |||
| 3 | import ( | ||
| 4 | "github.com/pektezol/bitreader" | ||
| 5 | ) | ||
| 6 | |||
| 7 | type SvcVoiceData struct { | ||
| 8 | FromClient uint8 | ||
| 9 | Proximity bool | ||
| 10 | Length int16 | ||
| 11 | Data []byte | ||
| 12 | } | ||
| 13 | |||
| 14 | func ParseSvcVoiceData(reader *bitreader.Reader) SvcVoiceData { | ||
| 15 | svcVoiceData := SvcVoiceData{ | ||
| 16 | FromClient: reader.TryReadUInt8(), | ||
| 17 | } | ||
| 18 | proximity := reader.TryReadUInt8() | ||
| 19 | if proximity != 0 { | ||
| 20 | svcVoiceData.Proximity = true | ||
| 21 | } | ||
| 22 | svcVoiceData.Data = reader.TryReadBitsToSlice(uint64(svcVoiceData.Length)) | ||
| 23 | |||
| 24 | return svcVoiceData | ||
| 25 | } | ||