Class OpusAudioCodec
- Namespace
- DSharpPlus.VoiceLink.AudioCodecs
- Assembly
- DSharpPlus.VoiceLink.dll
public class OpusAudioCodec : IAudioCodec
- Inheritance
-
OpusAudioCodec
- Implements
-
- Inherited Members
-
Fields
CHANNELS
public const int CHANNELS = 2
Field Value
- int
MAX_BUFFER_SIZE
public const int MAX_BUFFER_SIZE = 23040
Field Value
- int
MAX_FRAME_SIZE
public const int MAX_FRAME_SIZE = 5760
Field Value
- int
SilenceFrame
public static readonly byte[] SilenceFrame
Field Value
- byte[]
Methods
DecodeOpus(bool, ReadOnlySpan<byte>, Span<byte>)
public int DecodeOpus(bool hasPacketLoss, ReadOnlySpan<byte> input, Span<byte> output)
Parameters
hasPacketLoss
bool
input
ReadOnlySpan<byte>
output
Span<byte>
Returns
- int
EncodeOpus(ReadOnlySequence<byte>, Span<byte>)
public int EncodeOpus(ReadOnlySequence<byte> input, Span<byte> output)
Parameters
input
ReadOnlySequence<byte>
output
Span<byte>
Returns
- int
GetMaxBufferSize()
public int GetMaxBufferSize()
Returns
- int