From ecda920ccea9316a93b8f6834351a4350f840731 Mon Sep 17 00:00:00 2001 From: Hraban Luyat Date: Mon, 13 Jul 2015 23:37:59 +0100 Subject: [PATCH] Better doc for Init vs New --- encoder.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/encoder.go b/encoder.go index 1099ae8..58a541b 100644 --- a/encoder.go +++ b/encoder.go @@ -36,8 +36,9 @@ func NewEncoder(sample_rate int, channels int, application Application) (*Encode return &enc, nil } -// Init initializes a pre-allocated opus encoder. Must be called exactly once in -// the life-time of this object, before calling any other methods. +// Init initializes a pre-allocated opus encoder. Unless the encoder has been +// created using NewEncoder, this method must be called exactly once in the +// life-time of this object, before calling any other methods. func (enc *Encoder) Init(sample_rate int, channels int, application Application) error { if enc.p != nil { return fmt.Errorf("opus encoder already initialized") -- 2.48.1