equal
deleted
inserted
replaced
49 |
49 |
50 procedure InitSound; |
50 procedure InitSound; |
51 begin |
51 begin |
52 if not isSoundEnabled then exit; |
52 if not isSoundEnabled then exit; |
53 WriteToConsole('Init sound...'); |
53 WriteToConsole('Init sound...'); |
54 isSoundEnabled:= Mix_OpenAudio(22050, $8010, 2, 512) = 0; |
54 isSoundEnabled:= SDL_Init(SDL_INIT_AUDIO) >= 0; |
|
55 if isSoundEnabled then |
|
56 isSoundEnabled:= Mix_OpenAudio(22050, $8010, 2, 512) = 0; |
55 if isSoundEnabled then WriteLnToConsole(msgOK) |
57 if isSoundEnabled then WriteLnToConsole(msgOK) |
56 else WriteLnToConsole(msgFailed); |
58 else WriteLnToConsole(msgFailed); |
|
59 Mix_AllocateChannels(Succ(ord(High(TSound)))); |
57 Mix_VolumeMusic(48) |
60 Mix_VolumeMusic(48) |
58 end; |
61 end; |
59 |
62 |
60 procedure ReleaseSound; |
63 procedure ReleaseSound; |
61 var i: TSound; |
64 var i: TSound; |