1 // Copyright © Go Opus Authors (see AUTHORS file)
3 // License for use of this code is detailed in the LICENSE file
8 // Link opus using pkg-config.
9 #cgo pkg-config: --static opus
18 // Optimize encoding for VoIP
19 AppVoIP = Application(C.OPUS_APPLICATION_VOIP)
20 // Optimize encoding for non-voice signals like music
21 AppAudio = Application(C.OPUS_APPLICATION_AUDIO)
22 // Optimize encoding for low latency applications
23 AppRestrictedLowdelay = Application(C.OPUS_APPLICATION_RESTRICTED_LOWDELAY)
28 xMAX_FRAME_SIZE_MS = 60
29 xMAX_FRAME_SIZE = xMAX_BITRATE * xMAX_FRAME_SIZE_MS / 1000
30 // Maximum size of an encoded frame. I actually have no idea, but this
31 // looks like it's big enough.
32 maxEncodedFrameSize = 10000
35 func Version() string {
36 return C.GoString(C.opus_get_version_string())