cmDspKr.c : Update 'Kr2' to use input igain variable.
This commit is contained in:
parent
349979f8b5
commit
220ca1577c
@ -302,6 +302,8 @@ enum
|
|||||||
kMixKr2Id,
|
kMixKr2Id,
|
||||||
|
|
||||||
kWetKr2Id,
|
kWetKr2Id,
|
||||||
|
kIgainKr2Id,
|
||||||
|
|
||||||
kAudioInKr2Id,
|
kAudioInKr2Id,
|
||||||
kAudioOutKr2Id
|
kAudioOutKr2Id
|
||||||
};
|
};
|
||||||
@ -320,7 +322,7 @@ cmDspInst_t* _cmDspKr2Alloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned s
|
|||||||
{
|
{
|
||||||
cmDspVarArg_t args[] =
|
cmDspVarArg_t args[] =
|
||||||
{
|
{
|
||||||
{ "wndn", kWndSmpCntKr2Id, 0, 0, kInDsvFl | kUIntDsvFl | kReqArgDsvFl, "Window sample count" },
|
{ "wndn", kWndSmpCntKr2Id, 0, 0, kInDsvFl | kUIntDsvFl | kReqArgDsvFl, "Window sample count" },
|
||||||
{ "hopf", kHopFactKr2Id, 0, 0, kInDsvFl | kUIntDsvFl | kOptArgDsvFl, "Hop factor" },
|
{ "hopf", kHopFactKr2Id, 0, 0, kInDsvFl | kUIntDsvFl | kOptArgDsvFl, "Hop factor" },
|
||||||
|
|
||||||
{ "ceil", kCeilKr2Id, 0, 0, kInDsvFl | kDoubleDsvFl | kOptArgDsvFl, "Ceiling" },
|
{ "ceil", kCeilKr2Id, 0, 0, kInDsvFl | kDoubleDsvFl | kOptArgDsvFl, "Ceiling" },
|
||||||
@ -333,6 +335,8 @@ cmDspInst_t* _cmDspKr2Alloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned s
|
|||||||
{ "mix", kMixKr2Id, 0, 0, kInDsvFl | kDoubleDsvFl | kOptArgDsvFl, "Mix"},
|
{ "mix", kMixKr2Id, 0, 0, kInDsvFl | kDoubleDsvFl | kOptArgDsvFl, "Mix"},
|
||||||
|
|
||||||
{ "wet", kWetKr2Id, 0, 0, kInDsvFl | kSampleDsvFl, "Wet mix level."},
|
{ "wet", kWetKr2Id, 0, 0, kInDsvFl | kSampleDsvFl, "Wet mix level."},
|
||||||
|
{ "igain", kIgainKr2Id, 0, 0, kInDsvFl | kDoubleDsvFl | kOptArgDsvFl, "Input gain."},
|
||||||
|
|
||||||
{ "in", kAudioInKr2Id, 0, 0, kInDsvFl | kAudioBufDsvFl, "Audio Input" },
|
{ "in", kAudioInKr2Id, 0, 0, kInDsvFl | kAudioBufDsvFl, "Audio Input" },
|
||||||
{ "out", kAudioOutKr2Id, 0, 1, kOutDsvFl | kAudioBufDsvFl, "Audio Output" },
|
{ "out", kAudioOutKr2Id, 0, 1, kOutDsvFl | kAudioBufDsvFl, "Audio Output" },
|
||||||
{ NULL, 0, 0, 0, 0 }
|
{ NULL, 0, 0, 0, 0 }
|
||||||
@ -355,7 +359,10 @@ cmDspInst_t* _cmDspKr2Alloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned s
|
|||||||
cmDspSetDefaultDouble( ctx,&p->inst, kMixKr2Id, 0, 0.0 );
|
cmDspSetDefaultDouble( ctx,&p->inst, kMixKr2Id, 0, 0.0 );
|
||||||
|
|
||||||
cmDspSetDefaultSample( ctx,&p->inst, kWetKr2Id, 0, 1.0);
|
cmDspSetDefaultSample( ctx,&p->inst, kWetKr2Id, 0, 1.0);
|
||||||
|
|
||||||
|
cmDspSetDefaultDouble( ctx,&p->inst, kIgainKr2Id, 0, 0.0 );
|
||||||
|
|
||||||
|
|
||||||
//_cmDspKr2CmInit(ctx,p); // initialize the cm library
|
//_cmDspKr2CmInit(ctx,p); // initialize the cm library
|
||||||
|
|
||||||
p->ctx = cmCtxAlloc(NULL,ctx->rpt,ctx->lhH,ctx->stH);
|
p->ctx = cmCtxAlloc(NULL,ctx->rpt,ctx->lhH,ctx->stH);
|
||||||
@ -504,11 +511,15 @@ cmDspRC_t _cmDspKr2Recv(cmDspCtx_t* ctx, cmDspInst_t* inst, const cmDspEvt_t* ev
|
|||||||
case kWetKr2Id:
|
case kWetKr2Id:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case kIgainKr2Id:
|
||||||
|
p->sdp->igain = cmDspDouble(inst,kIgainKr2Id);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{ assert(0); }
|
{ assert(0); }
|
||||||
}
|
}
|
||||||
|
|
||||||
cmSpecDist2Report(p->sdp);
|
//cmSpecDist2Report(p->sdp);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user