From 6db54ef185fcbee0aa11fedbdd41724d06a9c30b Mon Sep 17 00:00:00 2001 From: Hraban Luyat Date: Mon, 10 Oct 2016 16:39:18 +0100 Subject: [PATCH] README: Correct frame size for stereo decoding --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eaf9d52..58cbf17 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ Now pass it the opus bytes, and a buffer to store the PCM sound in: ```go var frame_size_ms float32 = ... // if you don't know, go with 60 ms. -frame_size := frame_size_ms * sample_rate / 1000 +frame_size := channels * frame_size_ms * sample_rate / 1000 pcm := make([]byte, int(frame_size)) n, err := dec.Decode(data, pcm) if err != nil { -- 2.48.1