From: Hraban Luyat Date: Wed, 11 Jan 2017 00:03:01 +0000 (+0000) Subject: Remove obsolete constants X-Git-Tag: v2.0.0~33^2~3 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=941fa898cfb6d0911b7b9a18cb704919007cb7a7;p=go-opus.git Remove obsolete constants --- diff --git a/errors.go b/errors.go index 72de70d..88ef026 100644 --- a/errors.go +++ b/errors.go @@ -60,27 +60,6 @@ var ( ErrAllocFail = Error(C.CONST_OPUS_ALLOC_FAIL) ) -// DEPRECATED versions of the camel cased names. Will be removed end of -// 2017. Please don't use. -var ( - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OPUS_OK = Error(C.CONST_OPUS_OK) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OPUS_BAD_ARG = Error(C.CONST_OPUS_BAD_ARG) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OPUS_BUFFER_TOO_SMALL = Error(C.CONST_OPUS_BUFFER_TOO_SMALL) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OPUS_INTERNAL_ERROR = Error(C.CONST_OPUS_INTERNAL_ERROR) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OPUS_INVALID_PACKET = Error(C.CONST_OPUS_INVALID_PACKET) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OPUS_UNIMPLEMENTED = Error(C.CONST_OPUS_UNIMPLEMENTED) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OPUS_INVALID_STATE = Error(C.CONST_OPUS_INVALID_STATE) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OPUS_ALLOC_FAIL = Error(C.CONST_OPUS_ALLOC_FAIL) -) - // Error string (in human readable format) for libopus errors. func (e Error) Error() string { return fmt.Sprintf("opus: %s", C.GoString(C.opus_strerror(C.int(e)))) @@ -110,41 +89,6 @@ var ( ErrStreamBadTimestamp = StreamError(C.CONST_OP_EBADTIMESTAMP) ) -// DEPRECATED versions of the camel cased names. Will be removed end of 2017. -// Please don't use. -var ( - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OP_FALSE = StreamError(C.CONST_OP_FALSE) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OP_EOF = StreamError(C.CONST_OP_EOF) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OP_HOLE = StreamError(C.CONST_OP_HOLE) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OP_EREAD = StreamError(C.CONST_OP_EREAD) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OP_EFAULT = StreamError(C.CONST_OP_EFAULT) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OP_EIMPL = StreamError(C.CONST_OP_EIMPL) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OP_EINVAL = StreamError(C.CONST_OP_EINVAL) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OP_ENOTFORMAT = StreamError(C.CONST_OP_ENOTFORMAT) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OP_EBADHEADER = StreamError(C.CONST_OP_EBADHEADER) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OP_EVERSION = StreamError(C.CONST_OP_EVERSION) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OP_ENOTAUDIO = StreamError(C.CONST_OP_ENOTAUDIO) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OP_EBADPACKET = StreamError(C.CONST_OP_EBADPACKET) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OP_EBADLINK = StreamError(C.CONST_OP_EBADLINK) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OP_ENOSEEK = StreamError(C.CONST_OP_ENOSEEK) - // DEPRECATED - DON'T USE - Use the camel cased version - ERR_OP_EBADTIMESTAMP = StreamError(C.CONST_OP_EBADTIMESTAMP) -) - func (i StreamError) Error() string { switch i { case ErrStreamFalse: diff --git a/opus.go b/opus.go index 480486a..29b019e 100644 --- a/opus.go +++ b/opus.go @@ -29,16 +29,6 @@ var ( AppRestrictedLowdelay = Application(C.CONST_APPLICATION_RESTRICTED_LOWDELAY) ) -// DEPRECATED -- Don't use these. Will be removed end of 2017. -var ( - // DEPRECATED - DON'T USE - Use the camel cased version - APPLICATION_VOIP = Application(C.CONST_APPLICATION_VOIP) - // DEPRECATED - DON'T USE - Use the camel cased version - APPLICATION_AUDIO = Application(C.CONST_APPLICATION_AUDIO) - // DEPRECATED - DON'T USE - Use the camel cased version - APPLICATION_RESTRICTED_LOWDELAY = Application(C.CONST_APPLICATION_RESTRICTED_LOWDELAY) -) - const ( xMAX_BITRATE = 48000 xMAX_FRAME_SIZE_MS = 60