diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-17 18:24:18 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-20 11:10:20 +0300 |
| commit | 6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75 (patch) | |
| tree | e925740a5c04b1c5c44e725dab04f9b1833cf9e3 /pkg/messages/types/svcSounds.go | |
| parent | parse netSignOnState flags (diff) | |
| download | sdp.go-6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75.tar.gz sdp.go-6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75.tar.bz2 sdp.go-6aa511f2ae3d5c84e7db02627ffd4d7f6796ce75.zip | |
decide what message types are left
Diffstat (limited to 'pkg/messages/types/svcSounds.go')
| -rw-r--r-- | pkg/messages/types/svcSounds.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/messages/types/svcSounds.go b/pkg/messages/types/svcSounds.go index 22d4a66..1553450 100644 --- a/pkg/messages/types/svcSounds.go +++ b/pkg/messages/types/svcSounds.go | |||
| @@ -4,8 +4,8 @@ import "github.com/pektezol/bitreader" | |||
| 4 | 4 | ||
| 5 | type SvcSounds struct { | 5 | type SvcSounds struct { |
| 6 | ReliableSound bool | 6 | ReliableSound bool |
| 7 | Size int8 | 7 | SoundCount uint8 |
| 8 | Length int16 | 8 | Length uint16 |
| 9 | Data []byte | 9 | Data []byte |
| 10 | } | 10 | } |
| 11 | 11 | ||
| @@ -14,11 +14,11 @@ func ParseSvcSounds(reader *bitreader.Reader) SvcSounds { | |||
| 14 | ReliableSound: reader.TryReadBool(), | 14 | ReliableSound: reader.TryReadBool(), |
| 15 | } | 15 | } |
| 16 | if svcSounds.ReliableSound { | 16 | if svcSounds.ReliableSound { |
| 17 | svcSounds.Size = 1 | 17 | svcSounds.SoundCount = 1 |
| 18 | svcSounds.Length = int16(reader.TryReadBits(8)) | 18 | svcSounds.Length = uint16(reader.TryReadUInt8()) |
| 19 | } else { | 19 | } else { |
| 20 | svcSounds.Size = int8(reader.TryReadBits(8)) | 20 | svcSounds.SoundCount = reader.TryReadUInt8() |
| 21 | svcSounds.Length = int16(reader.TryReadBits(16)) | 21 | svcSounds.Length = reader.TryReadUInt16() |
| 22 | } | 22 | } |
| 23 | svcSounds.Data = reader.TryReadBitsToSlice(uint64(svcSounds.Length)) | 23 | svcSounds.Data = reader.TryReadBitsToSlice(uint64(svcSounds.Length)) |
| 24 | return svcSounds | 24 | return svcSounds |