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 implementation

    Returns 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) -> Int

    Parameters

    assumingSize

    The size of the frame, in number of samples per channel.

    Return Value

    The number of bytes in this frame.