|
@@ -5,11 +5,6 @@ namespace Discord.WebSockets.Voice |
|
|
{ |
|
|
{ |
|
|
internal class VoiceBuffer : IDiscordVoiceBuffer |
|
|
internal class VoiceBuffer : IDiscordVoiceBuffer |
|
|
{ |
|
|
{ |
|
|
public int FrameSize => _frameSize; |
|
|
|
|
|
public int FrameCount => _frameCount; |
|
|
|
|
|
public ushort ReadPos => _readCursor; |
|
|
|
|
|
public ushort WritePos => _readCursor; |
|
|
|
|
|
|
|
|
|
|
|
private readonly int _frameSize, _frameCount, _bufferSize; |
|
|
private readonly int _frameSize, _frameCount, _bufferSize; |
|
|
private readonly byte[] _buffer; |
|
|
private readonly byte[] _buffer; |
|
|
private readonly byte[] _blankFrame; |
|
|
private readonly byte[] _blankFrame; |
|
@@ -17,6 +12,11 @@ namespace Discord.WebSockets.Voice |
|
|
private ManualResetEventSlim _underflowEvent, _notOverflowEvent; |
|
|
private ManualResetEventSlim _underflowEvent, _notOverflowEvent; |
|
|
private bool _isClearing; |
|
|
private bool _isClearing; |
|
|
|
|
|
|
|
|
|
|
|
public int FrameSize => _frameSize; |
|
|
|
|
|
public int FrameCount => _frameCount; |
|
|
|
|
|
public ushort ReadPos => _readCursor; |
|
|
|
|
|
public ushort WritePos => _readCursor; |
|
|
|
|
|
|
|
|
public VoiceBuffer(int frameCount, int frameSize) |
|
|
public VoiceBuffer(int frameCount, int frameSize) |
|
|
{ |
|
|
{ |
|
|
_frameSize = frameSize; |
|
|
_frameSize = frameSize; |
|
|