|
From: <sag...@us...> - 2014-02-18 19:11:38
|
Revision: 3735
http://sourceforge.net/p/modplug/code/3735
Author: saga-games
Date: 2014-02-18 19:11:29 +0000 (Tue, 18 Feb 2014)
Log Message:
-----------
[Fix] Disabling a sustain loop could disable normal loops.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/ModSample.cpp
trunk/OpenMPT/soundlib/modsmp_ctrl.cpp
Modified: trunk/OpenMPT/soundlib/ModSample.cpp
===================================================================
--- trunk/OpenMPT/soundlib/ModSample.cpp 2014-02-18 18:55:50 UTC (rev 3734)
+++ trunk/OpenMPT/soundlib/ModSample.cpp 2014-02-18 19:11:29 UTC (rev 3735)
@@ -241,7 +241,7 @@
uFlags.set(CHN_PINGPONGSUSTAIN, pingpong && enable);
} else
{
- nLoopStart = nLoopEnd = 0;
+ nSustainStart = nSustainEnd = 0;
uFlags.reset(CHN_SUSTAINLOOP | CHN_PINGPONGSUSTAIN);
}
PrecomputeLoops(sndFile, true);
Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.cpp
===================================================================
--- trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2014-02-18 18:55:50 UTC (rev 3734)
+++ trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2014-02-18 19:11:29 UTC (rev 3735)
@@ -210,7 +210,6 @@
void PrecomputeLoopsImpl(ModSample &smp, const CSoundFile &sndFile)
//-----------------------------------------------------------------
{
- smp.SanitizeLoops();
const int numChannels = smp.GetNumChannels();
const int copySamples = numChannels * InterpolationMaxLookahead;
// Optimization: Put normal loop wraparound buffer right at the sample end if the normal loop ends there.
@@ -262,6 +261,8 @@
if(smp.nLength == 0 || smp.pSample == nullptr)
return false;
+ smp.SanitizeLoops();
+
// Update channels with possibly changed loop values
if(updateChannels)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|