cwFlowProc.cpp : Verify 'frame' and 'srate' in audio_merge.
This commit is contained in:
parent
b5172afc5f
commit
8dd86c27d0
@ -334,7 +334,7 @@ namespace cw
|
|||||||
{
|
{
|
||||||
unsigned chN = std::min(inst->ext_dev->u.a.abuf->chN, src_abuf->chN);
|
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 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)
|
for(unsigned i=0; i<n; ++i)
|
||||||
inst->ext_dev->u.a.abuf->buf[i] += src_abuf->buf[i];
|
inst->ext_dev->u.a.abuf->buf[i] += src_abuf->buf[i];
|
||||||
|
|
||||||
@ -1074,6 +1074,8 @@ namespace cw
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// TODO: check srate and frameN are same as first src
|
// TODO: check srate and frameN are same as first src
|
||||||
|
assert( abuf->frameN == frameN );
|
||||||
|
assert( abuf->srate == srate );
|
||||||
}
|
}
|
||||||
|
|
||||||
inst->srcN += 1;
|
inst->srcN += 1;
|
||||||
@ -1081,8 +1083,6 @@ namespace cw
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//outChN = abuf0->chN + abuf1->chN;
|
|
||||||
|
|
||||||
// register the gain
|
// register the gain
|
||||||
for(unsigned i=0; i<outChN; ++i)
|
for(unsigned i=0; i<outChN; ++i)
|
||||||
if((rc = var_register( ctx, i, kGainPId, "gain" )) != kOkRC )
|
if((rc = var_register( ctx, i, kGainPId, "gain" )) != kOkRC )
|
||||||
|
Loading…
Reference in New Issue
Block a user