|
|
| version 1.9, 2006/12/10 11:17:47 | version 1.12, 2011/03/07 09:54:11 |
|---|---|
| Line 1 | Line 1 |
| #include "compiler.h" | /** |
| #include "np2.h" | * @file cmmidi.cpp |
| #include "mimpidef.h" | * @brief Communication port manager (MIDI) |
| #include "commng.h" | * |
| * @author $Author$ | |
| * @date $Date$ | |
| */ | |
| #include "compiler.h" | |
| #include "np2.h" | |
| #include "mimpidef.h" | |
| #include "commng.h" | |
| #if defined(VERMOUTH_LIB) || defined(MT32SOUND_DLL) | #if defined(VERMOUTH_LIB) || defined(MT32SOUND_DLL) |
| #include "sound.h" | #include "sound.h" |
| #endif | #endif |
| #if defined(VERMOUTH_LIB) | #if defined(VERMOUTH_LIB) |
| #include "vermouth.h" | #include "vermouth.h" |
| #endif | #endif |
| #if defined(MT32SOUND_DLL) | #if defined(MT32SOUND_DLL) |
| #include "mt32snd.h" | #include "mt32snd.h" |
| #endif | #endif |
| #include "keydisp.h" | #include "keydisp.h" |
| #if !defined(__GNUC__) | |
| #pragma comment(lib, "winmm.lib") | |
| #endif // !defined(__GNUC__) | |
| #if defined(VERMOUTH_LIB) | #if defined(VERMOUTH_LIB) |
| extern MIDIMOD vermouth_module; | extern MIDIMOD vermouth_module; |
| Line 59 enum { | Line 70 enum { |
| MIDI_TIMECODE = 0xf1, | MIDI_TIMECODE = 0xf1, |
| MIDI_SONGPOS = 0xf2, | MIDI_SONGPOS = 0xf2, |
| MIDI_SONGSELECT = 0xf3, | MIDI_SONGSELECT = 0xf3, |
| MIDI_CABLESELECT = 0xf5, | |
| MIDI_TUNEREQUEST = 0xf6, | MIDI_TUNEREQUEST = 0xf6, |
| MIDI_EOX = 0xf7, | MIDI_EOX = 0xf7, |
| MIDI_TIMING = 0xf8, | MIDI_TIMING = 0xf8, |
| Line 485 static UINT midiwrite(COMMNG self, UINT8 | Line 497 static UINT midiwrite(COMMNG self, UINT8 |
| midi->midisyscnt = 2; | midi->midisyscnt = 2; |
| break; | break; |
| case MIDI_TUNEREQUEST: | case MIDI_CABLESELECT: |
| midi->midictrl = MIDICTRL_SYSTEM; | midi->midictrl = MIDICTRL_SYSTEM; |
| midi->midisyscnt = 1; | midi->midisyscnt = 1; |
| break; | break; |
| // case MIDI_TUNEREQUEST: | |
| // case MIDI_EOX: | // case MIDI_EOX: |
| default: | default: |
| return(1); | return(1); |
| Line 770 COMMNG cmmidi_create(const OEMCHAR *midi | Line 783 COMMNG cmmidi_create(const OEMCHAR *midi |
| } | } |
| } | } |
| if (getmidiinid(midiin, &id) == SUCCESS) { | if (getmidiinid(midiin, &id) == SUCCESS) { |
| if (midiInOpen(&hmidiin, id, (DWORD)hWndMain, 0, CALLBACK_WINDOW) | if (midiInOpen(&hmidiin, id, (DWORD)g_hWndMain, 0, CALLBACK_WINDOW) |
| == MMSYSERR_NOERROR) { | == MMSYSERR_NOERROR) { |
| midiInReset(hmidiin); | midiInReset(hmidiin); |
| opened |= CMMIDI_MIDIIN; | opened |= CMMIDI_MIDIIN; |