Browse Source

cmDspKr.c : Update 'Kr2' to use input igain variable.

master
kevin 4 years ago
parent
commit
220ca1577c
1 changed files with 13 additions and 2 deletions
  1. 13
    2
      src/dsp/cmDspKr.c

+ 13
- 2
src/dsp/cmDspKr.c View File

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

Loading…
Cancel
Save