live
noah metz 2024-04-08 17:29:18 -06:00
parent cada3ea909
commit e69ec41ed4
1 changed files with 2 additions and 2 deletions

@ -192,8 +192,8 @@ func main() {
panic(err) panic(err)
} }
data := make([]byte, written*2) data := make([]byte, written*2)
for i, p := range(pcm) { for i := 0; i < written; i++ {
binary.BigEndian.PutUint16(data[i*2:], uint16(p)) binary.BigEndian.PutUint16(data[i*2:], uint16(pcm[i]))
} }
speaker <- data speaker <- data
} }