|
From: <sag...@us...> - 2010-02-05 18:18:00
|
Revision: 482
http://modplug.svn.sourceforge.net/modplug/?rev=482&view=rev
Author: saga-games
Date: 2010-02-05 18:17:51 +0000 (Fri, 05 Feb 2010)
Log Message:
-----------
[Imp] PSM Loader: Better handling of SC0 effect
[Imp] IT Saver: Compatibility export saves stereo samples again, as other tracker like Schism also support this.
Modified Paths:
--------------
trunk/OpenMPT/soundlib/Load_it.cpp
trunk/OpenMPT/soundlib/Load_psm.cpp
Modified: trunk/OpenMPT/soundlib/Load_it.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_it.cpp 2010-01-27 20:27:41 UTC (rev 481)
+++ trunk/OpenMPT/soundlib/Load_it.cpp 2010-02-05 18:17:51 UTC (rev 482)
@@ -2910,10 +2910,15 @@
if (psmp->uFlags & CHN_PANNING) itss.dfp |= 0x80;
if ((psmp->pSample) && (psmp->nLength)) itss.cvt = 0x01;
UINT flags = RS_PCM8S;
+ if (psmp->uFlags & CHN_STEREO)
+ {
+ flags = RS_STPCM8S;
+ itss.flags |= 0x04;
+ }
if (psmp->uFlags & CHN_16BIT)
{
itss.flags |= 0x02;
- flags = RS_PCM16S;
+ flags = (psmp->uFlags & CHN_STEREO) ? RS_STPCM16S : RS_PCM16S;
}
itss.samplepointer = dwPos;
if (!(psmp->pSample) || !(psmp->nLength))
Modified: trunk/OpenMPT/soundlib/Load_psm.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_psm.cpp 2010-01-27 20:27:41 UTC (rev 481)
+++ trunk/OpenMPT/soundlib/Load_psm.cpp 2010-02-05 18:17:51 UTC (rev 482)
@@ -1131,7 +1131,17 @@
break;
case 0x2A: // note cut
command = CMD_S3MCMDEX;
- if(param == 0) param = 1;
+ if(param == 0) // in S3M mode, SC0 is ignored, so we convert it to a note cut.
+ {
+ if(row_data->note == NOTE_NONE)
+ {
+ row_data->note = NOTE_NOTECUT;
+ command = CMD_NONE;
+ } else
+ {
+ param = 1;
+ }
+ }
param |= 0xC0;
break;
case 0x2B: // note delay
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|