encoder.go | 3 +-- errors.go | 2 -- opus.go | 2 +- diff --git a/encoder.go b/encoder.go index 700d51563c7d2900b6f44b1918ef1d28a820b575..1099ae882f92eb255d1c77ee3fbd70ba8953ee99 100644 --- a/encoder.go +++ b/encoder.go @@ -17,8 +17,7 @@ import "C" var errEncUninitialized = fmt.Errorf("opus encoder uninitialized") -// Encoder contains the state of an Opus encoder for libopus. Do not use this -// directly, but call +// Encoder contains the state of an Opus encoder for libopus. type Encoder struct { p *C.struct_OpusEncoder // Memory for the encoder struct allocated on the Go heap to allow Go GC to diff --git a/errors.go b/errors.go index f3f606dd319b1cf96cfa0960badf8e06a019c0e0..9bf482e4b42b8895cd862c24940bcdf3cfccaf5e 100644 --- a/errors.go +++ b/errors.go @@ -30,8 +30,6 @@ import "C" type opusFileError int -var opusfileErrcodes = map[C.int]error{} - var ( ERR_OP_FALSE = opusFileError(C.CONST_OP_FALSE) ERR_OP_EOF = opusFileError(C.CONST_OP_EOF) diff --git a/opus.go b/opus.go index 3d6fc6da3d966ca35c56c4c904a2d284008045ca..56e70cd803584da5980ff7bfe93c4f19802fdb68 100644 --- a/opus.go +++ b/opus.go @@ -18,7 +18,7 @@ #cgo LDFLAGS: libopusfile.a libopus.a -logg -lm #cgo CFLAGS: -std=c99 -Wall -Werror -pedantic -Ibuild/include #include -// Remap #defines to avoid depending on their literal value +// Access the preprocessor from CGO const int CONST_APPLICATION_VOIP = OPUS_APPLICATION_VOIP; const int CONST_APPLICATION_AUDIO = OPUS_APPLICATION_AUDIO; const int CONST_APPLICATION_RESTRICTED_LOWDELAY = OPUS_APPLICATION_RESTRICTED_LOWDELAY;