Selaa lähdekoodia

dsp/cmDspKr.c : Changed the way the MIDI channel is handled in _cmDspNanoMapRecv().

master
Kevin Larke 10 vuotta sitten
vanhempi
commit
c9cba4c7bf
1 muutettua tiedostoa jossa 5 lisäystä ja 4 poistoa
  1. 5
    4
      dsp/cmDspKr.c

+ 5
- 4
dsp/cmDspKr.c Näytä tiedosto

@@ -72,7 +72,7 @@ cmDspClass_t _cmKrDC;
72 72
 
73 73
 //==========================================================================================================================================
74 74
 
75
-  cmDspInst_t*  _cmDspKrAlloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned storeSymId, unsigned instSymId, unsigned id, unsigned va_cnt, va_list vl )
75
+cmDspInst_t*  _cmDspKrAlloc(cmDspCtx_t* ctx, cmDspClass_t* classPtr, unsigned storeSymId, unsigned instSymId, unsigned id, unsigned va_cnt, va_list vl )
76 76
 {
77 77
   cmDspVarArg_t args[] =
78 78
   {
@@ -2443,10 +2443,11 @@ cmDspRC_t _cmDspNanoMapRecv(cmDspCtx_t* ctx, cmDspInst_t* inst, const cmDspEvt_t
2443 2443
     case kStatusNmId:
2444 2444
       {
2445 2445
         unsigned status = cmDsvGetUInt(evt->valuePtr);        
2446
-        if( (status & 0xf0) == kNoteOnMdId )
2446
+        unsigned stat_no_ch = status & 0xf0;
2447
+        if( stat_no_ch == kNoteOnMdId || stat_no_ch == kNoteOffMdId || stat_no_ch == kCtlMdId  )
2447 2448
         {
2448
-          unsigned d0 = cmDspUInt(inst,kD0NmId);
2449
-          unsigned ch = d0 % 8;
2449
+          //unsigned d0 = cmDspUInt(inst,kD0NmId);
2450
+          unsigned ch = 0; //d0 % 8;
2450 2451
           status = (status & 0xf0) + ch;
2451 2452
           cmDspSetUInt(ctx,inst,kStatusNmId,status);
2452 2453
         }

Loading…
Peruuta
Tallenna