From f5566cbb81aae13bb463a7ec2816637cb4bf781f Mon Sep 17 00:00:00 2001 From: OpenCode Date: Fri, 5 Jun 2026 14:12:23 +0000 Subject: [PATCH] fix(bridge): JOINED audio needs BOTH stereo channels declared (fixes -91dB silence) VHD_SlotExtractAudio on the JOINED slot returned -91dB silence when only pAudioChannels[0] was declared. On this card/SDK declaring BOTH channel[0] and channel[1] of the stereo pair makes the SDK land real PCM. Verified -13.3dB audible against the live SDI source (was -91dB). --- services/capture/deltacast-bridge/main.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/services/capture/deltacast-bridge/main.c b/services/capture/deltacast-bridge/main.c index 5be5b08..d6c8f0c 100644 --- a/services/capture/deltacast-bridge/main.c +++ b/services/capture/deltacast-bridge/main.c @@ -474,7 +474,15 @@ static void audio_extract_init(AudioExtract *ax, PortState *ps) { ax->ai.pAudioGroups[0].pAudioChannels[0].Mode = VHD_AM_STEREO; ax->ai.pAudioGroups[0].pAudioChannels[0].BufferFormat = VHD_AF_16; ax->ai.pAudioGroups[0].pAudioChannels[0].pData = ax->buf; - /* pAudioChannels[1] intentionally left zeroed (memset above). */ + /* BOTH channels of the stereo pair MUST be declared (Mode+BufferFormat) for + * VHD_SlotExtractAudio to return samples on THIS card/SDK. Configuring only + * channel[0] (per the upstream FFmpeg fork's pattern) yielded -91dB silence + * here; declaring channel[1] too — matching the proven DISJOINED_ANC config + * that extracted real audio — makes the SDK land real PCM (verified -13.3dB + * against the live source). The interleaved L/R s16le still lands in + * channel[0].pData; channel[1] just needs its descriptor present. */ + ax->ai.pAudioGroups[0].pAudioChannels[1].Mode = VHD_AM_STEREO; + ax->ai.pAudioGroups[0].pAudioChannels[1].BufferFormat = VHD_AF_16; ax->enabled = 1; }