Ticket #5664: PortDrivers.diff
File PortDrivers.diff, 3.0 KB (added by , 14 years ago) |
---|
-
src/servers/midi/PortDrivers.cpp
old new 97 97 perror("Error reading data from driver"); 98 98 break; 99 99 } 100 101 bigtime_t timestamp = system_time(); 100 102 101 103 if (haveSysEx) { 102 104 // System Exclusive mode … … 110 112 continue; 111 113 } else if ((next & 0xF8) == 0xF8) { 112 114 // System Realtime interleaved in System Exclusive sequence 113 SpraySystemRealTime(next );115 SpraySystemRealTime(next, timestamp); 114 116 continue; 115 117 } else { 116 118 // Whatever byte, this one ends the running SysEx sequence 117 SpraySystemExclusive(sysexBuf, sysexSize );119 SpraySystemExclusive(sysexBuf, sysexSize, timestamp); 118 120 haveSysEx = false; 119 121 if (next == B_SYS_EX_END) { 120 122 // swallow SysEx end byte … … 127 129 128 130 if ((next & 0xF8) == 0xF8) { 129 131 // System Realtime 130 SpraySystemRealTime(next );132 SpraySystemRealTime(next, timestamp); 131 133 } else if ((next & 0xF0) == 0xF0) { 132 134 // System Common 133 135 runningStatus = 0; … … 156 158 case B_SYS_EX_END: 157 159 // Unpaired with B_SYS_EX_START, but pass it anyway... 158 160 case B_TUNE_REQUEST: 159 SpraySystemCommon(next, 0, 0 );161 SpraySystemCommon(next, 0, 0, timestamp); 160 162 break; 161 163 } 162 164 } else if ((next & 0x80) == 0x80) { … … 186 188 if (--needed == 0) { 187 189 switch (msgBuf[0] & 0xF0) { 188 190 case B_NOTE_OFF: 189 SprayNoteOff(msgBuf[0] & 0x0F, msgBuf[1], msgBuf[2] );191 SprayNoteOff(msgBuf[0] & 0x0F, msgBuf[1], msgBuf[2], timestamp); 190 192 break; 191 193 192 194 case B_NOTE_ON: 193 SprayNoteOn(msgBuf[0] & 0x0F, msgBuf[1], msgBuf[2] );195 SprayNoteOn(msgBuf[0] & 0x0F, msgBuf[1], msgBuf[2], timestamp); 194 196 break; 195 197 196 198 case B_KEY_PRESSURE: 197 SprayKeyPressure(msgBuf[0] & 0x0F, msgBuf[1], msgBuf[2] );199 SprayKeyPressure(msgBuf[0] & 0x0F, msgBuf[1], msgBuf[2], timestamp); 198 200 break; 199 201 200 202 case B_CONTROL_CHANGE: 201 SprayControlChange(msgBuf[0] & 0x0F, msgBuf[1], msgBuf[2] );203 SprayControlChange(msgBuf[0] & 0x0F, msgBuf[1], msgBuf[2], timestamp); 202 204 break; 203 205 204 206 case B_PROGRAM_CHANGE: 205 SprayProgramChange(msgBuf[0] & 0x0F, msgBuf[1] );207 SprayProgramChange(msgBuf[0] & 0x0F, msgBuf[1], timestamp); 206 208 break; 207 209 208 210 case B_CHANNEL_PRESSURE: 209 SprayChannelPressure(msgBuf[0] & 0x0F, msgBuf[1] );211 SprayChannelPressure(msgBuf[0] & 0x0F, msgBuf[1], timestamp); 210 212 break; 211 213 212 214 case B_PITCH_BEND: 213 SprayPitchBend(msgBuf[0] & 0x0F, msgBuf[1], msgBuf[2] );215 SprayPitchBend(msgBuf[0] & 0x0F, msgBuf[1], msgBuf[2], timestamp); 214 216 break; 215 217 } 216 218 217 219 switch (msgBuf[0]) { 218 220 case B_SONG_POSITION: 219 SpraySystemCommon(msgBuf[0], msgBuf[1], msgBuf[2] );221 SpraySystemCommon(msgBuf[0], msgBuf[1], msgBuf[2], timestamp); 220 222 break; 221 223 222 224 case B_MIDI_TIME_CODE: 223 225 case B_SONG_SELECT: 224 226 case B_CABLE_MESSAGE: 225 SpraySystemCommon(msgBuf[0], msgBuf[1], 0 );227 SpraySystemCommon(msgBuf[0], msgBuf[1], 0, timestamp); 226 228 break; 227 229 } 228 230 }