fix(deltacast-bridge): configure both stereo channels + INTERFACE for audio extraction (SDK Sample_RXAudio)
This commit is contained in:
parent
6908801822
commit
8a675992c2
1 changed files with 12 additions and 0 deletions
|
|
@ -179,13 +179,25 @@ static void *audio_thread(void *arg) {
|
|||
VHD_SDI_STPROC_DISJOINED_ANC,
|
||||
NULL, &stream, NULL);
|
||||
if (r == VHDERR_NOERROR) {
|
||||
/* Per Deltacast SDK Sample_RXAudio.cpp: VHD_SDI_SP_INTERFACE must be
|
||||
* propagated to the audio stream, otherwise VHD_SlotExtractAudio
|
||||
* returns 0 samples (silent capture). */
|
||||
ULONG iface = 0;
|
||||
VHD_GetStreamProperty(stream, VHD_SDI_SP_INTERFACE, &iface);
|
||||
|
||||
VHD_SetStreamProperty(stream, VHD_SDI_SP_VIDEO_STANDARD, ps->video_std);
|
||||
VHD_SetStreamProperty(stream, VHD_SDI_SP_CLOCK_SYSTEM, ps->clock_div);
|
||||
VHD_SetStreamProperty(stream, VHD_CORE_SP_TRANSFER_SCHEME, VHD_TRANSFER_SLAVED);
|
||||
VHD_SetStreamProperty(stream, VHD_SDI_SP_INTERFACE, iface);
|
||||
|
||||
/* Configure BOTH channels of the stereo pair (group 0). The actual PCM
|
||||
* samples land in pAudioChannels[0].pData (packed L/R s16le). Channel
|
||||
* [1] must declare Mode+BufferFormat so the SDK recognizes the pair. */
|
||||
ai.pAudioGroups[0].pAudioChannels[0].Mode = VHD_AM_STEREO;
|
||||
ai.pAudioGroups[0].pAudioChannels[0].BufferFormat = VHD_AF_16;
|
||||
ai.pAudioGroups[0].pAudioChannels[0].pData = buf;
|
||||
ai.pAudioGroups[0].pAudioChannels[1].Mode = VHD_AM_STEREO;
|
||||
ai.pAudioGroups[0].pAudioChannels[1].BufferFormat = VHD_AF_16;
|
||||
|
||||
if (VHD_StartStream(stream) == VHDERR_NOERROR) {
|
||||
have_vhd_audio = 1;
|
||||
|
|
|
|||
Loading…
Reference in a new issue