From: <sag...@us...> - 2009-12-17 21:42:57
|
Revision: 443 http://modplug.svn.sourceforge.net/modplug/?rev=443&view=rev Author: saga-games Date: 2009-12-17 21:42:45 +0000 (Thu, 17 Dec 2009) Log Message: ----------- [Fix] Sample Editor: When going down close to 0 Hz in the sample editor, the sample freq wrapped around to the maximum value. [Fix] Pattern Editor: When in sample mode, samples were never stopped when in new-style note off mode, which lead to sample jam when using long/looped samples. [Ref] Some less important refactoring in soundlib Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-12-14 20:12:20 UTC (rev 442) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-12-17 21:42:45 UTC (rev 443) @@ -2917,6 +2917,7 @@ { UINT d = pSmp->nC5Speed; if (d < 1) d = 8363; + if(d < m_nFinetuneStep) d = m_nFinetuneStep; d += (pos * m_nFinetuneStep); pSmp->nC5Speed = CLAMP(d, 1, 9999999); // 9999999 is max. in Impulse Tracker int transp = CSoundFile::FrequencyToTranspose(pSmp->nC5Speed) >> 7; Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2009-12-14 20:12:20 UTC (rev 442) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2009-12-17 21:42:45 UTC (rev 443) @@ -3929,10 +3929,7 @@ } else { - if(CMainFrame::m_dwPatternSetup & PATTERN_NOTEFADE) - pModDoc->NoteOff(note, TRUE, ins, GetChanFromCursor(m_dwCursor)); - else - pModDoc->NoteOff(note, FALSE, ins, GetChanFromCursor(m_dwCursor)); + pModDoc->NoteOff(note, ((CMainFrame::m_dwPatternSetup & PATTERN_NOTEFADE) || pSndFile->GetNumInstruments() == 0) ? TRUE : FALSE, ins, GetChanFromCursor(m_dwCursor)); } } Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-12-14 20:12:20 UTC (rev 442) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2009-12-17 21:42:45 UTC (rev 443) @@ -1310,10 +1310,10 @@ // Note Cut/Off/Fade => ignore instrument if (note >= NOTE_MIN_SPECIAL) instr = 0; - if ((note) && (note <= 128)) pChn->nNewNote = note; + if ((note) && (note <= NOTE_MAX)) pChn->nNewNote = note; // New Note Action ? - if ((note) && (note <= 128) && (!bPorta)) + if ((note) && (note <= NOTE_MAX) && (!bPorta)) { CheckNNA(nChn, instr, note, FALSE); } @@ -2550,11 +2550,7 @@ if((m_nType & MOD_TYPE_MOD) != 0) // MOD: Invert Loop { pChn->nEFxSpeed = param; - if(m_dwSongFlags & SONG_FIRSTTICK) - { - //if((pChn->nRowInstr != 0) && (m_nTickCount == 0)) pChn->nEFxOffset = 0; // reset offset (except when in pattern delay) TODO - InvertLoop(pChn); - } + if(m_dwSongFlags & SONG_FIRSTTICK) InvertLoop(pChn); } else // XM: Set Active Midi Macro { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |