Lines Matching refs:pMIDIStream
72 static EAS_RESULT ProcessMIDIMessage (S_EAS_DATA *pEASData, S_SYNTH *pSynth, S_MIDI_STREAM *pMIDIStream, EAS_INT parserMode);
73 static EAS_RESULT ProcessSysExMessage (S_EAS_DATA *pEASData, S_SYNTH *pSynth, S_MIDI_STREAM *pMIDIStream, EAS_U8 c, EAS_INT parserMode);
90 void EAS_InitMIDIStream (S_MIDI_STREAM *pMIDIStream)
92 pMIDIStream->byte3 = EAS_FALSE;
93 pMIDIStream->pending = EAS_FALSE;
94 pMIDIStream->runningStatus = 0;
95 pMIDIStream->status = 0;
115 EAS_RESULT EAS_ParseMIDIStream (S_EAS_DATA *pEASData, S_SYNTH *pSynth, S_MIDI_STREAM *pMIDIStream, EAS_U8 c, EAS_INT parserMode)
124 pMIDIStream->runningStatus = c;
125 pMIDIStream->byte3 = EAS_FALSE;
132 return ProcessSysExMessage(pEASData, pSynth, pMIDIStream, c, parserMode);
137 pMIDIStream->pending = EAS_TRUE;
145 if (pMIDIStream->byte3)
147 pMIDIStream->d2 = c;
148 pMIDIStream->byte3 = EAS_FALSE;
149 pMIDIStream->pending = EAS_FALSE;
152 return ProcessMIDIMessage(pEASData, pSynth, pMIDIStream, parserMode);
156 if (pMIDIStream->runningStatus)
160 pMIDIStream->status = pMIDIStream->runningStatus;
163 if (pMIDIStream->status < 0xc0)
165 pMIDIStream->d1 = c;
166 pMIDIStream->pending = EAS_TRUE;
167 pMIDIStream->byte3 = EAS_TRUE;
172 if (pMIDIStream->status < 0xe0)
174 pMIDIStream->d1 = c;
175 pMIDIStream->pending = EAS_FALSE;
178 return ProcessMIDIMessage(pEASData, pSynth, pMIDIStream, parserMode);
182 if (pMIDIStream->status < 0xf0)
184 pMIDIStream->d1 = c;
185 pMIDIStream->pending = EAS_TRUE;
186 pMIDIStream->byte3 = EAS_TRUE;
191 if (pMIDIStream->status == 0xF0)
195 return ProcessSysExMessage(pEASData, pSynth, pMIDIStream, c, parserMode);
199 pMIDIStream->runningStatus = 0;
202 if (pMIDIStream->status == 0xf2)
204 pMIDIStream->byte3 = EAS_TRUE;
211 pMIDIStream->pending = EAS_FALSE;
232 static EAS_RESULT ProcessMIDIMessage (S_EAS_DATA *pEASData, S_SYNTH *pSynth, S_MIDI_STREAM *pMIDIStream, EAS_INT parserMode)
236 channel = pMIDIStream->status & 0x0f;
237 switch (pMIDIStream->status & 0xf0)
241 pMIDIStream->status, pMIDIStream->d1, pMIDIStream->d2); */ }
243 VMStopNote(pEASData->pVoiceMgr, pSynth, channel, pMIDIStream->d1, pMIDIStream->d2);
247 if (pMIDIStream->d2)
250 pMIDIStream->status, pMIDIStream->d1, pMIDIStream->d2); */ }
251 pMIDIStream->flags |= MIDI_FLAG_FIRST_NOTE;
253 VMStartNote(pEASData->pVoiceMgr, pSynth, channel, pMIDIStream->d1, pMIDIStream->d2);
258 pMIDIStream->status, pMIDIStream->d1, pMIDIStream->d2); */ }
260 VMStopNote(pEASData->pVoiceMgr, pSynth, channel, pMIDIStream->d1, pMIDIStream->d2);
266 pMIDIStream->status, pMIDIStream->d1, pMIDIStream->d2); */ }
271 pMIDIStream->status, pMIDIStream->d1, pMIDIStream->d2); */ }
273 VMControlChange(pEASData->pVoiceMgr, pSynth, channel, pMIDIStream->d1, pMIDIStream->d2);
275 if (pMIDIStream->jetData & MIDI_FLAGS_JET_CB)
277 JET_Event(pEASData, pMIDIStream->jetData & (JET_EVENT_SEG_MASK | JET_EVENT_TRACK_MASK),
278 channel, pMIDIStream->d1, pMIDIStream->d2);
285 pMIDIStream->status, pMIDIStream->d1); */ }
287 VMProgramChange(pEASData->pVoiceMgr, pSynth, channel, pMIDIStream->d1);
292 pMIDIStream->status, pMIDIStream->d1); */ }
294 VMChannelPressure(pSynth, channel, pMIDIStream->d1);
299 pMIDIStream->status, pMIDIStream->d1, pMIDIStream->d2); */ }
301 VMPitchBend(pSynth, channel, pMIDIStream->d1, pMIDIStream->d2);
306 pMIDIStream->status, pMIDIStream->d1, pMIDIStream->d2); */ }
344 static EAS_RESULT ProcessSysExMessage (S_EAS_DATA *pEASData, S_SYNTH *pSynth, S_MIDI_STREAM *pMIDIStream, EAS_U8 c, EAS_INT parserMode)
350 pMIDIStream->sysExState = eSysEx;
356 if ((pMIDIStream->sysExState == eSysExSPMIDIchan) && (parserMode != eParserModeMetaData))
358 pMIDIStream->sysExState = eSysExIgnore;
364 switch (pMIDIStream->sysExState)
372 pMIDIStream->sysExState = eSysExUnivNonRealTime;
375 pMIDIStream->sysExState = eSysExUnivRealTime;
378 pMIDIStream->sysExState = eSysExMfgID1;
381 pMIDIStream->sysExState = eSysExIgnore;
389 pMIDIStream->sysExState = eSysExUnivNrtTargetID;
391 pMIDIStream->sysExState = eSysExIgnore;
396 pMIDIStream->sysExState = eSysExGMControl;
398 pMIDIStream->sysExState = eSysExIgnore;
407 pMIDIStream->flags |= MIDI_FLAG_GM_ON;
411 pMIDIStream->sysExState = eSysExEOX;
414 pMIDIStream->sysExState = eSysExIgnore;
420 pMIDIStream->sysExState = eSysExUnivRtTargetID;
422 pMIDIStream->sysExState = eSysExIgnore;
427 pMIDIStream->sysExState = eSysExDeviceControl;
429 pMIDIStream->sysExState = eSysExSPMIDI;
431 pMIDIStream->sysExState = eSysExIgnore;
437 pMIDIStream->sysExState = eSysExMasterVolume;
439 pMIDIStream->sysExState = eSysExIgnore;
444 pMIDIStream->d1 = c;
445 pMIDIStream->sysExState = eSysExMasterVolLSB;
451 EAS_I32 gain = ((EAS_I32) c << 8) | ((EAS_I32) pMIDIStream->d1 << 1);
455 pMIDIStream->sysExState = eSysExEOX;
465 pMIDIStream->d1 = 0;
466 pMIDIStream->sysExState = eSysExSPMIDIchan;
469 pMIDIStream->sysExState = eSysExIgnore;
475 pMIDIStream->d2 = c;
476 pMIDIStream->sysExState = eSysExSPMIDIMIP;
483 pMIDIStream->sysExState = eSysExIgnore;
490 VMSetMIPEntry(pEASData->pVoiceMgr, pSynth, pMIDIStream->d2, pMIDIStream->d1, c);
491 pMIDIStream->sysExState = eSysExSPMIDIchan;
494 if (++pMIDIStream->d1 == NUM_SYNTH_CHANNELS)
498 pMIDIStream->sysExState = eSysExEOX;
505 pMIDIStream->sysExState = eSysExMfgID1;
507 pMIDIStream->sysExState = eSysExIgnore;
512 pMIDIStream->sysExState = eSysExMfgID1;
514 pMIDIStream->sysExState = eSysExIgnore;
519 pMIDIStream->sysExState = eSysExEnhancer;
521 pMIDIStream->sysExState = eSysExIgnore;
526 pMIDIStream->sysExState = eSysExEnhancerSubID;
528 pMIDIStream->sysExState = eSysExIgnore;
532 pMIDIStream->sysExState = eSysExEnhancerFeedback1;
536 pMIDIStream->sysExState = eSysExEnhancerFeedback2;
540 pMIDIStream->sysExState = eSysExEnhancerDrive;
544 pMIDIStream->sysExState = eSysExEnhancerWet;
548 pMIDIStream->sysExState = eSysExEOX;
553 pMIDIStream->sysExState = eSysExIgnore;
560 pMIDIStream->sysExState = eSysExIgnore;
565 if (pMIDIStream->sysExState == eSysExIgnore)