diff options
Diffstat (limited to 'pkg/messages/types/svcVoiceData.go')
| -rw-r--r-- | pkg/messages/types/svcVoiceData.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/pkg/messages/types/svcVoiceData.go b/pkg/messages/types/svcVoiceData.go index 30436eb..dbc07a6 100644 --- a/pkg/messages/types/svcVoiceData.go +++ b/pkg/messages/types/svcVoiceData.go | |||
| @@ -2,17 +2,17 @@ package messages | |||
| 2 | 2 | ||
| 3 | import ( | 3 | import ( |
| 4 | "github.com/pektezol/bitreader" | 4 | "github.com/pektezol/bitreader" |
| 5 | "github.com/pektezol/sdp.go/pkg/writer" | 5 | "github.com/pektezol/sdp.go/pkg/types" |
| 6 | ) | 6 | ) |
| 7 | 7 | ||
| 8 | type SvcVoiceData struct { | 8 | type SvcVoiceData struct { |
| 9 | FromClient uint8 | 9 | FromClient uint8 `json:"from_client"` |
| 10 | Proximity bool | 10 | Proximity bool `json:"proximity"` |
| 11 | Length int16 | 11 | Length int16 `json:"length"` |
| 12 | Data []byte | 12 | Data []byte `json:"data"` |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | func ParseSvcVoiceData(reader *bitreader.Reader) SvcVoiceData { | 15 | func ParseSvcVoiceData(reader *bitreader.Reader, demo *types.Demo) SvcVoiceData { |
| 16 | svcVoiceData := SvcVoiceData{ | 16 | svcVoiceData := SvcVoiceData{ |
| 17 | FromClient: reader.TryReadUInt8(), | 17 | FromClient: reader.TryReadUInt8(), |
| 18 | } | 18 | } |
| @@ -21,8 +21,8 @@ func ParseSvcVoiceData(reader *bitreader.Reader) SvcVoiceData { | |||
| 21 | svcVoiceData.Proximity = true | 21 | svcVoiceData.Proximity = true |
| 22 | } | 22 | } |
| 23 | svcVoiceData.Data = reader.TryReadBitsToSlice(uint64(svcVoiceData.Length)) | 23 | svcVoiceData.Data = reader.TryReadBitsToSlice(uint64(svcVoiceData.Length)) |
| 24 | writer.TempAppendLine("\t\tFrom Client: %d", svcVoiceData.FromClient) | 24 | demo.Writer.TempAppendLine("\t\tFrom Client: %d", svcVoiceData.FromClient) |
| 25 | writer.TempAppendLine("\t\tProximity: %t", svcVoiceData.Proximity) | 25 | demo.Writer.TempAppendLine("\t\tProximity: %t", svcVoiceData.Proximity) |
| 26 | writer.TempAppendLine("\t\tData: %v", svcVoiceData.Data) | 26 | demo.Writer.TempAppendLine("\t\tData: %v", svcVoiceData.Data) |
| 27 | return svcVoiceData | 27 | return svcVoiceData |
| 28 | } | 28 | } |