hedgewars/uSound.pas
changeset 355 40c68869899e
parent 351 29bc9c36ad5f
child 371 731ad6d27bd1
--- a/hedgewars/uSound.pas	Sun Jan 21 21:27:07 2007 +0000
+++ b/hedgewars/uSound.pas	Sun Jan 21 21:31:10 2007 +0000
@@ -63,14 +63,14 @@
 
 procedure SoundLoad;
 var i: TSound;
-    s: array[byte] of char;
+    s: shortstring;
 begin
 if not isSoundEnabled then exit;
 for i:= Low(TSound) to High(TSound) do
     begin
     s:= Pathz[Soundz[i].Path] + '/' + Soundz[i].FileName;
-    WriteToConsole(msgLoading + string(s) + ' ');
-    Soundz[i].id:= Mix_LoadWAV_RW(SDL_RWFromFile(@s, 'rb'), 1);
+    WriteToConsole(msgLoading + s + ' ');
+    Soundz[i].id:= Mix_LoadWAV_RW(SDL_RWFromFile(Str2PChar(s), 'rb'), 1);
     TryDo(Soundz[i].id <> nil, msgFailed, true);
     WriteLnToConsole(msgOK);
     end;