Przeglądaj źródła

Merging OS-X updates into last Linux updates.

master
kevin 11 lat temu
rodzic
commit
ef277baa5c
2 zmienionych plików z 36 dodań i 22 usunięć
  1. 4
    4
      dsp/cmDspClass.c
  2. 32
    18
      dsp/cmDspPgmKr.c

+ 4
- 4
dsp/cmDspClass.c Wyświetl plik

250
   return p;
250
   return p;
251
 }
251
 }
252
 
252
 
253
-#ifdef OS_X
253
+#ifdef OS_OSX
254
 va_list  _cmDspParseArgV( cmDspVarArg_t* a, va_list vl )
254
 va_list  _cmDspParseArgV( cmDspVarArg_t* a, va_list vl )
255
 #else
255
 #else
256
 void  _cmDspParseArgV( cmDspVarArg_t* a, va_list vl )
256
 void  _cmDspParseArgV( cmDspVarArg_t* a, va_list vl )
262
   a->cn      = va_arg(vl,unsigned);
262
   a->cn      = va_arg(vl,unsigned);
263
   a->flags   = va_arg(vl,unsigned);
263
   a->flags   = va_arg(vl,unsigned);
264
   a->doc     = va_arg(vl,const char*);  
264
   a->doc     = va_arg(vl,const char*);  
265
-#ifdef OS_X
265
+#ifdef OS_OSX
266
   return vl;
266
   return vl;
267
 #endif
267
 #endif
268
 }
268
 }
285
     
285
     
286
     argCnt += repeatCnt;
286
     argCnt += repeatCnt;
287
 
287
 
288
-#ifdef OS_X
288
+#ifdef OS_OSX
289
     vl1 = 
289
     vl1 = 
290
 #endif
290
 #endif
291
       _cmDspParseArgV(&a,vl1);
291
       _cmDspParseArgV(&a,vl1);
