From: DeaDDooMER Date: Wed, 15 Mar 2023 15:03:35 +0000 (+0300) Subject: osx: fix build with fmodex X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=0f3b5618fa81434f7654fe6719c58a030ade2810;p=d2df-sdl.git osx: fix build with fmodex --- diff --git a/src/engine/e_sound_fmod.inc b/src/engine/e_sound_fmod.inc index 8f44864..f28994f 100644 --- a/src/engine/e_sound_fmod.inc +++ b/src/engine/e_sound_fmod.inc @@ -212,6 +212,11 @@ begin 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'); @@ -237,6 +242,8 @@ begin 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 038ecad..ce01f73 100644 --- a/src/lib/fmod/fmod.pas +++ b/src/lib/fmod/fmod.pas @@ -504,12 +504,13 @@ function FMOD_Unload (): FMOD_RESULT; {$IFDEF WIN32} stdc 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;