From: <sag...@us...> - 2009-07-21 21:33:46
|
Revision: 299 http://modplug.svn.sourceforge.net/modplug/?rev=299&view=rev Author: saga-games Date: 2009-07-21 21:33:40 +0000 (Tue, 21 Jul 2009) Log Message: ----------- [Fix] Keyboard manager: Octave offset for key descriptions is now C, not A [Fix] Sample editor: Removed tuning from up/downsampling for MOD files which detuned them when saving [Imp] Module loader: If plugins are missing, a single MessageBox is shown. [Ref] Using constant instead of number in load_mid.cpp Modified Paths: -------------- trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/soundlib/Load_mid.cpp trunk/OpenMPT/soundlib/Sndfile.cpp Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2009-07-20 21:33:11 UTC (rev 298) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2009-07-21 21:33:40 UTC (rev 299) @@ -418,17 +418,17 @@ commands[kcVPNoteA_1].UID = 1073; commands[kcVPNoteA_1].isHidden = false; commands[kcVPNoteA_1].isDummy = false; - commands[kcVPNoteA_1].Message = "Base octave +1 A"; + commands[kcVPNoteA_1].Message = "Base octave A"; commands[kcVPNoteAS1].UID = 1074; commands[kcVPNoteAS1].isHidden = false; commands[kcVPNoteAS1].isDummy = false; - commands[kcVPNoteAS1].Message = "Base octave +1 A#"; + commands[kcVPNoteAS1].Message = "Base octave A#"; commands[kcVPNoteB_1].UID = 1075; commands[kcVPNoteB_1].isHidden = false; commands[kcVPNoteB_1].isDummy = false; - commands[kcVPNoteB_1].Message = "Base octave +1 B"; + commands[kcVPNoteB_1].Message = "Base octave B"; commands[kcVPNoteC_1].UID = 1076; commands[kcVPNoteC_1].isHidden = false; @@ -478,17 +478,17 @@ commands[kcVPNoteA_2].UID = 1085; commands[kcVPNoteA_2].isHidden = false; commands[kcVPNoteA_2].isDummy = false; - commands[kcVPNoteA_2].Message = "Base octave +2 A"; + commands[kcVPNoteA_2].Message = "Base octave +1 A"; commands[kcVPNoteAS2].UID = 1086; commands[kcVPNoteAS2].isHidden = false; commands[kcVPNoteAS2].isDummy = false; - commands[kcVPNoteAS2].Message = "Base octave +2 A#"; + commands[kcVPNoteAS2].Message = "Base octave +1 A#"; commands[kcVPNoteB_2].UID = 1087; commands[kcVPNoteB_2].isHidden = false; commands[kcVPNoteB_2].isDummy = false; - commands[kcVPNoteB_2].Message = "Base octave +2 B"; + commands[kcVPNoteB_2].Message = "Base octave +1 B"; commands[kcVPNoteC_2].UID = 1088; commands[kcVPNoteC_2].isHidden = false; @@ -538,7 +538,7 @@ commands[kcVPNoteA_3].UID = 1097; commands[kcVPNoteA_3].isHidden = false; commands[kcVPNoteA_3].isDummy = false; - commands[kcVPNoteA_3].Message = "Base octave +3 A"; + commands[kcVPNoteA_3].Message = "Base octave +2 A"; commands[kcVPNoteStopC_0].UID = 1098; commands[kcVPNoteStopC_0].isHidden = true; Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-07-20 21:33:11 UTC (rev 298) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2009-07-21 21:33:40 UTC (rev 299) @@ -1491,8 +1491,11 @@ pins->nLength = dwNewLen; if (viewstate.dwEndSel <= viewstate.dwBeginSel) { - if (pins->nC4Speed < 200000) pins->nC4Speed *= 2; - if (pins->RelativeTone < 84) pins->RelativeTone += 12; + if(!(m_pSndFile->m_nType & MOD_TYPE_MOD)) + { + if (pins->nC4Speed < 200000) pins->nC4Speed *= 2; + if (pins->RelativeTone < 84) pins->RelativeTone += 12; + } } CSoundFile::FreeSample(pOriginal); END_CRITICAL(); @@ -1614,8 +1617,11 @@ } if (viewstate.dwEndSel <= viewstate.dwBeginSel) { - if (pins->nC4Speed > 2000) pins->nC4Speed /= 2; - if (pins->RelativeTone > -84) pins->RelativeTone -= 12; + if(!(m_pSndFile->m_nType & MOD_TYPE_MOD)) + { + if (pins->nC4Speed > 2000) pins->nC4Speed /= 2; + if (pins->RelativeTone > -84) pins->RelativeTone -= 12; + } } pins->nLength = dwNewLen; pins->pSample = (LPSTR)pNewSample; Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2009-07-20 21:33:11 UTC (rev 298) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2009-07-21 21:33:40 UTC (rev 299) @@ -571,13 +571,14 @@ return bOk; } else { - CString message; + // MOVED to CSoundFile::Create + /*CString message; message.Format("This track uses the plugin \"%s\", which could not be found.\n\rSearch for this plug on kvraudio?", pMixPlugin->Info.szLibraryName); if (AfxMessageBox(message, MB_YESNO|MB_ICONQUESTION) == IDYES ) { CString url; url.Format("http://www.kvraudio.com/search.php?q=%s&lq=db", pMixPlugin->Info.szLibraryName); CTrackApp::OpenURL(url); - } + }*/ #ifdef VST_LOG Log("Unknown plugin\n"); Modified: trunk/OpenMPT/soundlib/Load_mid.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_mid.cpp 2009-07-20 21:33:11 UTC (rev 298) +++ trunk/OpenMPT/soundlib/Load_mid.cpp 2009-07-21 21:33:40 UTC (rev 299) @@ -431,7 +431,7 @@ int mapnote = j+1; if (nChannel == MIDI_DRUMCHANNEL) { - mapnote = 61; + mapnote = NOTE_MIDDLEC; /*mapnote = 61 + j - nNote; if (mapnote < 1) mapnote = 1; if (mapnote > 120) mapnote = 120;*/ Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2009-07-20 21:33:11 UTC (rev 298) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2009-07-21 21:33:40 UTC (rev 299) @@ -704,9 +704,14 @@ if ((m_nRestartPos >= Order.size()) || (Order[m_nRestartPos] >= Patterns.Size())) m_nRestartPos = 0; // Load plugins only when m_pModDoc != 0. (can be == 0 for example when examining module samples in treeview. + + CString sNotFound; + BOOL bSearchIDs[MAX_MIXPLUGINS] = {false}; + UINT iShowNotFound = 0; + if (gpMixPluginCreateProc && GetpModDoc()) { - for (UINT iPlug=0; iPlug<MAX_MIXPLUGINS; iPlug++) + for (UINT iPlug = 0; iPlug < MAX_MIXPLUGINS; iPlug++) { if ((m_MixPlugins[iPlug].Info.dwPluginId1) || (m_MixPlugins[iPlug].Info.dwPluginId2)) @@ -714,12 +719,50 @@ gpMixPluginCreateProc(&m_MixPlugins[iPlug], this); if (m_MixPlugins[iPlug].pMixPlugin) { + // plugin has been found m_MixPlugins[iPlug].pMixPlugin->RestoreAllParameters(m_MixPlugins[iPlug].defaultProgram); //rewbs.plugDefaultProgram: added param } + else + { + // plugin not found - add to list + BOOL bFound = false; + for(UINT iPlugFind = 0; iPlugFind < iPlug; iPlugFind++) + if(m_MixPlugins[iPlugFind].Info.dwPluginId2 == m_MixPlugins[iPlug].Info.dwPluginId2) + bFound = true; + + if(bFound == false) + { + sNotFound = sNotFound + m_MixPlugins[iPlug].Info.szLibraryName + "\n"; + bSearchIDs[iPlug] = true; // set this flag so we will find the needed plugins later when calling KVRAudio + } + iShowNotFound++; + } } } } + // Display a nice message so the user sees what plugins are missing + if(iShowNotFound) + { + if(iShowNotFound == 1) + { + sNotFound = "The following plugin has not been found:\n\n" + sNotFound + "\nDo you want to search for it on KVRAudio?"; + } + else + { + sNotFound = "The following plugins have not been found:\n\n" + sNotFound + "\nDo you want to search for them on KVRAudio?" + "\nWARNING: A browser window / tab is opened for every plugin. If you do not want that, you can visit http://www.kvraudio.com/search.php"; + } + if (::MessageBox(0, sNotFound, "OpenMPT - Plugins missing", MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2) == IDYES) + for (UINT iPlug = 0; iPlug < MAX_MIXPLUGINS; iPlug++) + if (bSearchIDs[iPlug] == true) + { + CString sUrl; + sUrl.Format("http://www.kvraudio.com/search.php?q=%s&lq=db", m_MixPlugins[iPlug].Info.szLibraryName); + CTrackApp::OpenURL(sUrl); + } + } + // Set up mix levels m_pConfig->SetMixLevels(m_nMixLevels); RecalculateGainForAllPlugs(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |