diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2024-06-15 13:58:30 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-15 13:58:30 +0300 |
| commit | 77e4b066cb8d506b4bc944ab4eb2d6e4679e2202 (patch) | |
| tree | 1d549eca619ed36cb881e487cb054c4643ac8376 /pkg/messages/types/svcVoiceInit.go | |
| parent | change project name to sdp.go (diff) | |
| download | sdp.go-77e4b066cb8d506b4bc944ab4eb2d6e4679e2202.tar.gz sdp.go-77e4b066cb8d506b4bc944ab4eb2d6e4679e2202.tar.bz2 sdp.go-77e4b066cb8d506b4bc944ab4eb2d6e4679e2202.zip | |
enable multithreading with goroutines (#20)
Diffstat (limited to 'pkg/messages/types/svcVoiceInit.go')
| -rw-r--r-- | pkg/messages/types/svcVoiceInit.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkg/messages/types/svcVoiceInit.go b/pkg/messages/types/svcVoiceInit.go index bdab51a..1baa971 100644 --- a/pkg/messages/types/svcVoiceInit.go +++ b/pkg/messages/types/svcVoiceInit.go | |||
| @@ -2,16 +2,16 @@ 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 SvcVoiceInit struct { | 8 | type SvcVoiceInit struct { |
| 9 | Codec string | 9 | Codec string `json:"codec"` |
| 10 | Quality uint8 | 10 | Quality uint8 `json:"quality"` |
| 11 | SampleRate int32 | 11 | SampleRate int32 `json:"sample_rate"` |
| 12 | } | 12 | } |
| 13 | 13 | ||
| 14 | func ParseSvcVoiceInit(reader *bitreader.Reader) SvcVoiceInit { | 14 | func ParseSvcVoiceInit(reader *bitreader.Reader, demo *types.Demo) SvcVoiceInit { |
| 15 | svcVoiceInit := SvcVoiceInit{ | 15 | svcVoiceInit := SvcVoiceInit{ |
| 16 | Codec: reader.TryReadString(), | 16 | Codec: reader.TryReadString(), |
| 17 | Quality: reader.TryReadUInt8(), | 17 | Quality: reader.TryReadUInt8(), |
| @@ -25,8 +25,8 @@ func ParseSvcVoiceInit(reader *bitreader.Reader) SvcVoiceInit { | |||
| 25 | svcVoiceInit.SampleRate = 11025 | 25 | svcVoiceInit.SampleRate = 11025 |
| 26 | } | 26 | } |
| 27 | } | 27 | } |
| 28 | writer.TempAppendLine("\t\tCodec: %s", svcVoiceInit.Codec) | 28 | demo.Writer.TempAppendLine("\t\tCodec: %s", svcVoiceInit.Codec) |
| 29 | writer.TempAppendLine("\t\tQuality: %d", svcVoiceInit.Quality) | 29 | demo.Writer.TempAppendLine("\t\tQuality: %d", svcVoiceInit.Quality) |
| 30 | writer.TempAppendLine("\t\tSample Rate: %d", svcVoiceInit.SampleRate) | 30 | demo.Writer.TempAppendLine("\t\tSample Rate: %d", svcVoiceInit.SampleRate) |
| 31 | return svcVoiceInit | 31 | return svcVoiceInit |
| 32 | } | 32 | } |