From e69ec41ed47fda0ca3437c010b0d11126a284d34 Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Mon, 8 Apr 2024 17:29:18 -0600 Subject: [PATCH] Bug fix --- cmd/client/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/client/main.go b/cmd/client/main.go index aa1bcfe..8b0606e 100644 --- a/cmd/client/main.go +++ b/cmd/client/main.go @@ -192,8 +192,8 @@ func main() { panic(err) } data := make([]byte, written*2) - for i, p := range(pcm) { - binary.BigEndian.PutUint16(data[i*2:], uint16(p)) + for i := 0; i < written; i++ { + binary.BigEndian.PutUint16(data[i*2:], uint16(pcm[i])) } speaker <- data }