Class OpusEncodeStream
public sealed class OpusEncodeStream : RewritingStream, IDisposable, IAsyncDisposable
- Inheritance
-
OpusEncodeStream
- Implements
- Inherited Members
Constructors
OpusEncodeStream(Stream, PcmFormat, VoiceChannels, OpusApplication, OpusEncodeStreamConfiguration?, bool)
public OpusEncodeStream(Stream next, PcmFormat format, VoiceChannels channels, OpusApplication application, OpusEncodeStreamConfiguration? configuration = null, bool leaveOpen = false)
Parameters
nextStreamThe stream that this stream is writing to.
formatPcmFormatThe PCM format to encode from.
channelsVoiceChannelsNumber of channels in input signal.
applicationOpusApplicationOpus coding mode.
configurationOpusEncodeStreamConfigurationThe configuration of the stream.
leaveOpenboolWhether to leave the next stream open when this stream is disposed.
Methods
Write(ReadOnlySpan<byte>)
public override void Write(ReadOnlySpan<byte> buffer)
Parameters
bufferReadOnlySpan<byte>
WriteAsync(ReadOnlyMemory<byte>, CancellationToken)
public override ValueTask WriteAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken = default)
Parameters
bufferReadOnlyMemory<byte>cancellationTokenCancellationToken