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 }