diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-21 01:53:59 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-21 01:53:59 +0300 |
| commit | 171e350e348afadb55967b9c13d5eadc7f7d2cf4 (patch) | |
| tree | 14ec93df8ccc1aca0cf453f826d46a402b09dc8f /pkg/messages/types/svcSounds.go | |
| parent | define todos on packets (diff) | |
| download | sdp.go-171e350e348afadb55967b9c13d5eadc7f7d2cf4.tar.gz sdp.go-171e350e348afadb55967b9c13d5eadc7f7d2cf4.tar.bz2 sdp.go-171e350e348afadb55967b9c13d5eadc7f7d2cf4.zip | |
add strings builder, customize ALL outputs (#6)
Diffstat (limited to 'pkg/messages/types/svcSounds.go')
| -rw-r--r-- | pkg/messages/types/svcSounds.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/messages/types/svcSounds.go b/pkg/messages/types/svcSounds.go index 1553450..1affeb4 100644 --- a/pkg/messages/types/svcSounds.go +++ b/pkg/messages/types/svcSounds.go | |||
| @@ -1,6 +1,9 @@ | |||
| 1 | package messages | 1 | package messages |
| 2 | 2 | ||
| 3 | import "github.com/pektezol/bitreader" | 3 | import ( |
| 4 | "github.com/pektezol/bitreader" | ||
| 5 | "github.com/pektezol/demoparser/pkg/writer" | ||
| 6 | ) | ||
| 4 | 7 | ||
| 5 | type SvcSounds struct { | 8 | type SvcSounds struct { |
| 6 | ReliableSound bool | 9 | ReliableSound bool |
| @@ -21,5 +24,8 @@ func ParseSvcSounds(reader *bitreader.Reader) SvcSounds { | |||
| 21 | svcSounds.Length = reader.TryReadUInt16() | 24 | svcSounds.Length = reader.TryReadUInt16() |
| 22 | } | 25 | } |
| 23 | svcSounds.Data = reader.TryReadBitsToSlice(uint64(svcSounds.Length)) | 26 | svcSounds.Data = reader.TryReadBitsToSlice(uint64(svcSounds.Length)) |
| 27 | writer.TempAppendLine("\t\tReliable Sound: %t", svcSounds.ReliableSound) | ||
| 28 | writer.TempAppendLine("\t\tSound Count: %d", svcSounds.SoundCount) | ||
| 29 | writer.TempAppendLine("\t\tData: %v", svcSounds.Data) | ||
| 24 | return svcSounds | 30 | return svcSounds |
| 25 | } | 31 | } |