aboutsummaryrefslogtreecommitdiff
path: root/packets/messages/types/SvcVoiceInit.go
blob: 3e18a7b5d8840aa6f0de4589ae77055e41cde9c7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package types

import "github.com/pektezol/bitreader"

type SvcVoiceInit struct {
	Codec   string
	Quality uint8
	Unk     float32
}

func ParseSvcVoiceInit(reader *bitreader.ReaderType) SvcVoiceInit {
	svcvoiceinit := SvcVoiceInit{
		Codec:   reader.TryReadString(),
		Quality: reader.TryReadInt8(),
	}
	if svcvoiceinit.Quality == 255 {
		svcvoiceinit.Unk = reader.TryReadFloat32()
	}
	return svcvoiceinit
}