Expose audio header more often

This commit is contained in:
RogueException
2017-05-25 13:54:57 -03:00
parent 3fb661a33a
commit 333881a711
9 changed files with 75 additions and 43 deletions

View File

@@ -11,7 +11,10 @@ namespace Discord.Audio
public override bool CanSeek => false;
public override bool CanWrite => false;
public virtual void WriteHeader(ushort seq, uint timestamp, bool missed) { }
public virtual void WriteHeader(ushort seq, uint timestamp, bool missed)
{
throw new InvalidOperationException("This stream does not accept headers");
}
public override void Write(byte[] buffer, int offset, int count)
{
WriteAsync(buffer, offset, count, CancellationToken.None).GetAwaiter().GetResult();