We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7618cdb commit ce53291Copy full SHA for ce53291
src/Discord.Net.WebSocket/Audio/Streams/OpusEncodeStream.cs
@@ -41,7 +41,10 @@ public async Task WriteSilentFramesAsync()
41
42
// The rest of the array is already zeroes, so no need to fill the rest.
43
44
- const int frameCount = 5;
+ // Discard any remaining partial frame.
45
+ _partialFramePos = 0;
46
+
47
+ const int frameCount = 5; // Discord specifically asks for 5 frames.
48
for (int i = 0; i < frameCount; i += 1)
49
{
50
await WriteAsync(frameBytes, 0, frameBytes.Length).ConfigureAwait(false);
0 commit comments