Struct OpusDecoder
public readonly struct OpusDecoder : IDisposable
- Implements
- Inherited Members
Constructors
OpusDecoder(VoiceChannels)
public OpusDecoder(VoiceChannels channels)
Parameters
channelsVoiceChannelsNumber of channels to decode.
Methods
Decode(ReadOnlySpan<byte>, Span<byte>, int)
Decodes an Opus frame.
public int Decode(ReadOnlySpan<byte> data, Span<byte> pcm, int frameSize)
Parameters
dataReadOnlySpan<byte>Input payload. Use null to indicate packet loss.
pcmSpan<byte>Output signal.
frameSizeintNumber of samples per channel in the output signal.
Returns
- int
The number of decoded samples per channel.
Decode(ReadOnlySpan<byte>, Span<short>, int)
Decodes an Opus frame.
public int Decode(ReadOnlySpan<byte> data, Span<short> pcm, int frameSize)
Parameters
dataReadOnlySpan<byte>Input payload. Use null to indicate packet loss.
pcmSpan<short>Output signal.
frameSizeintNumber of samples per channel in the output signal.
Returns
- int
The number of decoded samples per channel.
DecodeFloat(ReadOnlySpan<byte>, Span<byte>, int)
Decodes an Opus frame.
public int DecodeFloat(ReadOnlySpan<byte> data, Span<byte> pcm, int frameSize)
Parameters
dataReadOnlySpan<byte>Input payload. Use null to indicate packet loss.
pcmSpan<byte>Output signal.
frameSizeintNumber of samples per channel in the output signal.
Returns
- int
The number of decoded samples per channel.
DecodeFloat(ReadOnlySpan<byte>, Span<float>, int)
Decodes an Opus frame.
public int DecodeFloat(ReadOnlySpan<byte> data, Span<float> pcm, int frameSize)
Parameters
dataReadOnlySpan<byte>Input payload. Use null to indicate packet loss.
pcmSpan<float>Output signal.
frameSizeintNumber of samples per channel in the output signal.
Returns
- int
The number of decoded samples per channel.
Dispose()
public void Dispose()