cwFlowProc.cpp : Fix audio_mix and audio_split _value() to ignore var updates when chIdx == kAnyChIdx.
This commit is contained in:
parent
e469be6a01
commit
53691fa480
@ -1415,15 +1415,17 @@ namespace cw
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case kInGainPId:
|
case kInGainPId:
|
||||||
assert( var->chIdx < p->iChN );
|
// skip kAnyChIdx because individual channels exist will be sent
|
||||||
rc = var_get(var,p->igainV[ var->chIdx ]);
|
if(var->chIdx != kAnyChIdx )
|
||||||
|
rc = var_get(var,p->igainV[ var->chIdx ]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
if( kOutGainPId <= var->vid && var->vid < kOutGainPId + p->oVarN )
|
// skip kAnyChIdx because individual channels exist and will be sent
|
||||||
|
if( kOutGainPId <= var->vid && var->vid < kOutGainPId + p->oVarN && var->chIdx != kAnyChIdx )
|
||||||
{
|
{
|
||||||
unsigned oVarIdx = var->label_sfx_id - kBaseSfxId;
|
unsigned oVarIdx = var->label_sfx_id - kBaseSfxId;
|
||||||
assert( oVarIdx < p->oVarN && var->chIdx < p->oVarA[oVarIdx].audioChN );
|
assert( oVarIdx < p->oVarN && var->chIdx < p->oVarA[oVarIdx].audioChN );
|
||||||
@ -1642,7 +1644,7 @@ namespace cw
|
|||||||
unsigned sfx_id; // sfx_id of both the audio and gain var's
|
unsigned sfx_id; // sfx_id of both the audio and gain var's
|
||||||
unsigned audioChN; // count of audio channels
|
unsigned audioChN; // count of audio channels
|
||||||
unsigned aVId; // (there can only be one audio var.)
|
unsigned aVId; // (there can only be one audio var.)
|
||||||
unsigned gVId; // (there is one gain var. per audio channel)
|
unsigned gVId; // (there is one gain var. per audio channel)
|
||||||
coeff_t* gainV; // gainV[ audioChN ]
|
coeff_t* gainV; // gainV[ audioChN ]
|
||||||
} audio_gain_t;
|
} audio_gain_t;
|
||||||
|
|
||||||
@ -1807,8 +1809,11 @@ namespace cw
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case kOutGainPId:
|
case kOutGainPId:
|
||||||
assert( var->chIdx < p->oag.audioChN);
|
assert( var->chIdx == kAnyChIdx || var->chIdx < p->oag.audioChN);
|
||||||
var_get(var,p->oag.gainV[var->chIdx] ); // ... update the associated gainV[] value
|
|
||||||
|
// (we skip kAnyChIdx because individual channels will follow)
|
||||||
|
if( var->chIdx != kAnyChIdx )
|
||||||
|
var_get(var,p->oag.gainV[var->chIdx] ); // ... update the associated gainV[] value
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -1816,14 +1821,17 @@ namespace cw
|
|||||||
// if this is an in-gain value
|
// if this is an in-gain value
|
||||||
if( p->baseInGainPId <= var->vid && var->vid < p->baseInGainPId + p->inAudioVarCnt )
|
if( p->baseInGainPId <= var->vid && var->vid < p->baseInGainPId + p->inAudioVarCnt )
|
||||||
{
|
{
|
||||||
// determine which in-gain variable this var is associated with
|
// determine which in-gain variable this var is associated with var->vid
|
||||||
for(unsigned i=0; i<p->inAudioVarCnt; ++i)
|
for(unsigned i=0; i<p->inAudioVarCnt; ++i)
|
||||||
if( p->iagV[i].gVId == var->vid )
|
if( p->iagV[i].gVId == var->vid )
|
||||||
{
|
{
|
||||||
// ... update the associated gainV[] value
|
assert( var->chIdx == kAnyChIdx || var->chIdx < p->iagV[i].audioChN);
|
||||||
assert( var->chIdx < p->iagV[i].audioChN);
|
|
||||||
var_get(var,p->iagV[i].gainV[var->chIdx]);
|
// ... and update the associated gainV[] value
|
||||||
goto errLabel;
|
// (we skip kAnyChIdx because individual channels will follow)
|
||||||
|
if( var->chIdx != kAnyChIdx )
|
||||||
|
var_get(var,p->iagV[i].gainV[var->chIdx]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user