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
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)
#cgo CFLAGS: -std=c99 -Wall -Werror -pedantic -Ibuild/include
#include <opus/opus.h>
-// 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;