26 TVoicepack = record |
26 TVoicepack = record |
27 name: shortstring; |
27 name: shortstring; |
28 chunks: array [TSound] of PMixChunk; |
28 chunks: array [TSound] of PMixChunk; |
29 end; |
29 end; |
30 |
30 |
|
31 var MusicFN: shortstring; |
|
32 |
|
33 procedure init_uSound; |
|
34 procedure free_uSound; |
|
35 |
31 procedure InitSound; |
36 procedure InitSound; |
32 procedure ReleaseSound; |
37 procedure ReleaseSound; |
33 procedure SoundLoad; |
38 procedure SoundLoad; |
34 procedure PlaySound(snd: TSound; infinite: boolean; voicepack: PVoicepack); |
39 procedure PlaySound(snd: TSound; infinite: boolean; voicepack: PVoicepack); |
35 procedure LoopSound(snd: TSound; voicepack: PVoicepack); |
40 procedure LoopSound(snd: TSound; voicepack: PVoicepack); |
36 procedure PlayMusic; |
41 procedure PlayMusic; |
37 procedure PauseMusic; |
42 procedure PauseMusic; |
38 procedure ResumeMusic; |
43 procedure ResumeMusic; |
39 procedure StopSound(snd: TSound); |
44 procedure StopSound(snd: TSound); |
40 function ChangeVolume(voldelta: LongInt): LongInt; |
45 function ChangeVolume(voldelta: LongInt): LongInt; |
41 |
|
42 function AskForVoicepack(name: shortstring): Pointer; |
46 function AskForVoicepack(name: shortstring): Pointer; |
43 |
47 |
44 var MusicFN: shortstring = ''; |
|
45 |
48 |
46 implementation |
49 implementation |
47 uses uMisc, uConsole; |
50 uses uMisc, uConsole; |
48 |
51 |
49 const chanTPU = 12; |
52 const chanTPU = 12; |
50 var Volume: LongInt; |
53 var Volume: LongInt; |
51 lastChan: array [TSound] of LongInt; |
54 lastChan: array [TSound] of LongInt; |
52 voicepacks: array[0..cMaxTeams] of TVoicepack; |
55 voicepacks: array[0..cMaxTeams] of TVoicepack; |
53 defVoicepack: PVoicepack; |
56 defVoicepack: PVoicepack; |
54 Mus: PMixMusic = nil; |
57 Mus: PMixMusic = nil; |
55 |
58 |
56 function AskForVoicepack(name: shortstring): Pointer; |
59 function AskForVoicepack(name: shortstring): Pointer; |
57 var i: Longword; |
60 var i: Longword; |
58 begin |
61 begin |
59 i:= 0; |
62 i:= 0; |