]> Sergey Matveev's repositories - go-opus.git/commitdiff
Better doc for Init vs New
authorHraban Luyat <hraban@0brg.net>
Mon, 13 Jul 2015 22:37:59 +0000 (23:37 +0100)
committerHraban Luyat <hraban@0brg.net>
Mon, 13 Jul 2015 22:37:59 +0000 (23:37 +0100)
encoder.go

index 1099ae882f92eb255d1c77ee3fbd70ba8953ee99..58a541b573517dd46cd1847ef28839059e438332 100644 (file)
@@ -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")