-
Notifications
You must be signed in to change notification settings - Fork 3
/
modplay.pas
68 lines (51 loc) · 1.38 KB
/
modplay.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
unit modplay;
{$L c_utils.o}
interface
procedure setmodvolumeto(vol:integer);cdecl ; external;
procedure haltmod;cdecl ; external;
procedure initializemod;
procedure stopmod; // stop music + unload
procedure ampsetpanning(n:smallint;pantype:smallint);
procedure playmod(looping: boolean;s: string); // load & play mod
procedure soundeffect(s: string; rate: integer);
procedure pausemod;cdecl ; external;
procedure continuemod;cdecl ; external;
procedure setmodvolume;
function playing: boolean;cdecl ; external;
implementation
uses strings;
procedure sdl_mixer_init;cdecl ; external;
procedure musicDone;cdecl ; external;
procedure play_mod(loop:byte;filename:pchar);cdecl ; external;
procedure play_sound(filename:pchar; rate:integer);cdecl ; external;
procedure playmod(looping: boolean;s: string); // load & play mod
Var p : Pchar;
begin
p:=StrAlloc (length(s)+1);
StrPCopy (P,s);
play_mod(byte(looping),P);
StrDispose(P);
end;
procedure initializemod; //SDL mod
begin
sdl_mixer_init;
end;
procedure stopmod; // stop music + unload
begin
musicDone;
end;
procedure ampsetpanning(n:smallint;pantype:smallint);
begin
end;
procedure soundeffect(s: string; rate: integer);
Var p : Pchar;
begin
p:=StrAlloc (length(s)+1);
StrPCopy (P,s);
play_sound(P,rate);
StrDispose(P);
end;
procedure setmodvolume;
begin
end;
end.