-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathU_SOUND.PAS
More file actions
67 lines (49 loc) · 903 Bytes
/
Copy pathU_SOUND.PAS
File metadata and controls
67 lines (49 loc) · 903 Bytes
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
unit u_sound;
interface
{uses voctool,cmftool,u_graph;}
uses u_smix;
var
disable_music:boolean;
disable_sound:boolean;
procedure setvolume(volume:byte);
procedure shutdownsound;
procedure playsound(soundname:string; channel:byte);
procedure stopsound(channel:byte);
procedure stopmusic;
function musicstatus:byte;
procedure allowmix;
implementation
procedure setvolume;
begin
smixsetvolume(volume);
end;
procedure shutdownsound;
begin
shutdownsmix;
end;
procedure playsound;
begin
if (disable_music and (channel=2)) then exit;
if disable_sound then exit;
smixplay(channel,soundname);
end;
procedure stopsound;
begin
smixstop(channel);
end;
procedure stopmusic;
begin
smixstop(2);
end;
function musicstatus:byte;
begin
musicstatus:=smixplaying(2);
end;
procedure allowmix;
begin
smixmixing:=true;
end;
begin
disable_sound:=false;disable_music:=false;
startupsmix;
end.