cwFlowProc.cpp : Verify 'frame' and 'srate' in audio_merge.

This commit is contained in:
kevin 2023-02-14 21:07:03 -05:00
parent b5172afc5f
commit 8dd86c27d0

View File

@ -334,7 +334,7 @@ namespace cw
{
unsigned chN = std::min(inst->ext_dev->u.a.abuf->chN, src_abuf->chN);
unsigned frameN = std::min(inst->ext_dev->u.a.abuf->frameN, src_abuf->frameN);
unsigned n = chN * frameN;
unsigned n = chN * frameN;
for(unsigned i=0; i<n; ++i)
inst->ext_dev->u.a.abuf->buf[i] += src_abuf->buf[i];
@ -1074,6 +1074,8 @@ namespace cw
else
{
// TODO: check srate and frameN are same as first src
assert( abuf->frameN == frameN );
assert( abuf->srate == srate );
}
inst->srcN += 1;
@ -1081,8 +1083,6 @@ namespace cw
}
//outChN = abuf0->chN + abuf1->chN;
// register the gain
for(unsigned i=0; i<outChN; ++i)
if((rc = var_register( ctx, i, kGainPId, "gain" )) != kOkRC )