Various audio fixes
This commit is contained in:
@@ -11,6 +11,7 @@ namespace Discord.Audio
|
||||
public override bool CanSeek => false;
|
||||
public override bool CanWrite => false;
|
||||
|
||||
public virtual void WriteHeader(ushort seq, uint timestamp, bool missed) { }
|
||||
public override void Write(byte[] buffer, int offset, int count)
|
||||
{
|
||||
WriteAsync(buffer, offset, count, CancellationToken.None).GetAwaiter().GetResult();
|
||||
|
||||
@@ -5,12 +5,14 @@ namespace Discord.Audio
|
||||
public readonly ushort Sequence;
|
||||
public readonly uint Timestamp;
|
||||
public readonly byte[] Payload;
|
||||
public readonly bool Missed;
|
||||
|
||||
public RTPFrame(ushort sequence, uint timestamp, byte[] payload)
|
||||
public RTPFrame(ushort sequence, uint timestamp, byte[] payload, bool missed)
|
||||
{
|
||||
Sequence = sequence;
|
||||
Timestamp = timestamp;
|
||||
Payload = payload;
|
||||
Missed = missed;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,8 @@ namespace Discord.Net.Udp
|
||||
{
|
||||
event Func<byte[], int, int, Task> ReceivedDatagram;
|
||||
|
||||
ushort Port { get; }
|
||||
|
||||
void SetCancelToken(CancellationToken cancelToken);
|
||||
void SetDestination(string ip, int port);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user