Fix audio clock drift and adaptive jitter buffering
This commit is contained in:
@@ -8,7 +8,7 @@ namespace VoiceCat.iOS;
|
||||
internal sealed class IosAudioEngine
|
||||
{
|
||||
internal static IosAudioEngine Shared { get; } = new();
|
||||
private readonly PcmRing playbackRing = new(131_072);
|
||||
private readonly AdaptivePcmBuffer playbackRing = new(2, capacityFrames: 65_536);
|
||||
private readonly short[] renderScratch = new short[16_384];
|
||||
private AVAudioEngine? engine;
|
||||
private AVAudioSourceNode? source;
|
||||
@@ -28,6 +28,7 @@ internal sealed class IosAudioEngine
|
||||
private bool inputProvided;
|
||||
private bool tapInstalled;
|
||||
internal bool IsConnected { get; private set; }
|
||||
internal int BufferMilliseconds { get => playbackRing.BufferMilliseconds; set => playbackRing.BufferMilliseconds = value; }
|
||||
|
||||
private IosAudioEngine() { microphoneWorker = PumpMicrophoneAsync(microphoneStop.Token); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user