Updated everything for dependencies. All sub packages are now part of the project. This was a massive update, hopefully won't have to be reverted.

This commit is contained in:
Storm Dragon
2025-01-16 17:03:01 -05:00
parent a5c0e7a71c
commit 2e337db3c5
78 changed files with 4774 additions and 82 deletions

36
gumble/go-opus/errors.go Normal file
View File

@ -0,0 +1,36 @@
// Copyright © Go Opus Authors (see AUTHORS file)
//
// License for use of this code is detailed in the LICENSE file
package opus
import (
"fmt"
)
/*
#cgo pkg-config: opus
#include <opus.h>
*/
import "C"
type Error int
var _ error = Error(0)
// Libopus errors
const (
ErrOK = Error(C.OPUS_OK)
ErrBadArg = Error(C.OPUS_BAD_ARG)
ErrBufferTooSmall = Error(C.OPUS_BUFFER_TOO_SMALL)
ErrInternalError = Error(C.OPUS_INTERNAL_ERROR)
ErrInvalidPacket = Error(C.OPUS_INVALID_PACKET)
ErrUnimplemented = Error(C.OPUS_UNIMPLEMENTED)
ErrInvalidState = Error(C.OPUS_INVALID_STATE)
ErrAllocFail = Error(C.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))))
}