|
@@ -302,6 +302,8 @@ enum
|
302
|
302
|
kMixKr2Id,
|
303
|
303
|
|
304
|
304
|
kWetKr2Id,
|
|
305
|
+ kIgainKr2Id,
|
|
306
|
+
|
305
|
307
|
kAudioInKr2Id,
|
306
|
308
|
kAudioOutKr2Id
|
307
|
309
|
};
|
|
@@ -320,7 +322,7 @@ cmDspInst_t* _cmDspKr2Alloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned s
|
320
|
322
|
{
|
321
|
323
|
cmDspVarArg_t args[] =
|
322
|
324
|
{
|
323
|
|
- { "wndn", kWndSmpCntKr2Id, 0, 0, kInDsvFl | kUIntDsvFl | kReqArgDsvFl, "Window sample count" },
|
|
325
|
+ { "wndn", kWndSmpCntKr2Id, 0, 0, kInDsvFl | kUIntDsvFl | kReqArgDsvFl, "Window sample count" },
|
324
|
326
|
{ "hopf", kHopFactKr2Id, 0, 0, kInDsvFl | kUIntDsvFl | kOptArgDsvFl, "Hop factor" },
|
325
|
327
|
|
326
|
328
|
{ "ceil", kCeilKr2Id, 0, 0, kInDsvFl | kDoubleDsvFl | kOptArgDsvFl, "Ceiling" },
|
|
@@ -333,6 +335,8 @@ cmDspInst_t* _cmDspKr2Alloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned s
|
333
|
335
|
{ "mix", kMixKr2Id, 0, 0, kInDsvFl | kDoubleDsvFl | kOptArgDsvFl, "Mix"},
|
334
|
336
|
|
335
|
337
|
{ "wet", kWetKr2Id, 0, 0, kInDsvFl | kSampleDsvFl, "Wet mix level."},
|
|
338
|
+ { "igain", kIgainKr2Id, 0, 0, kInDsvFl | kDoubleDsvFl | kOptArgDsvFl, "Input gain."},
|
|
339
|
+
|
336
|
340
|
{ "in", kAudioInKr2Id, 0, 0, kInDsvFl | kAudioBufDsvFl, "Audio Input" },
|
337
|
341
|
{ "out", kAudioOutKr2Id, 0, 1, kOutDsvFl | kAudioBufDsvFl, "Audio Output" },
|
338
|
342
|
{ NULL, 0, 0, 0, 0 }
|
|
@@ -355,7 +359,10 @@ cmDspInst_t* _cmDspKr2Alloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned s
|
355
|
359
|
cmDspSetDefaultDouble( ctx,&p->inst, kMixKr2Id, 0, 0.0 );
|
356
|
360
|
|
357
|
361
|
cmDspSetDefaultSample( ctx,&p->inst, kWetKr2Id, 0, 1.0);
|
|
362
|
+
|
|
363
|
+ cmDspSetDefaultDouble( ctx,&p->inst, kIgainKr2Id, 0, 0.0 );
|
358
|
364
|
|
|
365
|
+
|
359
|
366
|
//_cmDspKr2CmInit(ctx,p); // initialize the cm library
|
360
|
367
|
|
361
|
368
|
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
|
504
|
511
|
case kWetKr2Id:
|
505
|
512
|
break;
|
506
|
513
|
|
|
514
|
+ case kIgainKr2Id:
|
|
515
|
+ p->sdp->igain = cmDspDouble(inst,kIgainKr2Id);
|
|
516
|
+ break;
|
|
517
|
+
|
507
|
518
|
default:
|
508
|
519
|
{ assert(0); }
|
509
|
520
|
}
|
510
|
521
|
|
511
|
|
- cmSpecDist2Report(p->sdp);
|
|
522
|
+ //cmSpecDist2Report(p->sdp);
|
512
|
523
|
|
513
|
524
|
return rc;
|
514
|
525
|
}
|