summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 38aa53a)
raw | patch | inline | side by side (parent: 38aa53a)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 15 Mar 2023 15:03:35 +0000 (18:03 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Wed, 15 Mar 2023 15:03:35 +0000 (18:03 +0300) |
src/engine/e_sound_fmod.inc | patch | blob | history | |
src/lib/fmod/fmod.pas | patch | blob | history |
index 8f4486481947f1cb956db2528e7e1b991f9dac00..f28994f1b3afa88aa9e011bb140d2b7bd2f4d9ba 100644 (file)
if res <> FMOD_OK then
res := TryInitWithOutput(FMOD_OUTPUTTYPE_OSS, 'OUTPUTTYPE_OSS');
{$ENDIF}
+ {$IFDEF DARWIN}
+ res := TryInitWithOutput(FMOD_OUTPUTTYPE_COREAUDIO, 'OUTPUTTYPE_COREAUDIO');
+ if res <> FMOD_OK then
+ res := TryInitWithOutput(FMOD_OUTPUTTYPE_SOUNDMANAGER, 'OUTPUTTYPE_SOUNDMANAGER');
+ {$ENDIF}
if (res <> FMOD_OK) and (forceNoSound <> 1) then Exit;
if res <> FMOD_OK then
res := TryInitWithOutput(FMOD_OUTPUTTYPE_NOSOUND, 'OUTPUTTYPE_NOSOUND');
FMOD_OUTPUTTYPE_ASIO: e_WriteLog('FMOD Output Method: ASIO', TMsgType.Notify);
FMOD_OUTPUTTYPE_OSS: e_WriteLog('FMOD Output Method: OSS', TMsgType.Notify);
FMOD_OUTPUTTYPE_ALSA: e_Writelog('FMOD Output Method: ALSA', TMsgType.Notify);
+ FMOD_OUTPUTTYPE_SOUNDMANAGER: e_Writelog('FMOD Output Method: SOUNDMANAGER', TMsgType.Notify);
+ FMOD_OUTPUTTYPE_COREAUDIO: e_Writelog('FMOD Output Method: COREAUDIO', TMsgType.Notify);
else e_WriteLog('FMOD Output Method: Unknown', TMsgType.Notify);
end;
diff --git a/src/lib/fmod/fmod.pas b/src/lib/fmod/fmod.pas
index 038ecad8c6993406cb2e1d0d993b551346ee11d2..ce01f73cb230d8fc4dda4827708e9e79930c361a 100644 (file)
--- a/src/lib/fmod/fmod.pas
+++ b/src/lib/fmod/fmod.pas
implementation
const
-{$IFDEF MSWINDOWS}
+{$IF DEFINED(MSWINDOWS)}
FMOD_DLL = 'fmodex.dll';
-{$ELSE}
-{$IFDEF LINUX}
+{$ELSEIF DEFINED(LINUX)}
FMOD_DLL = 'libfmodex.so';
-{$ENDIF}
+{$ELSEIF DEFINED(DARWIN)}
+ FMOD_DLL = 'libfmodex.dylib';
+ {$LINKLIB libfmodex}
{$ENDIF}
function FMOD_Load(const libname: PChar): FMOD_RESULT;