Added IDisposable to RTPWriteStream. Flush on Dispose.
This commit is contained in:
@@ -34,6 +34,12 @@ namespace Discord.Audio
|
|||||||
_nonce[11] = (byte)(_ssrc >> 0);
|
_nonce[11] = (byte)(_ssrc >> 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
Flush();
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
public override void Write(byte[] buffer, int offset, int count)
|
public override void Write(byte[] buffer, int offset, int count)
|
||||||
{
|
{
|
||||||
WriteAsync(buffer, offset, count, CancellationToken.None).GetAwaiter().GetResult();
|
WriteAsync(buffer, offset, count, CancellationToken.None).GetAwaiter().GetResult();
|
||||||
|
|||||||
Reference in New Issue
Block a user