index 01fd45544a05e7f9590bb10dc6a3abd0e32ecf34..0a2c280c656d0a111e50cae9e1b231b2b503bd9a 100644 (file)
*
* 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
uses e_soundfile, modplug;
type
- // a module loader that uses libxmp-lite
+ // a module loader that uses libmodplug
TModPlugLoader = class (TSoundLoader)
public
end;
TModPlugLoaderFactory = class (TSoundLoaderFactory)
+ public
function MatchHeader(Data: Pointer; Len: LongWord): Boolean; override;
function MatchExtension(FName: string): Boolean; override;
function GetLoader(): TSoundLoader; override;
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;