Class OpusEncoder
public sealed class OpusEncoder : IDisposable
- Inheritance
-
OpusEncoder
- Implements
- Inherited Members
Constructors
OpusEncoder(VoiceChannels, OpusApplication)
public OpusEncoder(VoiceChannels channels, OpusApplication application)
Parameters
channels
VoiceChannelsNumber of channels in input signal.
application
OpusApplicationOpus coding mode.
Exceptions
Methods
Dispose()
public void Dispose()
Encode(ReadOnlySpan<byte>, Span<byte>)
Encodes an Opus frame.
public int Encode(ReadOnlySpan<byte> pcm, Span<byte> data)
Parameters
pcm
ReadOnlySpan<byte>Input signal.
data
Span<byte>Output payload.
Returns
- int
The length of the encoded packet.
Exceptions
EncodeFloat(ReadOnlySpan<byte>, Span<byte>)
Encodes an Opus frame.
public int EncodeFloat(ReadOnlySpan<byte> pcm, Span<byte> data)
Parameters
pcm
ReadOnlySpan<byte>Input signal.
data
Span<byte>Output payload.
Returns
- int
The length of the encoded packet.