- Posts: 2
- Joined: Mon Feb 28, 2022 2:15 pm
- Real Name: Israel friedland
Hi Isreal,
Check that before you commence playback with IDeckLinkOutput::StartScheduledPlayback, that you have sufficient prerolled video frames and equivalent number of audio samples (48KHz*preroll/fps).
You may not have sufficient audio in the scheduling queue when requested for the SDI frame, resulting in delay in audio when it does get output. You can check this by logging the output of IDeckLinkOutput::GetBufferedAudioSampleFrameCount.
You should also monitor the completion result (BMDOutputFrameCompletionResult) in the IDeckLinkVideoOutputCallback::ScheduledFrameCompleted callback. If you are seeing scheduled frames have been dropped, then it may result in some misalignment.
It may also be worth checking behaviour of audio by switching to timestamped output - in IDeckLinkOutput::EnableAudioOutput, set stream type to bmdAudioOutputStreamTimestamped. For simplicity, use timescale of 48000 and increment stream time by the packet sample count. Check output video and audio for any discontinuity.
Regards
Cameron