hedgewars/uSound.pas
changeset 11 b64d67d222b9
parent 4 bcbd7adb4e4b
child 13 7a5db822fd3f
--- a/hedgewars/uSound.pas	Sat Sep 03 16:01:28 2005 +0000
+++ b/hedgewars/uSound.pas	Sun Sep 04 21:19:19 2005 +0000
@@ -51,9 +51,12 @@
 begin
 if not isSoundEnabled then exit;
 WriteToConsole('Init sound...');
-isSoundEnabled:= Mix_OpenAudio(22050, $8010, 2, 512) = 0;
+isSoundEnabled:= SDL_Init(SDL_INIT_AUDIO) >= 0;
+if isSoundEnabled then
+   isSoundEnabled:= Mix_OpenAudio(22050, $8010, 2, 512) = 0;
 if isSoundEnabled then WriteLnToConsole(msgOK)
                   else WriteLnToConsole(msgFailed);
+Mix_AllocateChannels(Succ(ord(High(TSound))));
 Mix_VolumeMusic(48)
 end;