Bläddra i källkod

cmDspPgm.c : Changed cmDspSysPgm_AvailCh() to test AvailCh.

master
kevin 9 år sedan
förälder
incheckning
cd6fa21deb
1 ändrade filer med 14 tillägg och 7 borttagningar
  1. 14
    7
      dsp/cmDspPgm.c

+ 14
- 7
dsp/cmDspPgm.c Visa fil

@@ -369,7 +369,7 @@ cmDspRC_t _cmDspSysPgm_Stereo_Fx( cmDspSysH_t h, void** userPtrPtr )
369 369
 
370 370
 cmDspRC_t _cmDspSysPgm_PlaySine( cmDspSysH_t h, void** userPtrPtr )
371 371
 {
372
-  bool useBuiltInFl = false;
372
+  bool useBuiltInFl = true;
373 373
   double frqHz = 440.0;
374 374
 
375 375
   cmDspInst_t* chp = cmDspSysAllocInst( h,"Scalar", "Channel",  5, kNumberDuiId, 0.0,  100.0, 1.0,  0.0);
@@ -2690,9 +2690,11 @@ cmDspRC_t _cmDspSysPgm_AvailCh( cmDspSysH_t h, void** userPtrPtr )
2690 2690
   double   xfadeMs     = 250.0;
2691 2691
   bool     xfadeInitFl = false;
2692 2692
 
2693
-  const char*  fn    = "/home/kevin/media/audio/20110723-Kriesberg/Audio Files/Piano 3_01.wav";
2693
+  const char*  fn    = "/Users/kevin/media/audio/20110723-Kriesberg/Audio Files/Piano 3_01.wav";
2694 2694
   
2695 2695
   cmDspInst_t* chk0   = cmDspSysAllocInst(h,"Button", "0",  2, kButtonDuiId, 0.0 );
2696
+  cmDspInst_t* hz     = cmDspSysAllocScalar( h, "hz",0.0, 10000.0, 0.01, 1.0 );
2697
+    
2696 2698
   //cmDspInst_t* chk1   = cmDspSysAllocInst(h,"Button", "1",  2, kCheckDuiId, 0.0 );
2697 2699
 
2698 2700
   cmDspInst_t* achp  = cmDspSysAllocInst( h, "AvailCh", NULL, 1, xfadeChCnt );
@@ -2703,7 +2705,7 @@ cmDspRC_t _cmDspSysPgm_AvailCh( cmDspSysH_t h, void** userPtrPtr )
2703 2705
   cmDspInst_t* fwtp  =  cmDspSysAllocInst( h, "WaveTable", NULL,   5, ((int)cmDspSysSampleRate(h)), 1, fn, -1, 7000000 );
2704 2706
   cmDspInst_t* fad0  =  cmDspSysAllocInst( h, "Xfader",    NULL,   3, xfadeChCnt,  xfadeMs, xfadeInitFl ); 
2705 2707
 
2706
-  //cmDspInst_t*  prp  = cmDspSysAllocInst(  h, "Printer",  NULL, 1, ">" );
2708
+  cmDspInst_t*  prp  = cmDspSysAllocInst(  h, "Printer",  NULL, 1, ">" );
2707 2709
 
2708 2710
   cmDspInst_t* ao0p = cmDspSysAllocInst(h,"AudioOut",  NULL,   1, 0 );
2709 2711
   cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut",  NULL,   1, 1 );
@@ -2722,12 +2724,17 @@ cmDspRC_t _cmDspSysPgm_AvailCh( cmDspSysH_t h, void** userPtrPtr )
2722 2724
   //cmDspSysInstallCb(h, chk0, "out", fad0, "gate-0", NULL);
2723 2725
   //cmDspSysInstallCb(h, chk1, "out", fad0, "gate-1", NULL);
2724 2726
 
2725
-  cmDspSysInstallCb(h, chk0, "sym",     achp, "trig",   NULL);
2726
-  cmDspSysInstallCb(h, achp, "gate-0",  fad0, "gate-0", NULL );
2727
-  cmDspSysInstallCb(h, fad0, "state-0", achp, "dis-0",   NULL );
2727
+  cmDspSysInstallCb(h, chk0, "sym",     achp, "trig",   NULL); // btn->availCh.trig
2728
+  cmDspSysInstallCb(h, achp, "ch",      prp,  "in",     NULL); // availCh.ch -> printer
2729
+
2730
+  
2731
+  cmDspSysInstallCb(h, achp, "gate-0",  fad0, "gate-0", NULL );   // availCh.gate->xfad.gate   
2732
+  cmDspSysInstallCb(h, fad0, "state-0", achp, "dis-0",  NULL );  // xfad->state ->availCh.dis
2728 2733
 
2729 2734
   cmDspSysInstallCb(h, achp, "gate-1",  fad0, "gate-1", NULL );
2730
-  cmDspSysInstallCb(h, fad0, "state-1", achp, "dis-1",   NULL );
2735
+  cmDspSysInstallCb(h, fad0, "state-1", achp, "dis-1",  NULL );
2736
+  
2737
+  cmDspSysInstallCb(h, hz,   "val",     sphp, "mult",   NULL );
2731 2738
 
2732 2739
 
2733 2740
   return kOkDspRC;

Laddar…
Avbryt
Spara