|
From: <sag...@us...> - 2010-06-18 23:03:35
|
Revision: 626
http://modplug.svn.sourceforge.net/modplug/?rev=626&view=rev
Author: saga-games
Date: 2010-06-18 23:03:29 +0000 (Fri, 18 Jun 2010)
Log Message:
-----------
[Imp] S3M Loader: More intelligent "short loop" detection to avoid problems with the 4-byte loops in S3M files created with PSM2S3M which should not be there.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_s3m.cpp
Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-06-15 21:08:42 UTC (rev 625)
+++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2010-06-18 23:03:29 UTC (rev 626)
@@ -388,7 +388,11 @@
if ((Samples[iSmp].nLoopStart >= Samples[iSmp].nLoopEnd) || (Samples[iSmp].nLoopEnd - Samples[iSmp].nLoopStart < 1))
Samples[iSmp].nLoopStart = Samples[iSmp].nLoopEnd = 0;
Samples[iSmp].nPan = 0x80;
- //ASSERT(iLooplength == 0 || iLooplength > 4);
+
+ // 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.
|