]> Sergey Matveev's repositories - go-opus.git/commitdiff
Documentation for public encoder methods
authorHraban Luyat <hraban@0brg.net>
Tue, 30 Aug 2016 16:50:19 +0000 (17:50 +0100)
committerHraban Luyat <hraban@0brg.net>
Tue, 30 Aug 2016 16:50:19 +0000 (17:50 +0100)
encoder.go

index 21696da6a53ea57c8344f1fa90382d0efbf0f35a..976091b73eafb27db3c1ab36b84be7d6f1223993 100644 (file)
@@ -130,7 +130,7 @@ func (enc *Encoder) EncodeFloat32(pcm []float32, data []byte) (int, error) {
        return n, nil
 }
 
-// Configures the encoder's use of discontinuous transmission (DTX).
+// UseDTX configures the encoder's use of discontinuous transmission (DTX).
 func (enc *Encoder) UseDTX(use bool) {
        dtx := 0
        if use {
@@ -139,11 +139,14 @@ func (enc *Encoder) UseDTX(use bool) {
        C.bridge_encoder_set_dtx(enc.p, C.opus_int32(dtx))
 }
 
+// DTX reports whether this encoder is configured to use discontinuous
+// transmission (DTX).
 func (enc *Encoder) DTX() bool {
        dtx := C.bridge_encoder_get_dtx(enc.p)
        return dtx != 0
 }
 
+// SampleRate returns the encoder sample rate in Hz.
 func (enc *Encoder) SampleRate() int {
        return int(C.bridge_encoder_get_sample_rate(enc.p))
 }