From aac50c080dd2ec5b189a5739456d593e48791aaf Mon Sep 17 00:00:00 2001 From: fgsfds Date: Sun, 1 Sep 2019 03:01:00 +0300 Subject: [PATCH] Sound: OpenAL: Allow choice between XMP, XMPLite and ModPlug --- src/game/Doom2DF.lpr | 7 ++++++- src/lib/xmp/xmp.pas | 20 ++++++++++++++++---- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/game/Doom2DF.lpr b/src/game/Doom2DF.lpr index c3c7c3e..639fbcc 100644 --- a/src/game/Doom2DF.lpr +++ b/src/game/Doom2DF.lpr @@ -61,10 +61,15 @@ uses {$ENDIF} {$IFDEF USE_OPENAL} AL in '../lib/openal/al.pas', - XMP in '../lib/xmp/xmp.pas', e_soundfile in '../engine/e_soundfile.pas', e_soundfile_wav in '../engine/e_soundfile_wav.pas', +{$IFDEF USE_MODPLUG} + modplug in '../lib/modplug/modplug.pas', + e_soundfile_modplug in '../engine/e_soundfile_modplug.pas', +{$ELSE} + xmp in '../lib/xmp/xmp.pas', e_soundfile_xmp in '../engine/e_soundfile_xmp.pas', +{$ENDIF} {$ENDIF} ENet in '../lib/enet/enet.pp', e_graphics in '../engine/e_graphics.pas', diff --git a/src/lib/xmp/xmp.pas b/src/lib/xmp/xmp.pas index 2f48d07..cd80954 100644 --- a/src/lib/xmp/xmp.pas +++ b/src/lib/xmp/xmp.pas @@ -16,22 +16,34 @@ interface {$IF DEFINED(XMP_DYNAMIC)} const {$IF DEFINED(WINDOWS)} + {$IF DEFINED(USE_XMP_FULL)} + xmplib = 'libxmp.dll'; + {$ELSE} xmplib = 'libxmp-lite.dll'; + {$ENDIF} {$ELSEIF DEFINED(UNIX)} + {$IF DEFINED(USE_XMP_FULL)} + xmplib = 'libxmp.so'; + {$ELSE} xmplib = 'libxmp-lite.so'; + {$ENDIF} {$ELSE} {$MESSAGE ERROR 'XMP_DYNAMIC not supported'} {$IFEND} {$ELSE} + {$IF DEFINED(USE_XMP_FULL)} + {$LINKLIB xmp} + {$ELSE} {$LINKLIB xmp-lite} + {$ENDIF} {$ENDIF} const - XMP_VER_STRING = '4.5.0'; - XMP_VER_CODE = $040500; + XMP_VER_STRING = '4.4.1'; + XMP_VER_CODE = $040401; XMP_VER_MAJOR = 4; - XMP_VER_MINOR = 5; - XMP_VER_RELEASE = 0; + XMP_VER_MINOR = 4; + XMP_VER_RELEASE = 1; const XMP_NAME_SIZE = 64; (* Size of module name and type *) -- 2.29.2