Browse Source

cmDspPgm.c : Added gain control to 'sine' test pgm.

master
kevin 9 years ago
parent
commit
cead889078
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      dsp/cmDspPgm.c

+ 4
- 0
dsp/cmDspPgm.c View File

334
   cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut",  NULL,   1, useBuiltInFl ? 1 : 3 );
334
   cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut",  NULL,   1, useBuiltInFl ? 1 : 3 );
335
   cmDspInst_t* om0p = cmDspSysAllocInst(h,"AMeter","Out", 0);
335
   cmDspInst_t* om0p = cmDspSysAllocInst(h,"AMeter","Out", 0);
336
   
336
   
337
+  cmDspInst_t* gain= cmDspSysAllocInst( h,"Scalar", "Gain",     5, kNumberDuiId, 0.0,  10.0,  0.01,  0.0);
337
 
338
 
338
   cmDspSysConnectAudio(h, php, "out", wtp,  "phs" );  // phasor -> wave table
339
   cmDspSysConnectAudio(h, php, "out", wtp,  "phs" );  // phasor -> wave table
339
   cmDspSysConnectAudio(h, wtp, "out", ao0p, "in" );   // wave table -> audio out
340
   cmDspSysConnectAudio(h, wtp, "out", ao0p, "in" );   // wave table -> audio out
341
   cmDspSysConnectAudio(h, wtp, "out", om0p, "in" );
342
   cmDspSysConnectAudio(h, wtp, "out", om0p, "in" );
342
 
343
 
343
   cmDspSysInstallCb( h, chp, "val", ao0p, "ch", NULL);
344
   cmDspSysInstallCb( h, chp, "val", ao0p, "ch", NULL);
345
+  cmDspSysInstallCb( h, gain, "val", ao0p, "gain", NULL);
346
+  cmDspSysInstallCb( h, gain, "val", ao1p, "gain", NULL);
347
+  
344
   return kOkDspRC;
348
   return kOkDspRC;
345
 }
349
 }
346
 
350
 

Loading…
Cancel
Save