|
From: <sag...@us...> - 2010-06-22 18:15:17
|
Revision: 630
http://modplug.svn.sourceforge.net/modplug/?rev=630&view=rev
Author: saga-games
Date: 2010-06-22 18:15:10 +0000 (Tue, 22 Jun 2010)
Log Message:
-----------
[Fix] S3M Loader: Now the loop points should be treated properly, without any need for the "PSM2S3M hack".
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_s3m.cpp
Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-06-21 07:13:54 UTC (rev 629)
+++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-06-22 18:15:10 UTC (rev 630)
@@ -367,7 +367,7 @@
{
Samples[iSmp].nLength = CLAMP(LittleEndian(*((LPDWORD)(s + 0x10))), 4, MAX_SAMPLE_LENGTH);
Samples[iSmp].nLoopStart = CLAMP(LittleEndian(*((LPDWORD)(s + 0x14))), 0, Samples[iSmp].nLength - 1);
- Samples[iSmp].nLoopEnd = CLAMP(LittleEndian(*((LPDWORD)(s+0x18))), 4, Samples[iSmp].nLength);
+ Samples[iSmp].nLoopEnd = CLAMP(LittleEndian(*((LPDWORD)(s+0x18))), 0, Samples[iSmp].nLength);
Samples[iSmp].nVolume = CLAMP(s[0x1C], 0, 64) << 2;
Samples[iSmp].nGlobalVol = 64;
if (s[0x1F] & 1) Samples[iSmp].uFlags |= CHN_LOOP;
@@ -389,10 +389,6 @@
Samples[iSmp].nLoopStart = Samples[iSmp].nLoopEnd = 0;
Samples[iSmp].nPan = 0x80;
- // attempt to fix samples which are not supposed to have loops (for example in S3M files made with PSM2S3M)
- if(Samples[iSmp].nLoopEnd <= 4 && Samples[iSmp].nLength > 8)
- Samples[iSmp].uFlags &= ~CHN_LOOP;
-
} else if(s[0] >= S3I_TYPE_ADMEL)
{
bHasAdlibPatches = true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|