Interface IAudioClient
public interface IAudioClient : IDisposable
- Inherited Members
Properties
ConnectionState
Gets the current connection state of this client.
ConnectionState ConnectionState { get; }
Property Value
Latency
Gets the estimated round-trip latency, in milliseconds, to the voice WebSocket server.
int Latency { get; }
Property Value
UdpLatency
Gets the estimated round-trip latency, in milliseconds, to the voice UDP server.
int UdpLatency { get; }
Property Value
Methods
CreateDirectOpusStream()
Creates a new outgoing stream accepting Opus-encoded data. This is a direct stream with no internal timer.
AudioOutStream CreateDirectOpusStream()
Returns
CreateDirectPCMStream(AudioApplication, int?, int)
Creates a new direct outgoing stream accepting PCM (raw) data. This is a direct stream with no internal timer.
AudioOutStream CreateDirectPCMStream(AudioApplication application, int? bitrate = null, int packetLoss = 30)
Parameters
application
AudioApplicationbitrate
int?packetLoss
int
Returns
CreateOpusStream(int)
Creates a new outgoing stream accepting Opus-encoded data.
AudioOutStream CreateOpusStream(int bufferMillis = 1000)
Parameters
bufferMillis
int
Returns
CreatePCMStream(AudioApplication, int?, int, int)
Creates a new outgoing stream accepting PCM (raw) data.
AudioOutStream CreatePCMStream(AudioApplication application, int? bitrate = null, int bufferMillis = 1000, int packetLoss = 30)
Parameters
application
AudioApplicationbitrate
int?bufferMillis
intpacketLoss
int
Returns
GetStreams()
Gets the current audio streams.
IReadOnlyDictionary<ulong, AudioInStream> GetStreams()
Returns
SetSpeakingAsync(bool)
Task SetSpeakingAsync(bool value)
Parameters
value
bool
Returns
StopAsync()
Task StopAsync()
Returns
Events
ClientDisconnected
event Func<ulong, Task> ClientDisconnected
Event Type
Connected
event Func<Task> Connected
Event Type
Disconnected
event Func<Exception, Task> Disconnected
Event Type
LatencyUpdated
event Func<int, int, Task> LatencyUpdated
Event Type
SpeakingUpdated
event Func<ulong, bool, Task> SpeakingUpdated
Event Type
StreamCreated
event Func<ulong, AudioInStream, Task> StreamCreated
Event Type
StreamDestroyed
event Func<ulong, Task> StreamDestroyed
Event Type
UdpLatencyUpdated
event Func<int, int, Task> UdpLatencyUpdated