From: Hraban Luyat Date: Mon, 10 Oct 2016 15:39:18 +0000 (+0100) Subject: README: Correct frame size for stereo decoding X-Git-Tag: v2.0.0~50 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=6db54ef185fcbee0aa11fedbdd41724d06a9c30b;p=go-opus.git README: Correct frame size for stereo decoding --- 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 {