Class OpusEncodeStream
Converts PCM to Opus
Assembly: Discord.Net.WebSocket.dll​
View Source​
Declaration
public class OpusEncodeStream : AudioOutStream, IDisposable
Fields​
SampleRate​
View Source​
Declaration
public const int SampleRate = 48000
Methods​
WriteAsync(Byte[], Int32, Int32, CancellationToken)​
View Source​
Declaration
public override async Task WriteAsync(byte[] buffer, int offset, int count, CancellationToken cancelToken)
Returns​
System.Threading.Tasks.Task
Parameters​
Type | Name |
---|---|
System.Byte[] | buffer |
System.Int32 | offset |
System.Int32 | count |
System.Threading.CancellationToken | cancelToken |
FlushAsync(CancellationToken)​
View Source​
Declaration
public override async Task FlushAsync(CancellationToken cancelToken)
Returns​
System.Threading.Tasks.Task
Parameters​
Type | Name |
---|---|
System.Threading.CancellationToken | cancelToken |
ClearAsync(CancellationToken)​
View Source​
Declaration
public override async Task ClearAsync(CancellationToken cancelToken)
Returns​
System.Threading.Tasks.Task
Parameters​
Type | Name |
---|---|
System.Threading.CancellationToken | cancelToken |
Dispose(Boolean)​
View Source​
Declaration
protected override void Dispose(bool disposing)
Parameters​
Type | Name |
---|---|
System.Boolean | disposing |
Implements​
System.IDisposable