Browse Source

cmDspPgmKr.c : Added 'useWtFl' to cmDspSysPgm_Timeline.

master
kevin 10 years ago
parent
commit
f96e261382
1 changed files with 36 additions and 30 deletions
  1. 36
    30
      dsp/cmDspPgmKr.c

+ 36
- 30
dsp/cmDspPgmKr.c View File

@@ -61,8 +61,6 @@ cmDspRC_t krLoadRsrc(cmDspSysH_t h, cmErr_t* err, krRsrc_t* r)
61 61
   cmDspRsrcString(h,&r->midiDevice,  "midiDevice",   NULL);
62 62
   cmDspRsrcString(h,&r->midiOutPort, "midiOutPort",  NULL);
63 63
 
64
-  
65
-
66 64
   if((rc = cmDspSysLastRC(h)) != kOkDspRC )
67 65
     cmErrMsg(err,rc,"A KR DSP resource load failed.");
68 66
     
@@ -364,6 +362,7 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
364 362
   cmErr_t         err;
365 363
   krRsrc_t        r;
366 364
   bool            fragFl     = false;
365
+  bool            useWtFl    = true;
367 366
   unsigned        wtLoopCnt  = 1;                            // 1=play once (-1=loop forever)
368 367
   unsigned        wtInitMode = 0;                            // initial wt mode is 'silence'
369 368
   unsigned        wtSmpCnt   = floor(cmDspSysSampleRate(h)); // wt length == srate
@@ -498,21 +497,22 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
498 497
   // Audio connections
499 498
   cmDspSysConnectAudio(h, php,  "out",   wtp,  "phs" );     // phs -> wt
500 499
 
501
-  cmDspSysConnectAudio(h, wtp,    "out",   au0Sw, "a-in-0" ); // wt  -> sw
502
-
503
-  /*
504
-  cmDspSysConnectAudio(h, ai0p,   "out",   au0Sw, "a-in-1" ); // ain -> sw
505
-  cmDspSysConnectAudio(h, ai0p,   "out",   mi0p,  "in" );     
506
-  cmDspSysConnectAudio(h, au0Sw,  "a-out", rpp,   "in-0");    // sw  -> rcdply
507
-  cmDspSysConnectAudio(h, au0Sw,  "a-out", c0.kr0,"in"  );    // sw  -> kr
508
-  cmDspSysConnectAudio(h, au0Sw,  "a-out", c0.kr1,"in"  );    // sw  -> kr
509
-  */
510
-
511
-
512
-  cmDspSysConnectAudio(h, ai0p,  "out", rpp,   "in-0");    // sw  -> rcdply
513
-  cmDspSysConnectAudio(h, ai0p,   "out",   c0.kr0, "in" ); // ain -> sw
514
-  cmDspSysConnectAudio(h, ai0p,   "out",   c0.kr1, "in" ); // ain -> sw
515
-  cmDspSysConnectAudio(h, ai0p,   "out",   mi0p,  "in" );     
500
+  if( useWtFl )
501
+  {
502
+    cmDspSysConnectAudio(h, wtp,    "out",   au0Sw, "a-in-0" ); // wt  -> sw
503
+    cmDspSysConnectAudio(h, ai0p,   "out",   au0Sw, "a-in-1" ); // ain -> sw
504
+    cmDspSysConnectAudio(h, ai0p,   "out",   mi0p,  "in" );     
505
+    cmDspSysConnectAudio(h, au0Sw,  "a-out", rpp,   "in-0");    // sw  -> rcdply
506
+    cmDspSysConnectAudio(h, au0Sw,  "a-out", c0.kr0,"in"  );    // sw  -> kr
507
+    cmDspSysConnectAudio(h, au0Sw,  "a-out", c0.kr1,"in"  );    // sw  -> kr
508
+  }
509
+  else
510
+  {
511
+    cmDspSysConnectAudio(h, ai0p,  "out", rpp,   "in-0");    // sw  -> rcdply
512
+    cmDspSysConnectAudio(h, ai0p,   "out",   c0.kr0, "in" ); // ain -> sw
513
+    cmDspSysConnectAudio(h, ai0p,   "out",   c0.kr1, "in" ); // ain -> sw
514
+    cmDspSysConnectAudio(h, ai0p,   "out",   mi0p,  "in" );     
515
+  }
516 516
 
