DEADSOFTWARE

changed license to GPLv3 only; sorry, no trust to FSF anymore
[d2df-sdl.git] / src / engine / e_soundfile_modplug.pas
index 9f74a1683ea00a661f6f5bd6678dd10444d7cb21..0a2c280c656d0a111e50cae9e1b231b2b503bd9a 100644 (file)
@@ -2,8 +2,7 @@
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation, version 3 of the License ONLY.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -90,7 +89,12 @@ end;
 
 function TModPlugLoaderFactory.GetLoader(): TSoundLoader;
 begin
-  ModPlug_SetSettings(@Settings); // update settings just in case
+  // update interpolation setting
+  if e_MusicLerp then
+    Settings.mResamplingMode := MODPLUG_RESAMPLE_LINEAR
+  else
+    Settings.mResamplingMode := MODPLUG_RESAMPLE_NEAREST;
+  ModPlug_SetSettings(@Settings);
   Result := TModPlugLoader.Create();
 end;