|
From: <sag...@us...> - 2011-02-16 13:26:33
|
Revision: 801
http://modplug.svn.sourceforge.net/modplug/?rev=801&view=rev
Author: saga-games
Date: 2011-02-16 13:26:26 +0000 (Wed, 16 Feb 2011)
Log Message:
-----------
[Fix] AMF / MED Loaders: Ignore short loops (http://bugs.openmpt.org/view.php?id=70) - probably caused by bad MOD conversions, at least in the AMF example?
Modified Paths:
--------------
trunk/OpenMPT/soundlib/LOAD_AMF.CPP
trunk/OpenMPT/soundlib/Load_med.cpp
Modified: trunk/OpenMPT/soundlib/LOAD_AMF.CPP
===================================================================
--- trunk/OpenMPT/soundlib/LOAD_AMF.CPP 2011-02-14 18:35:31 UTC (rev 800)
+++ trunk/OpenMPT/soundlib/LOAD_AMF.CPP 2011-02-16 13:26:26 UTC (rev 801)
@@ -210,6 +210,7 @@
psmp->nLength = LittleEndian(*((LPDWORD)(lpStream+dwMemPos+25)));
psmp->nLoopStart = LittleEndian(*((LPDWORD)(lpStream+dwMemPos+29)));
psmp->nLoopEnd = psmp->nLoopStart + LittleEndian(*((LPDWORD)(lpStream+dwMemPos+33)));
+ if (psmp->nLoopEnd <= 2) psmp->nLoopEnd = 0;
if ((psmp->nLoopEnd > psmp->nLoopStart) && (psmp->nLoopEnd <= psmp->nLength))
{
psmp->uFlags = CHN_LOOP;
Modified: trunk/OpenMPT/soundlib/Load_med.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_med.cpp 2011-02-14 18:35:31 UTC (rev 800)
+++ trunk/OpenMPT/soundlib/Load_med.cpp 2011-02-16 13:26:26 UTC (rev 801)
@@ -621,6 +621,7 @@
if (pSmp->nVolume > 256) pSmp->nVolume = 256;
pSmp->RelativeTone = -12 * pmsh->sample[iSHdr].strans;
pSmp->nPan = 128;
+ if (pSmp->nLoopEnd <= 2) pSmp->nLoopEnd = 0;
if (pSmp->nLoopEnd) pSmp->uFlags |= CHN_LOOP;
}
// Common Flags
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|