517 517
   if( fragFl )
518 518
   {
@@ -525,22 +525,26 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
525 525
   else
526 526
   {
527 527
     cmDspSysConnectAudio(h, c0.cmp, "out", ao0p, "in" );
528
+    //cmDspSysConnectAudio(h, wtp, "out", ao0p, "in" );
528 529
   }
529 530
 
530 531
 
531
-  cmDspSysConnectAudio(h, wtp,    "out",   au1Sw, "a-in-0" ); // wt  -> sw
532
-  /*
533
-  cmDspSysConnectAudio(h, ai1p,   "out",   au1Sw, "a-in-1" ); // ain -> sw
534
-  cmDspSysConnectAudio(h, ai1p,   "out",   mi1p,  "in" );
535
-  cmDspSysConnectAudio(h, au1Sw,  "a-out", rpp,   "in-1");    // sw  -> rcdply
536
-  cmDspSysConnectAudio(h, au1Sw,  "a-out", c1.kr0,"in"  );    // sw  -> kr
537
-  cmDspSysConnectAudio(h, au1Sw,  "a-out", c1.kr1,"in"  );    // sw  -> kr
538
-  */
539
-
540
-  cmDspSysConnectAudio(h, ai1p,  "out", rpp,   "in-1");    // sw  -> rcdply
541
-  cmDspSysConnectAudio(h, ai1p,   "out",   c1.kr0, "in" ); // ain -> sw
542
-  cmDspSysConnectAudio(h, ai1p,   "out",   c1.kr1, "in" ); // ain -> sw
543
-  cmDspSysConnectAudio(h, ai1p,   "out",   mi1p,  "in" );
532
+  if( useWtFl )
533
+  {
534
+    cmDspSysConnectAudio(h, wtp,    "out",   au1Sw, "a-in-0" ); // wt  -> sw
535
+    cmDspSysConnectAudio(h, ai1p,   "out",   au1Sw, "a-in-1" ); // ain -> sw
536
+    cmDspSysConnectAudio(h, ai1p,   "out",   mi1p,  "in" );
537
+    cmDspSysConnectAudio(h, au1Sw,  "a-out", rpp,   "in-1");    // sw  -> rcdply
538
+    cmDspSysConnectAudio(h, au1Sw,  "a-out", c1.kr0,"in"  );    // sw  -> kr
539
+    cmDspSysConnectAudio(h, au1Sw,  "a-out", c1.kr1,"in"  );    // sw  -> kr
540
+  }
541
+  else
542
+  {
543
+    cmDspSysConnectAudio(h, ai1p,  "out", rpp,   "in-1");    // sw  -> rcdply
544
+    cmDspSysConnectAudio(h, ai1p,   "out",   c1.kr0, "in" ); // ain -> sw
545
+    cmDspSysConnectAudio(h, ai1p,   "out",   c1.kr1, "in" ); // ain -> sw
546
+    cmDspSysConnectAudio(h, ai1p,   "out",   mi1p,  "in" );
547
+  }
544 548
 
545 549
   if( fragFl )
546 550
   {
@@ -553,6 +557,8 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
553 557
   else
554 558
   {
555 559
     cmDspSysConnectAudio(h, c1.cmp, "out",   ao1p,  "in" );   // cmp -> mix 0
560
+    //cmDspSysConnectAudio(h, wtp, "out", ao1p, "in" );
561
+
556 562
   }
557 563
 
558 564
   cmDspSysConnectAudio(h, c0.cmp, "out", afop, "in0" );    // comp -> audio_file_out

Loading…
Cancel
Save