Show / Hide Table of Contents

Interface IAudioClient

Inherited Members
System.IDisposable.Dispose()
Namespace: Discord.Audio
Assembly: Discord.Net.Core.dll
Syntax
public interface IAudioClient : IDisposable

Properties

| Improve this Doc View Source

ConnectionState

Gets the current connection state of this client.

Declaration
ConnectionState ConnectionState { get; }
Property Value
Type Description
ConnectionState
| Improve this Doc View Source

Latency

Gets the estimated round-trip latency, in milliseconds, to the voice WebSocket server.

Declaration
int Latency { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

UdpLatency

Gets the estimated round-trip latency, in milliseconds, to the voice UDP server.

Declaration
int UdpLatency { get; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

CreateDirectOpusStream()

Creates a new outgoing stream accepting Opus-encoded data. This is a direct stream with no internal timer.

Declaration
AudioOutStream CreateDirectOpusStream()
Returns
Type Description
AudioOutStream
| Improve this Doc View Source

CreateDirectPCMStream(AudioApplication, Nullable<Int32>, Int32)

Creates a new direct outgoing stream accepting PCM (raw) data. This is a direct stream with no internal timer.

Declaration
AudioOutStream CreateDirectPCMStream(AudioApplication application, int? bitrate = default(int? ), int packetLoss = 30)
Parameters
Type Name Description
AudioApplication application
System.Nullable<System.Int32> bitrate
System.Int32 packetLoss
Returns
Type Description
AudioOutStream
| Improve this Doc View Source

CreateOpusStream(Int32)

Creates a new outgoing stream accepting Opus-encoded data.

Declaration
AudioOutStream CreateOpusStream(int bufferMillis = 1000)
Parameters
Type Name Description
System.Int32 bufferMillis
Returns
Type Description
AudioOutStream
| Improve this Doc View Source

CreatePCMStream(AudioApplication, Nullable<Int32>, Int32, Int32)

Creates a new outgoing stream accepting PCM (raw) data.

Declaration
AudioOutStream CreatePCMStream(AudioApplication application, int? bitrate = default(int? ), int bufferMillis = 1000, int packetLoss = 30)
Parameters
Type Name Description
AudioApplication application
System.Nullable<System.Int32> bitrate
System.Int32 bufferMillis
System.Int32 packetLoss
Returns
Type Description
AudioOutStream
| Improve this Doc View Source

SetSpeakingAsync(Boolean)

Declaration
Task SetSpeakingAsync(bool value)
Parameters
Type Name Description
System.Boolean value
Returns
Type Description
System.Threading.Tasks.Task
| Improve this Doc View Source

StopAsync()

Declaration
Task StopAsync()
Returns
Type Description
System.Threading.Tasks.Task

Events

| Improve this Doc View Source

Connected

Declaration
event Func<Task> Connected
Event Type
Type Description
System.Func<System.Threading.Tasks.Task>
| Improve this Doc View Source

Disconnected

Declaration
event Func<Exception, Task> Disconnected
Event Type
Type Description
System.Func<System.Exception, System.Threading.Tasks.Task>
| Improve this Doc View Source

LatencyUpdated

Declaration
event Func<int, int, Task> LatencyUpdated
Event Type
Type Description
System.Func<System.Int32, System.Int32, System.Threading.Tasks.Task>
| Improve this Doc View Source

SpeakingUpdated

Declaration
event Func<ulong, bool, Task> SpeakingUpdated
Event Type
Type Description
System.Func<System.UInt64, System.Boolean, System.Threading.Tasks.Task>
| Improve this Doc View Source

StreamCreated

Declaration
event Func<ulong, AudioInStream, Task> StreamCreated
Event Type
Type Description
System.Func<System.UInt64, AudioInStream, System.Threading.Tasks.Task>
| Improve this Doc View Source

StreamDestroyed

Declaration
event Func<ulong, Task> StreamDestroyed
Event Type
Type Description
System.Func<System.UInt64, System.Threading.Tasks.Task>
| Improve this Doc View Source

UdpLatencyUpdated

Declaration
event Func<int, int, Task> UdpLatencyUpdated
Event Type
Type Description
System.Func<System.Int32, System.Int32, System.Threading.Tasks.Task>
  • Improve this Doc
  • View Source
Back to top Generated by DocFX