feat: unified audio buffer + fragment reassembly fix
This commit is contained in:
@@ -36,11 +36,10 @@ type Client struct {
|
||||
Connected bool
|
||||
ServerName string
|
||||
|
||||
// Fragment reassembly
|
||||
FragmentBuffer []byte
|
||||
FragmentStartPktID uint16
|
||||
FragmentCompressed bool
|
||||
Fragmenting bool
|
||||
// Fragment reassembly (packet queue like ts3j)
|
||||
CommandQueue map[uint16]*protocol.Packet // Packets waiting for reassembly
|
||||
ExpectedCommandPID uint16 // Next expected packet ID
|
||||
FragmentState bool // Toggle: true = collecting, false = ready
|
||||
|
||||
// Server Data
|
||||
Channels map[uint64]*Channel
|
||||
@@ -64,6 +63,8 @@ func NewClient(nickname string) *Client {
|
||||
VoicePacketID: 1,
|
||||
Channels: make(map[uint64]*Channel),
|
||||
VoiceDecoders: make(map[uint16]*opus.Decoder),
|
||||
CommandQueue: make(map[uint16]*protocol.Packet),
|
||||
ExpectedCommandPID: 0,
|
||||
done: make(chan struct{}),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user