From: <sag...@us...> - 2009-07-08 14:45:17
|
Revision: 286 http://modplug.svn.sourceforge.net/modplug/?rev=286&view=rev Author: saga-games Date: 2009-07-08 14:45:05 +0000 (Wed, 08 Jul 2009) Log Message: ----------- [Fix] Short loops in S3M samples are now recognized [New] Sample editor: Batch export samples (shift + click on "save sample" icon - this was introduced in the last commit already and has been slightly modified in this commit) [Ref] Minor code updates (mostly comments) Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/soundlib/Load_s3m.cpp trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/Sndfile.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-07-08 08:55:44 UTC (rev 285) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-07-08 14:45:05 UTC (rev 286) @@ -1015,7 +1015,9 @@ "Wave File (*.wav)|*.wav|" "RAW Audio (*.raw)|*.raw||", this); - dlg.m_ofn.lpstrInitialDir = CMainFrame::GetWorkingDirectory(DIR_SAMPLES); + const LPCTSTR pszWdir = CMainFrame::GetWorkingDirectory(DIR_SAMPLES); + if(pszWdir[0]) + dlg.m_ofn.lpstrInitialDir = pszWdir; if (dlg.DoModal() != IDOK) return; BeginWaitCursor(); @@ -1051,7 +1053,6 @@ sSampleFilename.Remove(sForbiddenChars.GetAt(i)); } - //sFilename.Format("%s%s%s%s", drive, path, filename, ext); sFilename = dlg.GetPathName(); sFilename.Replace("%sample_number%", sSampleNumber); sFilename.Replace("%sample_filename%", sSampleFilename); Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_s3m.cpp 2009-07-08 08:55:44 UTC (rev 285) +++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2009-07-08 14:45:05 UTC (rev 286) @@ -367,9 +367,12 @@ insfile[iSmp] = ((DWORD)LittleEndianW(*((LPWORD)(s+0x0E)))) << 4; insfile[iSmp] += ((DWORD)(BYTE)s[0x0D]) << 20; if (insfile[iSmp] > dwMemLength) insfile[iSmp] &= 0xFFFF; - if ((Ins[iSmp].nLoopStart >= Ins[iSmp].nLoopEnd) || (Ins[iSmp].nLoopEnd - Ins[iSmp].nLoopStart < 8)) - Ins[iSmp].nLoopStart = Ins[iSmp].nLoopEnd = 0; + if ((Ins[iSmp].nLoopStart >= Ins[iSmp].nLoopEnd) || (Ins[iSmp].nLoopEnd - Ins[iSmp].nLoopStart < 1)) + Ins[iSmp].nLoopStart = Ins[iSmp].nLoopEnd = 0; + UINT iLooplength = Ins[iSmp].nLoopEnd - Ins[iSmp].nLoopStart; + if(iLooplength > 0 && iLooplength < 8) Ins[iSmp].nLoopEnd = Ins[iSmp].nLoopStart + 8; Ins[iSmp].nPan = 0x80; + // ASSERT(iLooplength == 0 || iLooplength > 10); } } // Reading patterns @@ -727,4 +730,3 @@ #pragma warning(default:4100) #endif // MODPLUG_NO_FILESAVE - Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-08 08:55:44 UTC (rev 285) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-07-08 14:45:05 UTC (rev 286) @@ -2432,7 +2432,7 @@ pChn->nPan = (param << 4) + 8; pChn->dwFlags |= CHN_FASTVOLRAMP; } break; - // S9x: Set Surround + // S9x: Sound Control case 0x90: ExtendedChannelEffect(pChn, param & 0x0F); break; // SAx: Set 64k Offset case 0xA0: if (!m_nTickCount) @@ -2450,7 +2450,7 @@ case 0xC0: NoteCut(nChn, param); break; // SDx: Note Delay // SEx: Pattern Delay for x rows - // SFx: S3M: Funk Repeat, IT: Set Active Midi Macro + // SFx: S3M: Not used, IT: Set Active Midi Macro case 0xF0: pChn->nActiveMacro = param; break; } } Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2009-07-08 08:55:44 UTC (rev 285) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2009-07-08 14:45:05 UTC (rev 286) @@ -29,7 +29,7 @@ #define UNRAR_SUPPORT #define UNLHA_SUPPORT #define ZIPPED_MOD_SUPPORT -LPCSTR glpszModExtensions = "mod|s3m|xm|it|stm|nst|ult|669|wow|mtm|med|far|mdl|ams|dsm|amf|okt|dmf|ptm|psm|mt2|umx" +LPCSTR glpszModExtensions = "mod|s3m|xm|it|stm|nst|ult|669|wow|mtm|med|far|mdl|ams|dsm|amf|okt|dmf|ptm|psm|mt2|umx|gdm" #ifndef NO_UNMO3_SUPPORT "|mo3" #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |