]> Sergey Matveev's repositories - go-opus.git/commitdiff
README: Correct frame size for stereo decoding
authorHraban Luyat <hraban@0brg.net>
Mon, 10 Oct 2016 15:39:18 +0000 (16:39 +0100)
committerHraban Luyat <hraban@0brg.net>
Mon, 10 Oct 2016 15:39:18 +0000 (16:39 +0100)
README.md

index eaf9d52b9eb7fe78b1ec50c4dfdf94f74448fa20..58cbf173cd1d9f40806644b7920e0779f0c76273 100644 (file)
--- 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 {