feat: signed A/V sync offset (−500..+500), negative advances by eating live stream head (OBS eat-head semantics)
Positive offsets still delay the whole mix via the delay line (lip-sync fix); negative offsets now ARM once at StartLive and drop |N| ms off the pipe's write head so audio events land earlier when audio runs BEHIND video. Slider relabeled AUDIO SYNC, Min −500, locked while live/recording (IsEditMode). LayoutStore and VM clamp to −500..500. OBS reference for eat-the-head negative sync: https://obsproject.com/kb/obs-studio/buffering-time (negative sync values pull audio earlier by discarding buffered player audio). Test: StartLive_NegativeOffset_AdvancesAudio_ByDroppingTheStreamHead (6x0.9 head must be eaten before 0.2 bed reaches the wire).
This commit is contained in:
@@ -6,8 +6,9 @@ namespace ytLive.Tests;
|
||||
/// <summary>
|
||||
/// TASK 22: the global audio-sync delay line. It is a pure fixed positive
|
||||
/// delay on the interleaved stereo mix — the OBS fix for audio running ahead
|
||||
/// of video. Positive-only: advancing audio needs a video-side delay and is
|
||||
/// out of the audio layer's scope.
|
||||
/// of video. Positive-only: the line clamps negatives to 0; the NEGATIVE
|
||||
/// (advance) side — audio running behind video, the OBS "eat the buffer head"
|
||||
/// case — is covered by <see cref="AudioPipelineTests.StartLive_NegativeOffset_AdvancesAudio_ByDroppingTheStreamHead"/>.
|
||||
/// </summary>
|
||||
public class AudioSyncDelayTests
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user