-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmidasdos.pas
90 lines (73 loc) · 2.72 KB
/
midasdos.pas
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{$MODE DELPHI}
{$PACKRECORDS C}
unit midasdos;
interface
uses
libcemu, irqhack;
{$LINKLIB libmidas.a}
{*
NOTICE: All structures and function declarations here are copied from
midasdll.pas, but might be slightly modified to work with the DOS version,
as needed.
All licensing restrictions which applies with MIDAS/HMQAudio itself
applies to these.
*}
type
MIDASmodule = pointer;
MIDASmodulePlayHandle = DWORD;
MIDASsample = DWORD;
MIDASsamplePlayHandle = DWORD;
MIDASstreamHandle = pointer;
MIDASechoHandle = pointer;
type MIDASmoduleInfo =
record
songName : array[0..31] of char;
songLength : integer;
numPatterns : integer;
numInstruments : integer;
numChannels : integer;
end;
PMIDASmoduleInfo = ^MIDASmoduleInfo;
type MIDASinstrumentInfo =
record
instName : array[0..31] of char;
end;
PMIDASinstrumentInfo = ^MIDASinstrumentInfo;
type MIDASplayStatus =
record
position : dword;
pattern : dword;
row : dword;
syncInfo : integer;
songLoopCount : dword
end;
PMIDASplayStatus = ^MIDASplayStatus;
function MIDASstartup : boolean; cdecl; external;
function MIDASconfig : boolean; cdecl; external;
function MIDASinit : boolean; cdecl; external;
function MIDASsetOption(option : integer; value : dword) : boolean; cdecl; external;
function MIDASgetOption(option : integer) : dword; cdecl; external;
function MIDASclose : boolean; cdecl; external;
function MIDASloadModule(fileName : PChar) : MIDASmodule; cdecl; external;
function MIDASplayModule(module : MIDASmodule; loopSong : boolean) :
MIDASmodulePlayHandle; cdecl; external;
function MIDASplayModuleSection(module : MIDASmodule; startPos, endPos,
restartPos : dword; loopSong : boolean) : MIDASmodulePlayHandle; cdecl; external;
function MIDASstopModule(playHandle : MIDASmodulePlayHandle) : boolean;
cdecl; external;
function MIDASfreeModule(module : MIDASmodule) : boolean; cdecl; external;
function MIDASgetPlayStatus(playHandle : MIDASmodulePlayHandle;
status : PMIDASplayStatus) : boolean; cdecl; external;
function MIDASsetPosition(playHandle : MIDASmodulePlayHandle;
newPosition : integer) : boolean; cdecl; external;
function MIDASsetMusicVolume(playHandle : MIDASmodulePlayHandle;
volume : dword) : boolean; cdecl; external;
function MIDASgetModuleInfo(module : MIDASmodule; info : PMIDASmoduleInfo) :
boolean; cdecl; external;
function MIDASgetInstrumentInfo(module : MIDASmodule; instNum : integer;
info : PMIDASinstrumentInfo) : boolean; cdecl; external;
function MIDASfadeMusicChannel(playHandle : MIDASmodulePlayHandle; channel,
fade : dword) : boolean; cdecl; external;
implementation
begin
end.