README.md | 2 +- diff --git a/README.md b/README.md index eaf9d52b9eb7fe78b1ec50c4dfdf94f74448fa20..58cbf173cd1d9f40806644b7920e0779f0c76273 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 {