diff --git a/cmd/client/main.go b/cmd/client/main.go index 8b0606e..5e0c20f 100644 --- a/cmd/client/main.go +++ b/cmd/client/main.go @@ -116,7 +116,7 @@ func main() { onRecvFrames := func(output_samples []byte, input_samples []byte, framecount uint32) { pcm := make([]int16, len(input_samples)/2) for i := 0; i < len(input_samples)/2; i++ { - pcm[i] = int16(binary.BigEndian.Uint16(input_samples[2*i:])) + pcm[i] = int16(binary.LittleEndian.Uint16(input_samples[2*i:])) } data := make([]byte, len(input_samples)) @@ -193,7 +193,7 @@ func main() { } data := make([]byte, written*2) for i := 0; i < written; i++ { - binary.BigEndian.PutUint16(data[i*2:], uint16(pcm[i])) + binary.LittleEndian.PutUint16(data[i*2:], uint16(pcm[i])) } speaker <- data }