Add adaptive packet loss handling
Build and test / test (macos-latest) (push) Canceled after 0s
Build and test / test (ubuntu-24.04) (push) Canceled after 0s
Build and test / test (windows-latest) (push) Canceled after 0s
Build and test / apple-client (push) Canceled after 0s

This commit is contained in:
2026-09-22 16:54:49 +02:00
parent 7c4708c3de
commit 7b0c003ad4
35 changed files with 518 additions and 60 deletions
+9
View File
@@ -4,6 +4,15 @@ namespace VoiceCat.Tests;
public sealed class CodecTests
{
[Fact]
public void ExpectedPacketLossCanChangeWithoutRecreatingEncoder()
{
using var encoder = new OpusEncoder(new() { ExpectedPacketLossPercent = 5 });
encoder.SetExpectedPacketLossPercent(17);
Assert.Equal(17, encoder.ExpectedPacketLossPercent);
Assert.Throws<ArgumentOutOfRangeException>(() => encoder.SetExpectedPacketLossPercent(101));
}
public static IEnumerable<object[]> Formats()
{
foreach (int rate in new[] { 8000, 12000, 16000, 24000, 48000 })