From: Hraban Luyat Date: Mon, 13 Jul 2015 22:37:59 +0000 (+0100) Subject: Better doc for Init vs New X-Git-Tag: v2.0.0~80 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=ecda920ccea9316a93b8f6834351a4350f840731;p=go-opus.git Better doc for Init vs New --- 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")