297
   {
297
   {
298
     cmDspVarArg_t a;
298
     cmDspVarArg_t a;
299
     
299
     
300
-#ifdef OS_X
300
+#ifdef OS_OSX
301
     vl2 = 
301
     vl2 = 
302
 #endif
302
 #endif
303
       _cmDspParseArgV(&a,vl2);
303
       _cmDspParseArgV(&a,vl2);

+ 32
- 18
dsp/cmDspPgmKr.c Wyświetl plik

93
   if( krLoadRsrc(h,&err,&r) != kOkDspRC )
93
   if( krLoadRsrc(h,&err,&r) != kOkDspRC )
94
     return rc;
94
     return rc;
95
 
95
 
96
-  unsigned   preGrpSymId  = cmDspSysPresetRegisterGroup(h,"TimeLine");
97
-
96
+  unsigned   preGrpSymId     = cmDspSysPresetRegisterGroup(h,"TimeLine");
97
+  unsigned   compPreGrpSymId = cmDspSysPresetRegisterGroup(h,"Compressor"); 
98
 
98
 
99
   cmDspInst_t* tlp  = cmDspSysAllocInst(h,"TimeLine",    "tl",  2, r.tlFn, r.audPath );
99
   cmDspInst_t* tlp  = cmDspSysAllocInst(h,"TimeLine",    "tl",  2, r.tlFn, r.audPath );
100
   cmDspInst_t* scp  = cmDspSysAllocInst(h,"Score",       "sc",  1, r.scFn );
100
   cmDspInst_t* scp  = cmDspSysAllocInst(h,"Score",       "sc",  1, r.scFn );
421
 
421
 
422
 
422
 
423
   cmDspSysNewPage(h,"Compressor");
423
   cmDspSysNewPage(h,"Compressor");
424
-  cmDspInst_t* cmp0_byp   = cmDspSysAllocCheck(  h, "Bypass0", 1.0 );
425
-  cmDspInst_t* cmp0_igain = cmDspSysAllocScalar( h, "In Gain0",  0.0,   10.0, 0.1, cmpInGain);
426
-  cmDspInst_t* cmp0_thr   = cmDspSysAllocScalar( h, "ThreshDb0", -100.0, 0.0, 0.1, cmpThreshDb);
427
-  cmDspInst_t* cmp0_rat   = cmDspSysAllocScalar( h, "Ratio0",    0.1, 100, 0.1, cmpRatio_num);
428
-  cmDspInst_t* cmp0_atk   = cmDspSysAllocScalar( h, "Atk Ms0",   0.0, 1000.0, 0.1, cmpAtkMs);
429
-  cmDspInst_t* cmp0_rls   = cmDspSysAllocScalar( h, "Rls Ms0",   0.0, 1000.0, 0.1, cmpRlsMs);
430
-  cmDspInst_t* cmp0_mkup  = cmDspSysAllocScalar( h, "Makeup0",   0.0, 10.0,   0.01, cmpMakeup);
431
-  cmDspInst_t* cmp0_wnd   = cmDspSysAllocScalar( h, "Wnd Ms0",   1.0, cmpWndMaxMs, 1.0, cmpWndMs );
424
+
425
+  cmDspInst_t* cmp0_byp   = cmDspSysAllocCheckP(  h,  compPreGrpSymId, NULL, "Bypass0", 1.0 );
426
+  cmDspInst_t* cmp0_igain = cmDspSysAllocScalarP( h,  compPreGrpSymId, NULL, "In Gain0", 0.0,   10.0, 0.1, cmpInGain );
427
+  cmDspInst_t* cmp0_thr   = cmDspSysAllocScalarP( h,  compPreGrpSymId, NULL, "ThreshDb0", -100.0, 0.0, 0.1, cmpThreshDb);
428
+  cmDspInst_t* cmp0_rat   = cmDspSysAllocScalarP( h,  compPreGrpSymId, NULL, "Ratio0",    0.1, 100, 0.1, cmpRatio_num);
429
+  cmDspInst_t* cmp0_atk   = cmDspSysAllocScalarP( h,  compPreGrpSymId, NULL, "Atk Ms0",   0.0, 1000.0, 0.1, cmpAtkMs);
430
+  cmDspInst_t* cmp0_rls   = cmDspSysAllocScalarP( h,  compPreGrpSymId, NULL, "Rls Ms0",   0.0, 1000.0, 0.1, cmpRlsMs);
431
+  cmDspInst_t* cmp0_mkup  = cmDspSysAllocScalarP( h,  compPreGrpSymId, NULL, "Makeup0",   0.0, 10.0,   0.01, cmpMakeup);
432
+  cmDspInst_t* cmp0_wnd   = cmDspSysAllocScalarP( h,  compPreGrpSymId, NULL, "Wnd Ms0",   1.0, cmpWndMaxMs, 1.0, cmpWndMs );
432
   cmDspInst_t* cmp0_mtr   = cmDspSysAllocInst(h,"Meter","Env0", 3, 0.0, 0.0, 1.0);
433
   cmDspInst_t* cmp0_mtr   = cmDspSysAllocInst(h,"Meter","Env0", 3, 0.0, 0.0, 1.0);
433
 
434
 
434
   cmDspSysInstallCb(h, cmp0_byp,  "out", cmp0, "bypass", NULL );
435
   cmDspSysInstallCb(h, cmp0_byp,  "out", cmp0, "bypass", NULL );
442
   cmDspSysInstallCb(h, cmp0,      "env", cmp0_mtr, "in", NULL );
443
   cmDspSysInstallCb(h, cmp0,      "env", cmp0_mtr, "in", NULL );
443
 
444
 
444
   cmDspSysNewColumn(h,0);
445
   cmDspSysNewColumn(h,0);
445
-  cmDspInst_t* cmp1_byp   = cmDspSysAllocCheck(  h, "Bypass1", 1.0 );
446
-  cmDspInst_t* cmp1_igain = cmDspSysAllocScalar( h, "In Gain1",  0.0,   10.0, 0.1, cmpInGain);
447
-  cmDspInst_t* cmp1_thr   = cmDspSysAllocScalar( h, "ThreshDb1", -100.0, 0.0, 0.1, cmpThreshDb);
448
-  cmDspInst_t* cmp1_rat   = cmDspSysAllocScalar( h, "Ratio1",    0.1, 100, 0.1, cmpRatio_num);
449
-  cmDspInst_t* cmp1_atk   = cmDspSysAllocScalar( h, "Atk Ms1",   0.0, 1000.0, 0.1, cmpAtkMs);
450
-  cmDspInst_t* cmp1_rls   = cmDspSysAllocScalar( h, "Rls Ms1",   0.0, 1000.0, 0.1, cmpRlsMs);
451
-  cmDspInst_t* cmp1_mkup  = cmDspSysAllocScalar( h, "Makeup1",   0.0, 10.0,   0.01, cmpMakeup);
452
-  cmDspInst_t* cmp1_wnd   = cmDspSysAllocScalar( h, "Wnd Ms1",   1.0, cmpWndMaxMs, 1.0, cmpWndMs );
446
+  cmDspInst_t* cmp1_byp   = cmDspSysAllocCheckP(  h, compPreGrpSymId, NULL, "Bypass1", 1.0 );
447
+  cmDspInst_t* cmp1_igain = cmDspSysAllocScalarP( h, compPreGrpSymId, NULL, "In Gain1",  0.0,   10.0, 0.1, cmpInGain);
448
+  cmDspInst_t* cmp1_thr   = cmDspSysAllocScalarP( h, compPreGrpSymId, NULL, "ThreshDb1", -100.0, 0.0, 0.1, cmpThreshDb);
449
+  cmDspInst_t* cmp1_rat   = cmDspSysAllocScalarP( h, compPreGrpSymId, NULL, "Ratio1",    0.1, 100, 0.1, cmpRatio_num);
450
+  cmDspInst_t* cmp1_atk   = cmDspSysAllocScalarP( h, compPreGrpSymId, NULL, "Atk Ms1",   0.0, 1000.0, 0.1, cmpAtkMs);
451
+  cmDspInst_t* cmp1_rls   = cmDspSysAllocScalarP( h, compPreGrpSymId, NULL, "Rls Ms1",   0.0, 1000.0, 0.1, cmpRlsMs);
452
+  cmDspInst_t* cmp1_mkup  = cmDspSysAllocScalarP( h, compPreGrpSymId, NULL, "Makeup1",   0.0, 10.0,   0.01, cmpMakeup);
453
+  cmDspInst_t* cmp1_wnd   = cmDspSysAllocScalarP( h, compPreGrpSymId, NULL, "Wnd Ms1",   1.0, cmpWndMaxMs, 1.0, cmpWndMs );
453
   cmDspInst_t* cmp1_mtr   = cmDspSysAllocInst(h,"Meter","Env1", 3, 0.0, 0.0, 1.0);
454
   cmDspInst_t* cmp1_mtr   = cmDspSysAllocInst(h,"Meter","Env1", 3, 0.0, 0.0, 1.0);
454
 
455
 
455
   cmDspSysInstallCb(h, cmp1_byp,  "out", cmp1, "bypass", NULL );
456
   cmDspSysInstallCb(h, cmp1_byp,  "out", cmp1, "bypass", NULL );
462
   cmDspSysInstallCb(h, cmp1_wnd,  "val", cmp1, "wnd", NULL );
463
   cmDspSysInstallCb(h, cmp1_wnd,  "val", cmp1, "wnd", NULL );
463
   cmDspSysInstallCb(h, cmp1,      "env", cmp1_mtr, "in", NULL );
464
   cmDspSysInstallCb(h, cmp1,      "env", cmp1_mtr, "in", NULL );
464
 
465
 
466
+  //--------------- Compressor Preset controls
467
+  cmDspSysNewColumn(h,0);
468
+  cmDspInst_t* comp_preset    = cmDspSysAllocInst(   h, "Preset", NULL, 1, compPreGrpSymId );
469
+  cmDspInst_t* comp_presetLbl = cmDspSysAllocInst(   h, "Text",   "Comp_Preset",      1, "" );
470
+  cmDspInst_t* comp_storeBtn  = cmDspSysAllocButton( h, "comp_store",  0);
471
+  cmDspInst_t* comp_recallBtn = cmDspSysAllocButton( h, "comp_recall", 0);
472
+  cmDspInst_t* comp_pts       = cmDspSysAllocInst(   h, "PortToSym", NULL, 2, "store", "recall");
473
+
474
+  cmDspSysInstallCb(   h, comp_presetLbl, "val",    comp_preset, "label",NULL);
475
+  cmDspSysInstallCb(   h, comp_storeBtn,  "out",    comp_pts,    "store", NULL );
476
+  cmDspSysInstallCb(   h, comp_recallBtn, "out",    comp_pts,    "recall", NULL );
477
+  cmDspSysInstallCb(   h, comp_pts,       "store",  comp_preset, "cmd", NULL );
478
+  cmDspSysInstallCb(   h, comp_pts,       "recall", comp_preset, "cmd", NULL );
465
 
479
 
466
   return rc;
480
   return rc;
467
 }
481
 }

Ładowanie…
Anuluj
Zapisz