|
|
|
@ -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
|
|
|
|
|
}
|
|
|
|
|