DiscordOpusCodeable
public protocol DiscordOpusCodeable
Declares that a type has enough information to encode/decode Opus data.
-
The number of channels.
Declaration
Swift
var channels: Int -
The sampling rate.
Declaration
Swift
var sampleRate: Int
-
maxFrameSize(assumingSize:)Default implementationReturns the maximum number of bytes that a frame can contain given a frame size in number of samples per channel.
Default Implementation
Returns the maximum number of bytes that a frame can contain given a frame size in number of samples per channel.
Declaration
Swift
func maxFrameSize(assumingSize size: Int) -> IntParameters
assumingSizeThe size of the frame, in number of samples per channel.
Return Value
The number of bytes in this frame.
DiscordOpusCodeable Protocol Reference