X-Git-Url: http://deadsoftware.ru/gitweb?p=d2df-sdl.git;a=blobdiff_plain;f=src%2Fengine%2Fe_soundfile_xmp.pas;h=d3e4da5809fc6edb59a2140fb87ae0ded2ada562;hp=afbadf3ad8d73dc63b0ba3b018acedca6bfce3cf;hb=239ffbfb8dc7197102e6dd1ad094d00636960c4f;hpb=17b6ed061b1301f4d70659dae0923982e22aa3d9 diff --git a/src/engine/e_soundfile_xmp.pas b/src/engine/e_soundfile_xmp.pas index afbadf3..d3e4da5 100644 --- a/src/engine/e_soundfile_xmp.pas +++ b/src/engine/e_soundfile_xmp.pas @@ -89,6 +89,7 @@ end; function TXMPLoader.Load(Data: Pointer; Len: LongWord; SStreaming: Boolean): Boolean; var Err: LongInt; + Interp: LongInt; begin Result := False; @@ -104,6 +105,10 @@ begin if xmp_start_player(FXMP, 48000, 0) <> 0 then raise Exception.Create('xmp_start_player failed'); + if e_MusicLerp then Interp := XMP_INTERP_LINEAR + else Interp := XMP_INTERP_NEAREST; + xmp_set_player(FXMP, XMP_PLAYER_INTERP, Interp); + FFormat.SampleRate := 48000; FFormat.SampleBits := 16; FFormat.Channels := 2; @@ -125,6 +130,7 @@ end; function TXMPLoader.Load(FName: string; SStreaming: Boolean): Boolean; var Err: LongInt; + Interp: LongInt; begin Result := False; @@ -140,6 +146,10 @@ begin if xmp_start_player(FXMP, 48000, 0) <> 0 then raise Exception.Create('xmp_start_player failed'); + if e_MusicLerp then Interp := XMP_INTERP_LINEAR + else Interp := XMP_INTERP_NEAREST; + xmp_set_player(FXMP, XMP_PLAYER_INTERP, Interp); + FFormat.SampleRate := 48000; FFormat.SampleBits := 16; FFormat.Channels := 2;