feat: Add client-side voice processing and comprehensive packet handling, leveraging a Go-native Opus library.

This commit is contained in:
Jose Luis Montañes Ojados
2026-01-15 21:38:36 +01:00
parent d6376d85a9
commit 3f90c6a9c3
10 changed files with 2 additions and 2 deletions

View File

@@ -9,7 +9,7 @@ import (
)
func (c *Client) handlePacket(pkt *protocol.Packet) error {
log.Printf("Received Packet: ID=%d, Type=%v, Len=%d", pkt.Header.PacketID, pkt.Header.PacketType(), len(pkt.Data))
// log.Printf("Received Packet: ID=%d, Type=%v, Len=%d", pkt.Header.PacketID, pkt.Header.PacketType(), len(pkt.Data))
switch pkt.Header.PacketType() {
case protocol.PacketTypeInit1:

View File

@@ -103,7 +103,7 @@ func (c *Client) handleVoice(pkt *protocol.Packet) {
// 3. Process PCM: Reduce Volume (divide by 4)
for i := range pcm {
pcm[i] = pcm[i] / 4
pcm[i] = pcm[i] / 10
}
// 4. Get or Create Encoder

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.