-
Notifications
You must be signed in to change notification settings - Fork 0
/
MyMidi.h
48 lines (33 loc) · 1.42 KB
/
MyMidi.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#pragma once
#define DLLEXPORT __declspec(dllexport)
struct MidiMessage
{
unsigned char command;
unsigned char channel;
unsigned char data1;
unsigned char data2;
unsigned int input;
};
extern "C"
{
///////////////////////////////////////////////////////////////////////////////
DLLEXPORT int MyMidi_StartReceiving (int redirect);
DLLEXPORT void MyMidi_StopReceiving ();
DLLEXPORT int MyMidi_PopMessage (MidiMessage* message);
DLLEXPORT const char* MyMidi_GetInputName (unsigned int input);
DLLEXPORT int MyMidi_GetInputCount ();
///////////////////////////////////////////////////////////////////////////////
DLLEXPORT int MyMidi_LoadDLS (const char* filename, int sampleRate);
DLLEXPORT int MyMidi_UnloadDLS ();
DLLEXPORT const char* MyMidi_GetInstrumentName (unsigned int index);
DLLEXPORT unsigned int MyMidi_GetInstrumentCount ();
DLLEXPORT int MyMidi_LoadInstrument (unsigned int index, int patch);
DLLEXPORT int MyMidi_UnloadInstrument (unsigned int index);
DLLEXPORT int MyMidi_SendMessage (char command, char channel, char data0, char data1);
///////////////////////////////////////////////////////////////////////////////
DLLEXPORT int MyMidi_Init ();
DLLEXPORT const char* MyMidi_GetLastError ();
DLLEXPORT void MyMidi_SetLastError (const char* source, const char* description);
DLLEXPORT void MyMidi_ResetLastError ();
///////////////////////////////////////////////////////////////////////////////
}