Cleaned up audio code

This commit is contained in:
RogueException
2017-02-26 10:57:28 -04:00
parent 2db60749ca
commit 8e0c65498b
21 changed files with 495 additions and 276 deletions

View File

@@ -1,8 +1,30 @@
using System.IO;
using System;
using System.IO;
using System.Threading;
namespace Discord.Audio
{
public abstract class AudioInStream : Stream
{
public override bool CanRead => true;
public override bool CanSeek => false;
public override bool CanWrite => true;
public override void Write(byte[] buffer, int offset, int count)
{
WriteAsync(buffer, offset, count, CancellationToken.None).GetAwaiter().GetResult();
}
public override void Flush() { throw new NotSupportedException(); }
public override long Length { get { throw new NotSupportedException(); } }
public override long Position
{
get { throw new NotSupportedException(); }
set { throw new NotSupportedException(); }
}
public override void SetLength(long value) { throw new NotSupportedException(); }
public override long Seek(long offset, SeekOrigin origin) { throw new NotSupportedException(); }
}
}