From cead889078d05f7050ce5432a970b4cca1a4a6ca Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 26 Jun 2015 18:55:27 -0400 Subject: [PATCH] cmDspPgm.c : Added gain control to 'sine' test pgm. --- dsp/cmDspPgm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dsp/cmDspPgm.c b/dsp/cmDspPgm.c index 39a3a20..0a67855 100644 --- a/dsp/cmDspPgm.c +++ b/dsp/cmDspPgm.c @@ -334,6 +334,7 @@ cmDspRC_t _cmDspSysPgm_PlaySine( cmDspSysH_t h, void** userPtrPtr ) cmDspInst_t* ao1p = cmDspSysAllocInst(h,"AudioOut", NULL, 1, useBuiltInFl ? 1 : 3 ); cmDspInst_t* om0p = cmDspSysAllocInst(h,"AMeter","Out", 0); + cmDspInst_t* gain= cmDspSysAllocInst( h,"Scalar", "Gain", 5, kNumberDuiId, 0.0, 10.0, 0.01, 0.0); cmDspSysConnectAudio(h, php, "out", wtp, "phs" ); // phasor -> wave table cmDspSysConnectAudio(h, wtp, "out", ao0p, "in" ); // wave table -> audio out @@ -341,6 +342,9 @@ cmDspRC_t _cmDspSysPgm_PlaySine( cmDspSysH_t h, void** userPtrPtr ) cmDspSysConnectAudio(h, wtp, "out", om0p, "in" ); cmDspSysInstallCb( h, chp, "val", ao0p, "ch", NULL); + cmDspSysInstallCb( h, gain, "val", ao0p, "gain", NULL); + cmDspSysInstallCb( h, gain, "val", ao1p, "gain", NULL); + return kOkDspRC; }