hedgewars/uSound.pas
changeset 2392 a55dbef5cf31
parent 2390 57fb33ab04a4
child 2410 e7bbb27b24b3
--- a/hedgewars/uSound.pas	Tue Sep 22 21:00:39 2009 +0000
+++ b/hedgewars/uSound.pas	Tue Sep 22 21:58:08 2009 +0000
@@ -59,7 +59,7 @@
 
 
 {*remember: LongInt = 32bit; integer = 16bit; byte = 8bit*}
-function openal_init		(memsize: LongInt)                      : boolean; cdecl; external OpenALBridge;
+function openal_init		(hardware: LongInt; memsize: LongInt): boolean; cdecl; external OpenALBridge;
 function openal_close							: boolean; cdecl; external OpenALBridge;
 function openal_loadfile	(const filename: PChar)			: LongInt; cdecl; external OpenALBridge;
 function openal_toggleloop	(index: LongInt)			: boolean; cdecl; external OpenALBridge;
@@ -106,7 +106,7 @@
 {*sound works in ipodtouch only if LAND_WIDTH  = 1024;   LAND_HEIGHT = 512; 
 or if ogg are loaded in stream or if sound is loaded by demand*}
 WriteToConsole('Init OpenAL sound...');
-isSoundEnabled:= openal_init(numSounds);
+if isSoundHardware then isSoundEnabled:= openal_init(1, numSounds) else isSoundEnabled:= openal_init(0, numSounds);
 if isSoundEnabled then WriteLnToConsole(msgOK)
                   else WriteLnToConsole(msgFailed);