From: Hraban Luyat Date: Tue, 30 Aug 2016 16:28:04 +0000 (+0100) Subject: Rename GetDTX() to DTX() (more go-like) X-Git-Tag: v2.0.0~62 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=3b5e51100a60ab0e133dec8ab06125b30d3e4222;p=go-opus.git Rename GetDTX() to DTX() (more go-like) Breaks the API :/ doing it sooner rather than later to avoid impacting too many people. Sorry though! --- diff --git a/encoder.go b/encoder.go index e43a1f2..3690bc1 100644 --- a/encoder.go +++ b/encoder.go @@ -127,7 +127,7 @@ func (enc *Encoder) UseDTX(use bool) { C.bridge_set_dtx(enc.p, C.int(dtx)) } -func (enc *Encoder) GetDTX() bool { +func (enc *Encoder) DTX() bool { dtx := C.bridge_get_dtx(enc.p) return dtx != 0 } diff --git a/encoder_test.go b/encoder_test.go index bfe99cb..69aa5e1 100644 --- a/encoder_test.go +++ b/encoder_test.go @@ -14,7 +14,7 @@ func TestUseDTX(t *testing.T) { vals := []bool{true, false} for _, dtx := range vals { enc.UseDTX(dtx) - gotv := enc.GetDTX() + gotv := enc.DTX() if gotv != dtx { t.Errorf("Error set dtx: expect dtx=%v, got dtx=%v", dtx, gotv) }