X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fengine%2Fe_soundfile_modplug.pas;h=0a2c280c656d0a111e50cae9e1b231b2b503bd9a;hb=d63e6eaaecbc83b40c9b932b3381fc324f6a2461;hp=01fd45544a05e7f9590bb10dc6a3abd0e32ecf34;hpb=41373861bfc2c613356bcba4f57e854592888ee5;p=d2df-sdl.git diff --git a/src/engine/e_soundfile_modplug.pas b/src/engine/e_soundfile_modplug.pas index 01fd455..0a2c280 100644 --- a/src/engine/e_soundfile_modplug.pas +++ b/src/engine/e_soundfile_modplug.pas @@ -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 @@ -21,7 +20,7 @@ interface uses e_soundfile, modplug; type - // a module loader that uses libxmp-lite + // a module loader that uses libmodplug TModPlugLoader = class (TSoundLoader) public @@ -36,6 +35,7 @@ type end; TModPlugLoaderFactory = class (TSoundLoaderFactory) + public function MatchHeader(Data: Pointer; Len: LongWord): Boolean; override; function MatchExtension(FName: string): Boolean; override; function GetLoader(): TSoundLoader; override; @@ -89,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;