瀏覽代碼

Merging OS-X updates into last Linux updates.

master
kevin 11 年之前
父節點
當前提交
ef277baa5c
共有 2 個檔案被更改,包括 36 行新增22 行删除
  1. 4
    4
      dsp/cmDspClass.c
  2. 32
    18
      dsp/cmDspPgmKr.c

+ 4
- 4
dsp/cmDspClass.c 查看文件

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

+ 32
- 18
dsp/cmDspPgmKr.c 查看文件

@@ -93,8 +93,8 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
93 93
   if( krLoadRsrc(h,&err,&r) != kOkDspRC )
94 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 99
   cmDspInst_t* tlp  = cmDspSysAllocInst(h,"TimeLine",    "tl",  2, r.tlFn, r.audPath );
100 100
   cmDspInst_t* scp  = cmDspSysAllocInst(h,"Score",       "sc",  1, r.scFn );
@@ -421,14 +421,15 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
421 421
 
422 422
 
423 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 433
   cmDspInst_t* cmp0_mtr   = cmDspSysAllocInst(h,"Meter","Env0", 3, 0.0, 0.0, 1.0);
433 434
 
434 435
   cmDspSysInstallCb(h, cmp0_byp,  "out", cmp0, "bypass", NULL );
@@ -442,14 +443,14 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
442 443
   cmDspSysInstallCb(h, cmp0,      "env", cmp0_mtr, "in", NULL );
443 444
 
444 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 454
   cmDspInst_t* cmp1_mtr   = cmDspSysAllocInst(h,"Meter","Env1", 3, 0.0, 0.0, 1.0);
454 455
 
455 456
   cmDspSysInstallCb(h, cmp1_byp,  "out", cmp1, "bypass", NULL );
@@ -462,6 +463,19 @@ cmDspRC_t _cmDspSysPgm_TimeLine(cmDspSysH_t h, void** userPtrPtr )
462 463
   cmDspSysInstallCb(h, cmp1_wnd,  "val", cmp1, "wnd", NULL );
463 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 480
   return rc;
467 481
 }

Loading…
取消
儲存