From: <sag...@us...> - 2011-05-04 20:18:46
|
Revision: 865 http://modplug.svn.sourceforge.net/modplug/?rev=865&view=rev Author: saga-games Date: 2011-05-04 20:18:40 +0000 (Wed, 04 May 2011) Log Message: ----------- [Mod] Song Creation: If the user's default MIDI macro configuration is the standard configuration, it is not embedded by default anymore. [Fix] The first played note in the pattern / sample editor is not cut off anymore (tx C-jeff, http://bugs.openmpt.org/view.php?id=123) Modified Paths: -------------- trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/version.h Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2011-05-03 22:36:08 UTC (rev 864) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2011-05-04 20:18:40 UTC (rev 865) @@ -154,13 +154,19 @@ m_SndFile.Create(NULL, this, 0); m_SndFile.ChangeModTypeTo(CTrackApp::GetDefaultDocType()); - if(CTrackApp::IsProject()) { + if(CTrackApp::IsProject()) + { m_SndFile.m_dwSongFlags |= SONG_ITPROJECT; } - if (m_SndFile.m_nType & (MOD_TYPE_XM | MOD_TYPE_IT | MOD_TYPE_MPT)) { + theApp.GetDefaultMidiMacro(&m_SndFile.m_MidiCfg); + if (m_SndFile.m_nType & (MOD_TYPE_XM | MOD_TYPE_IT | MOD_TYPE_MPT)) + { m_SndFile.m_dwSongFlags |= SONG_LINEARSLIDES; - m_SndFile.m_dwSongFlags |= SONG_EMBEDMIDICFG; + if(!IsMacroDefaultSetupUsed()) + { + m_SndFile.m_dwSongFlags |= SONG_EMBEDMIDICFG; + } } @@ -170,7 +176,6 @@ // ...and the order length m_SndFile.Order.resize(min(ModSequenceSet::s_nCacheSize, m_SndFile.GetModSpecifications().ordersMax)); - theApp.GetDefaultMidiMacro(&m_SndFile.m_MidiCfg); ReinitRecordState(); InitializeMod(); SetModifiedFlag(FALSE); @@ -849,6 +854,7 @@ if (nVol > 256) nVol = 256; if (note <= NOTE_MAX) { + BEGIN_CRITICAL(); //kill notes if required. @@ -865,6 +871,17 @@ } } + END_CRITICAL(); + + if (pMainFrm->GetModPlaying() != this) + { + m_SndFile.m_dwSongFlags |= SONG_PAUSED; + pMainFrm->PlayMod(this, m_hWndFollow, m_dwNotifyType); + } + CMainFrame::EnableLowLatencyMode(); + + BEGIN_CRITICAL(); + //find a channel if required //if (nCurrentChn<0) { nChn = FindAvailableChannel(); @@ -986,12 +1003,6 @@ END_CRITICAL(); - if (pMainFrm->GetModPlaying() != this) - { - m_SndFile.m_dwSongFlags |= SONG_PAUSED; - pMainFrm->PlayMod(this, m_hWndFollow, m_dwNotifyType); - } - CMainFrame::EnableLowLatencyMode(); } else { BEGIN_CRITICAL(); @@ -3171,6 +3182,7 @@ enmParameteredMacroType CModDoc::GetMacroType(CString value) //---------------------------------------------------------- { + value.Remove(' '); if (value.Compare("")==0) return sfx_unused; if (value.Compare("F0F000z")==0) return sfx_cutoff; if (value.Compare("F0F001z")==0) return sfx_reso; @@ -3186,6 +3198,7 @@ int CModDoc::MacroToPlugParam(CString macro) //------------------------------------------ { + macro.Remove(' '); int code=0; char* param = (char *) (LPCTSTR) macro; param += 4; @@ -3204,6 +3217,7 @@ int CModDoc::MacroToMidiCC(CString macro) //--------------------------------------- { + macro.Remove(' '); int code=0; char* param = (char *) (LPCTSTR) macro; param += 2; Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2011-05-03 22:36:08 UTC (rev 864) +++ trunk/OpenMPT/mptrack/version.h 2011-05-04 20:18:40 UTC (rev 865) @@ -15,7 +15,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 19 #define VER_MINOR 01 -#define VER_MINORMINOR 05 +#define VER_MINORMINOR 06 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |