|
@@ -1,4 +1,5 @@ |
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
|
using System.IO; |
|
|
|
|
|
using System.Threading.Tasks; |
|
|
|
|
|
|
|
|
namespace Discord.Audio |
|
|
namespace Discord.Audio |
|
|
{ |
|
|
{ |
|
@@ -7,14 +8,16 @@ namespace Discord.Audio |
|
|
ConnectionState State { get; } |
|
|
ConnectionState State { get; } |
|
|
Channel Channel { get; } |
|
|
Channel Channel { get; } |
|
|
Server Server { get; } |
|
|
Server Server { get; } |
|
|
|
|
|
Stream OutputStream { get; } |
|
|
|
|
|
|
|
|
Task Join(Channel channel); |
|
|
Task Join(Channel channel); |
|
|
Task Disconnect(); |
|
|
Task Disconnect(); |
|
|
|
|
|
|
|
|
/// <summary> Sends a PCM frame to the voice server. Will block until space frees up in the outgoing buffer. </summary> |
|
|
/// <summary> Sends a PCM frame to the voice server. Will block until space frees up in the outgoing buffer. </summary> |
|
|
/// <param name="data">PCM frame to send. This must be a single or collection of uncompressed 48Kz monochannel 20ms PCM frames. </param> |
|
|
/// <param name="data">PCM frame to send. This must be a single or collection of uncompressed 48Kz monochannel 20ms PCM frames. </param> |
|
|
|
|
|
/// <param name="offset">Offset . </param> |
|
|
/// <param name="count">Number of bytes in this frame. </param> |
|
|
/// <param name="count">Number of bytes in this frame. </param> |
|
|
void Send(byte[] data, int count); |
|
|
|
|
|
|
|
|
void Send(byte[] data, int offset, int count); |
|
|
/// <summary> Clears the PCM buffer. </summary> |
|
|
/// <summary> Clears the PCM buffer. </summary> |
|
|
void Clear(); |
|
|
void Clear(); |
|
|
/// <summary> Blocks until the voice output buffer is empty. </summary> |
|
|
/// <summary> Blocks until the voice output buffer is empty. </summary> |
|
|