From: <sag...@us...> - 2014-06-07 15:33:13
|
Revision: 4088 http://sourceforge.net/p/modplug/code/4088 Author: saga-games Date: 2014-06-07 15:32:59 +0000 (Sat, 07 Jun 2014) Log Message: ----------- [Imp] When loading plugins during startup, the error message that was potentially shown didn't appear in the task bar, making it easy to forget about such a half-initialized OpenMPT instance. [Imp] Stay at current order/pattern when removing something from the order list (https://bugs.openmpt.org/view.php?id=511) Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_seq.cpp trunk/OpenMPT/mptrack/Mptrack.cpp Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2014-06-05 15:36:49 UTC (rev 4087) +++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2014-06-07 15:32:59 UTC (rev 4088) @@ -10,12 +10,13 @@ #include "stdafx.h" -#include "mptrack.h" -#include "mainfrm.h" +#include "Mptrack.h" +#include "Mainfrm.h" +#include "View_tre.h" #include "InputHandler.h" -#include "moddoc.h" -#include "globals.h" -#include "ctrl_pat.h" +#include "Moddoc.h" +#include "Globals.h" +#include "Ctrl_pat.h" #include "PatternClipboard.h" @@ -154,6 +155,7 @@ SendMessage(WM_SETFONT, (WPARAM)m_hFont); SetScrollPos(SB_HORZ, 0); EnableScrollBarCtrl(SB_HORZ, TRUE); + SetCurSel(0); return TRUE; } @@ -172,7 +174,7 @@ UINT nPage; int nMax = 0; - if(sndFile.GetType() & (MOD_TYPE_MOD | MOD_TYPE_XM)) + if(!sndFile.GetModSpecifications().hasStopIndex) { // With MOD / XM, cut shown sequence to first '---' item... nMax = sndFile.Order.GetLengthFirstEmpty(); @@ -299,7 +301,7 @@ { // Must move first shown sequence item to left in order to show // the new active order. - m_nXScroll = std::max(ORDERINDEX(0), static_cast<ORDERINDEX>(nOrder - nMargins)); + m_nXScroll = static_cast<ORDERINDEX>(std::max(0, static_cast<int>(nOrder - nMargins))); SetScrollPos(SB_HORZ, m_nXScroll); InvalidateRect(NULL, FALSE); } else @@ -1214,11 +1216,9 @@ InvalidateRect(NULL, FALSE); m_pModDoc.UpdateAllViews(NULL, HINT_MODSEQUENCE, this); - SetCurSel(selection.firstOrd); - PATTERNINDEX nNewPat = sndFile.Order[selection.firstOrd]; - if ((nNewPat < sndFile.Patterns.Size()) && (sndFile.Patterns[nNewPat] != nullptr) && (m_pParent)) + if(sndFile.m_PlayState.m_nCurrentOrder > selection.lastOrd) { - m_pParent.SetCurrentPattern(nNewPat); + sndFile.m_PlayState.m_nNextOrder -= selection.GetSelCount(); } } Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2014-06-05 15:36:49 UTC (rev 4087) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2014-06-07 15:32:59 UTC (rev 4088) @@ -1735,7 +1735,7 @@ } if(!nonFoundPlugs.empty()) { - Reporting::Notification(L"Problems were encountered with plugins:\n" + nonFoundPlugs); + Reporting::Notification(L"Problems were encountered with plugins:\n" + nonFoundPlugs, L"OpenMPT", CWnd::GetDesktopWindow()); } return FALSE; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-06-18 19:38:24
|
Revision: 4129 http://sourceforge.net/p/modplug/code/4129 Author: saga-games Date: 2014-06-18 19:37:56 +0000 (Wed, 18 Jun 2014) Log Message: ----------- [Fix] Trying to play notes above B-9 in the instrument editor caused a crash (http://bugs.openmpt.org/view.php?id=549). Modified Paths: -------------- trunk/OpenMPT/mptrack/View_ins.cpp trunk/OpenMPT/mptrack/View_ins.h Modified: trunk/OpenMPT/mptrack/View_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_ins.cpp 2014-06-18 12:07:23 UTC (rev 4128) +++ trunk/OpenMPT/mptrack/View_ins.cpp 2014-06-18 19:37:56 UTC (rev 4129) @@ -23,6 +23,7 @@ #include "ScaleEnvPointsDlg.h" #include "view_ins.h" #include "../soundlib/MIDIEvents.h" +#include "../common/StringFixer.h" OPENMPT_NAMESPACE_BEGIN @@ -1918,16 +1919,15 @@ static DWORD nLastScanCode = 0; -void CViewInstrument::PlayNote(UINT note) -//--------------------------------------- +void CViewInstrument::PlayNote(ModCommand::NOTE note) +//--------------------------------------------------- { CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); CModDoc *pModDoc = GetDocument(); if ((pModDoc) && (pMainFrm) && (note > 0) && (note<128)) { CHAR s[64]; - const size_t sizeofS = sizeof(s) / sizeof(s[0]); - if (note >= 0xFE) + if (note >= NOTE_MIN_SPECIAL) { pModDoc->NoteOff(0, (note == NOTE_NOTECUT), m_nInstrument); pMainFrm->SetInfoText(""); @@ -1955,11 +1955,8 @@ s[0] = 0; if ((note) && (note <= NOTE_MAX)) { - const std::string temp = pModDoc->GetrSoundFile().GetNoteName(static_cast<ModCommand::NOTE>(note), m_nInstrument); - if(temp.size() >= sizeofS) - wsprintf(s, "%s", "..."); - else - wsprintf(s, "%s", temp.c_str()); + const std::string temp = pModDoc->GetrSoundFile().GetNoteName(note, m_nInstrument); + mpt::String::Copy(s, temp.c_str()); } pMainFrm->SetInfoText(s); } @@ -2218,13 +2215,13 @@ } if(wParam >= kcInstrumentStartNotes && wParam <= kcInstrumentEndNotes) { - PlayNote(static_cast<UINT>(wParam) - kcInstrumentStartNotes + 1 + pMainFrm->GetBaseOctave() * 12); + PlayNote(static_cast<ModCommand::NOTE>(wParam - kcInstrumentStartNotes + 1 + pMainFrm->GetBaseOctave() * 12)); return wParam; } if(wParam >= kcInstrumentStartNoteStops && wParam <= kcInstrumentEndNoteStops) { - UINT note = static_cast<UINT>(wParam) - kcInstrumentStartNoteStops + 1 + pMainFrm->GetBaseOctave() * 12; - m_baPlayingNote[note] = false; + ModCommand::NOTE note = static_cast<ModCommand::NOTE>(wParam - kcInstrumentStartNoteStops + 1 + pMainFrm->GetBaseOctave() * 12); + if(ModCommand::IsNote(note)) m_baPlayingNote[note] = false; pModDoc->NoteOff(note, false, m_nInstrument); return wParam; } @@ -2439,7 +2436,6 @@ if(pEnv == nullptr || !IsDragItemEnvPoint()) return; if(EnvToggleReleaseNode(m_nDragItem - 1)) { - CModDoc *pModDoc = GetDocument(); // sanity checks are done in GetEnvelopePtr() already SetModified(HINT_ENVELOPE, true); } } Modified: trunk/OpenMPT/mptrack/View_ins.h =================================================================== --- trunk/OpenMPT/mptrack/View_ins.h 2014-06-18 12:07:23 UTC (rev 4128) +++ trunk/OpenMPT/mptrack/View_ins.h 2014-06-18 19:37:56 UTC (rev 4129) @@ -150,7 +150,7 @@ void DrawNcButton(CDC *pDC, UINT nBtn); BOOL GetNcButtonRect(UINT nBtn, LPRECT lpRect); void UpdateNcButtonState(); - void PlayNote(UINT note); + void PlayNote(ModCommand::NOTE note); void DrawGrid(CDC *memDC, UINT speed); void OnEnvZoomIn() { EnvSetZoom(m_fZoom + 1); }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-06-19 10:08:05
|
Revision: 4138 http://sourceforge.net/p/modplug/code/4138 Author: manxorist Date: 2014-06-19 10:07:57 +0000 (Thu, 19 Jun 2014) Log Message: ----------- [New] Add hidden setting [Misc]ShowSettingsOnNewVersion (default true) which can permanently disable showing of the settings dialog on new versions, in addition to the one-time commandline switch /noSettingsOnNewVersion . Modified Paths: -------------- trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/mptrack/TrackerSettings.h Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2014-06-19 08:49:15 UTC (rev 4137) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2014-06-19 10:07:57 UTC (rev 4138) @@ -957,7 +957,7 @@ } // Open settings if the previous execution was with an earlier version. - if (!cmdInfo.m_bNoSettingsOnNewVersion && TrackerSettings::Instance().gcsPreviousVersion < MptVersion::num) + if(TrackerSettings::Instance().ShowSettingsOnNewVersion && !cmdInfo.m_bNoSettingsOnNewVersion && TrackerSettings::Instance().gcsPreviousVersion < MptVersion::num) { StopSplashScreen(); m_pMainWnd->PostMessage(WM_COMMAND, ID_VIEW_OPTIONS); Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2014-06-19 08:49:15 UTC (rev 4137) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2014-06-19 10:07:57 UTC (rev 4138) @@ -158,6 +158,7 @@ , GUIUpdateInterval(conf, "Display", "GUIUpdateInterval", 0) , VuMeterUpdateInterval(conf, "Display", "VuMeterUpdateInterval", 15) // Misc + , ShowSettingsOnNewVersion(conf, "Misc", "ShowSettingsOnNewVersion", true) , gbShowHackControls(conf, "Misc", "ShowHackControls", false) , defaultModType(conf, "Misc", "DefaultModType", MOD_TYPE_IT) , DefaultPlugVolumeHandling(conf, "Misc", "DefaultPlugVolumeHandling", PLUGIN_VOLUMEHANDLING_IGNORE) Modified: trunk/OpenMPT/mptrack/TrackerSettings.h =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.h 2014-06-19 08:49:15 UTC (rev 4137) +++ trunk/OpenMPT/mptrack/TrackerSettings.h 2014-06-19 10:07:57 UTC (rev 4138) @@ -358,6 +358,7 @@ // Misc + Setting<bool> ShowSettingsOnNewVersion; Setting<bool> gbShowHackControls; Setting<MODTYPE> defaultModType; Setting<PLUGVOLUMEHANDLING> DefaultPlugVolumeHandling; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-06-29 19:59:31
|
Revision: 4180 http://sourceforge.net/p/modplug/code/4180 Author: saga-games Date: 2014-06-29 19:59:23 +0000 (Sun, 29 Jun 2014) Log Message: ----------- [Imp] Pattern tab: "Edit Plugin assigned to PC Event" shortcut is now "Toggle PC Event/instrument plugin editor" (can now also be used to toggle the editor of the plugin assigned to the currently selected instrument). Modified Paths: -------------- trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/View_pat.h Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2014-06-29 17:00:59 UTC (rev 4179) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2014-06-29 19:59:23 UTC (rev 4180) @@ -590,7 +590,7 @@ DefineKeyCommand(kcInstrumentEnvelopeToggleReleaseNode, 1833, _T("Toggle release node")); DefineKeyCommand(kcInstrumentEnvelopePointMoveUp8, 1834, _T("Move envelope point up (Coarse)")); DefineKeyCommand(kcInstrumentEnvelopePointMoveDown8, 1835, _T("Move envelope point down (Coarse)")); - DefineKeyCommand(kcPatternEditPCNotePlugin, 1836, _T("Edit Plugin assigned to PC Event")); + DefineKeyCommand(kcPatternEditPCNotePlugin, 1836, _T("Toggle PC Event/instrument plugin editor")); DefineKeyCommand(kcInstrumentEnvelopeZoomIn, 1837, _T("Zoom In")); DefineKeyCommand(kcInstrumentEnvelopeZoomOut, 1838, _T("Zoom Out")); DefineKeyCommand(kcVSTGUIToggleRecordParams, 1839, _T("Toggle Parameter Recording")); Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2014-06-29 17:00:59 UTC (rev 4179) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2014-06-29 19:59:23 UTC (rev 4180) @@ -6288,7 +6288,6 @@ return false; } - std::vector<CHANNELINDEX> validChans; DWORD greyed = IsColumnSelected(PatternCursor::instrColumn) ? 0 : MF_GRAYED; @@ -6344,7 +6343,7 @@ AppendMenu(instrumentChangeMenu, MF_STRING, ID_CHANGE_INSTRUMENT, "Remove instrument"); AppendMenu(instrumentChangeMenu, MF_STRING, ID_CHANGE_INSTRUMENT + GetCurrentInstrument(), "Set to current instrument"); } - return true; + return BuildTogglePlugEditorCtxMenu(hMenu, ih); } return false; } @@ -6397,15 +6396,44 @@ { AppendMenu(paramChangeMenu, MF_STRING | (i == curParam) ? MF_CHECKED : 0, ID_CHANGE_PCNOTE_PARAM + i, plug->GetFormattedParamName(i)); } - } + } + } + return BuildTogglePlugEditorCtxMenu(hMenu, ih); +} + + +bool CViewPattern::BuildTogglePlugEditorCtxMenu(HMENU hMenu, CInputHandler *ih) const +//----------------------------------------------------------------------------------- +{ + const CSoundFile *sndFile = GetSoundFile(); + if(sndFile == nullptr || !sndFile->Patterns.IsValidPat(m_nPattern)) + { + return false; + } + + PLUGINDEX plug = 0; + const ModCommand &selStart = *sndFile->Patterns[m_nPattern].GetpModCommand(m_Selection.GetStartRow(), m_Selection.GetStartChannel()); + if(selStart.IsPcNote()) + { + // PC Event + plug = selStart.instr; + } else if(selStart.instr > 0 && selStart.instr <= sndFile->GetNumInstruments() + && sndFile->Instruments[selStart.instr] != nullptr + && sndFile->Instruments[selStart.instr]->nMixPlug) + { + // Regular instrument + plug = sndFile->Instruments[selStart.instr]->nMixPlug; + } + + if(plug && plug <= MAX_MIXPLUGINS && sndFile->m_MixPlugins[plug - 1].pMixPlugin != nullptr) + { AppendMenu(hMenu, MF_STRING, ID_PATTERN_EDIT_PCNOTE_PLUGIN, "Toggle Plugin Editor\t" + ih->GetKeyTextFromCommand(kcPatternEditPCNotePlugin)); + return true; } - - return true; + return false; } - // Returns an ordered list of all channels in which a given column type is selected. CHANNELINDEX CViewPattern::ListChansWhereColSelected(PatternCursor::Columns colType, std::vector<CHANNELINDEX> &chans) const //-------------------------------------------------------------------------------------------------------------------------- Modified: trunk/OpenMPT/mptrack/View_pat.h =================================================================== --- trunk/OpenMPT/mptrack/View_pat.h 2014-06-29 17:00:59 UTC (rev 4179) +++ trunk/OpenMPT/mptrack/View_pat.h 2014-06-29 19:59:23 UTC (rev 4180) @@ -471,6 +471,7 @@ bool BuildSetInstCtxMenu(HMENU hMenu, CInputHandler *ih) const; bool BuildAmplifyCtxMenu(HMENU hMenu, CInputHandler *ih) const; bool BuildPCNoteCtxMenu(HMENU hMenu, CInputHandler *ih) const; + bool BuildTogglePlugEditorCtxMenu(HMENU hMenu, CInputHandler *ih) const; // Returns an ordered list of all channels in which a given column type is selected. CHANNELINDEX ListChansWhereColSelected(PatternCursor::Columns colType, std::vector<CHANNELINDEX> &chans) const; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-07-05 16:55:57
|
Revision: 4184 http://sourceforge.net/p/modplug/code/4184 Author: saga-games Date: 2014-07-05 16:55:51 +0000 (Sat, 05 Jul 2014) Log Message: ----------- [Fix] CenterWindow still didn't work as intended. Simply implement our own version... Modified Paths: -------------- trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp trunk/OpenMPT/mptrack/PatternEditorDialogs.h trunk/OpenMPT/mptrack/View_pat.cpp Modified: trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp =================================================================== --- trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp 2014-07-03 21:56:48 UTC (rev 4183) +++ trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp 2014-07-05 16:55:51 UTC (rev 4184) @@ -652,8 +652,8 @@ } -bool CEditCommand::ShowEditWindow(PATTERNINDEX pat, const PatternCursor &cursor) -//------------------------------------------------------------------------------ +bool CEditCommand::ShowEditWindow(PATTERNINDEX pat, const PatternCursor &cursor, CWnd *parent) +//-------------------------------------------------------------------------------------------- { editPos.pattern = pat; const ROWINDEX row = editPos.row = cursor.GetRow(); @@ -702,10 +702,13 @@ _stprintf(s, _T("Note Properties - Row %d, Channel %d"), row, chn + 1); SetWindowText(s); - SetParent(CMainFrame::GetMainFrame()); - // Note: Centering against a child window seems to be buggy. - CenterWindow(CMainFrame::GetMainFrame()); - + CRect rectParent, rectWnd; + parent->GetWindowRect(&rectParent); + GetClientRect(&rectWnd); + SetWindowPos(CMainFrame::GetMainFrame(), + rectParent.left + (rectParent.Width() - rectWnd.right) / 2, + rectParent.top + (rectParent.Height() - rectWnd.bottom) / 2, + -1, -1, SWP_NOSIZE | SWP_NOACTIVATE); ShowWindow(SW_RESTORE); return true; } Modified: trunk/OpenMPT/mptrack/PatternEditorDialogs.h =================================================================== --- trunk/OpenMPT/mptrack/PatternEditorDialogs.h 2014-07-03 21:56:48 UTC (rev 4183) +++ trunk/OpenMPT/mptrack/PatternEditorDialogs.h 2014-07-05 16:55:51 UTC (rev 4184) @@ -134,7 +134,7 @@ CEditCommand(CSoundFile &sndFile); public: - bool ShowEditWindow(PATTERNINDEX pat, const PatternCursor &cursor); + bool ShowEditWindow(PATTERNINDEX pat, const PatternCursor &cursor, CWnd *parent); protected: void InitAll() { InitNote(); InitVolume(); InitEffect(); } Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2014-07-03 21:56:48 UTC (rev 4183) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2014-07-05 16:55:51 UTC (rev 4184) @@ -643,7 +643,7 @@ } if (m_pEditWnd) { - m_pEditWnd->ShowEditWindow(m_nPattern, m_Cursor); + m_pEditWnd->ShowEditWindow(m_nPattern, m_Cursor, this); return true; } return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-07-19 21:08:22
|
Revision: 4188 http://sourceforge.net/p/modplug/code/4188 Author: saga-games Date: 2014-07-19 21:08:07 +0000 (Sat, 19 Jul 2014) Log Message: ----------- [Imp] Add dummy keybdinging to recycle default keybindings into if you don't like them (https://bugs.openmpt.org/view.php?id=550) [Ref] Rewrite some key edit code to use std::vector instead of CArray Modified Paths: -------------- trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/CommandSet.h trunk/OpenMPT/mptrack/KeyConfigDlg.cpp trunk/OpenMPT/mptrack/KeyConfigDlg.h Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2014-07-19 16:46:30 UTC (rev 4187) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2014-07-19 21:08:07 UTC (rev 4188) @@ -666,6 +666,7 @@ DefineKeyCommand(kcSampleTransposeOctUp, 1909, _T("Transpose +12")); DefineKeyCommand(kcSampleTransposeOctDown, 1910, _T("Transpose -12")); DefineKeyCommand(kcPatternInterpolateInstr, 1911, _T("Interpolate Instrument")); + DefineKeyCommand(kcDummyShortcut, 1912, _T("Dummy Shortcut")); // Add new key commands here. @@ -1441,27 +1442,6 @@ } -KeyCombination CCommandSet::GetKey(CommandID cmd, UINT key) -//--------------------------------------------------------- -{ - return commands[cmd].kcList[key]; -} - - -int CCommandSet::GetKeyListSize(CommandID cmd) -//-------------------------------------------- -{ - return commands[cmd].kcList.size(); -} - - -CString CCommandSet::GetCommandText(CommandID cmd) -//------------------------------------------------ -{ - return commands[cmd].Message; -} - - bool CCommandSet::SaveFile(const mpt::PathString &filename) //--------------------------------------------------------- { //TODO: Make C++ @@ -1806,14 +1786,6 @@ } -bool CCommandSet::isHidden(UINT c) -//-------------------------------- -{ - return commands[c].isHidden; -} - - - //------------------------------------------------------- // Quick Changes - modify many commands with one call. //------------------------------------------------------- Modified: trunk/OpenMPT/mptrack/CommandSet.h =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.h 2014-07-19 16:46:30 UTC (rev 4187) +++ trunk/OpenMPT/mptrack/CommandSet.h 2014-07-19 21:08:07 UTC (rev 4188) @@ -149,8 +149,10 @@ kcPrevOrder, kcNextOrder, kcEndMisc=kcNextOrder, - kcGlobalEnd=kcNextOrder, + kcDummyShortcut, + kcGlobalEnd=kcDummyShortcut, + //Pattern Navigation kcStartPatNavigation, kcStartJumpSnap=kcStartPatNavigation, @@ -1200,13 +1202,13 @@ // Key combination to string static CString GetContextText(InputTargetContext ctx); CString GetContextText() const { return GetContextText(Context()); } - + static CString GetModifierText(UINT mod); CString GetModifierText() const { return GetModifierText(Modifier()); } - + static CString GetKeyText(UINT mod, UINT code); CString GetKeyText() const { return GetKeyText(Modifier(), KeyCode()); } - + static CString GetKeyEventText(KeyEventType event); CString GetKeyEventText() const { return GetKeyEventText(EventType()); } @@ -1309,10 +1311,10 @@ bool QuickChange_NoNotesRepeat(); //Communication - KeyCombination GetKey(CommandID cmd, UINT key); - bool isHidden(UINT c); - int GetKeyListSize(CommandID cmd); - CString GetCommandText(CommandID cmd); + KeyCombination GetKey(CommandID cmd, UINT key) const { return commands[cmd].kcList[key]; } + bool isHidden(UINT c) const { return commands[c].isHidden; } + int GetKeyListSize(CommandID cmd) const { return commands[cmd].kcList.size(); } + CString GetCommandText(CommandID cmd) const { return commands[cmd].Message; } CString GetKeyTextFromCommand(CommandID c, UINT key); //Pululation ;) Modified: trunk/OpenMPT/mptrack/KeyConfigDlg.cpp =================================================================== --- trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2014-07-19 16:46:30 UTC (rev 4187) +++ trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2014-07-19 21:08:07 UTC (rev 4188) @@ -173,9 +173,9 @@ //Fill category combo and automatically selects first category DefineCommandCategories(); - for (int c=0; c<commandCategories.GetSize(); c++) + for(size_t c = 0; c < commandCategories.size(); c++) { - if (commandCategories[c].name && commandCategories[c].commands.GetCount()) + if (commandCategories[c].name && !commandCategories[c].commands.empty()) m_cmbCategory.SetItemData(m_cmbCategory.AddString(commandCategories[c].name), c); } m_cmbCategory.SetCurSel(0); @@ -200,202 +200,203 @@ CommandCategory newCat("Global keys", kCtxAllContexts); for(int c = kcStartFile; c <= kcEndFile; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcEndFile); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcEndFile); //-------------------------------------- for(int c = kcStartPlayCommands; c <= kcEndPlayCommands; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcEndPlayCommands); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcEndPlayCommands); //-------------------------------------- for(int c = kcStartEditCommands; c <= kcEndEditCommands; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcEndEditCommands); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcEndEditCommands); //-------------------------------------- for(int c = kcStartView; c <= kcEndView; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcEndView); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcEndView); //-------------------------------------- for(int c = kcStartMisc; c <= kcEndMisc; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcEndMisc); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcEndMisc); //-------------------------------------- + newCat.commands.push_back(kcDummyShortcut); - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" General [Top]", kCtxCtrlGeneral); - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" General [Bottom]", kCtxViewGeneral); - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" Pattern Editor [Top]", kCtxCtrlPatterns); - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" Pattern Editor - Order List", kCtxCtrlOrderlist); for(int c = kcStartOrderlistCommands; c <= kcEndOrderlistCommands; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcEndOrderlistNavigation); //-------------------------------------- - newCat.separators.Add(kcEndOrderlistEdit); //-------------------------------------- - newCat.separators.Add(kcEndOrderlistNum); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcEndOrderlistNavigation); //-------------------------------------- + newCat.separators.push_back(kcEndOrderlistEdit); //-------------------------------------- + newCat.separators.push_back(kcEndOrderlistNum); //-------------------------------------- - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" Pattern Editor - Quick Channel Settings", kCtxChannelSettings); for(int c = kcStartChnSettingsCommands; c <= kcEndChnSettingsCommands; c++) - newCat.commands.Add(c); + newCat.commands.push_back(c); - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" Pattern Editor - General", kCtxViewPatterns); for(int c = kcStartPlainNavigate; c <= kcEndPlainNavigate; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcEndPlainNavigate); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcEndPlainNavigate); //-------------------------------------- for(int c = kcStartJumpSnap; c <= kcEndJumpSnap; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcEndJumpSnap); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcEndJumpSnap); //-------------------------------------- for(int c = kcStartHomeEnd; c <= kcEndHomeEnd; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcEndHomeEnd); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcEndHomeEnd); //-------------------------------------- for(int c = kcPrevPattern; c <= kcNextPattern; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcNextPattern); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcNextPattern); //-------------------------------------- for(int c = kcStartSelect; c <= kcEndSelect; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcEndSelect); //-------------------------------------- - newCat.commands.Add(kcCopyAndLoseSelection); + newCat.commands.push_back(c); + newCat.separators.push_back(kcEndSelect); //-------------------------------------- + newCat.commands.push_back(kcCopyAndLoseSelection); for(int c = kcClearRow; c <= kcInsertAllRows; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcInsertAllRows); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcInsertAllRows); //-------------------------------------- for(int c = kcStartChannelKeys; c <= kcEndChannelKeys; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcEndChannelKeys); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcEndChannelKeys); //-------------------------------------- for(int c = kcBeginTranspose; c <= kcEndTranspose; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcEndTranspose); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcEndTranspose); //-------------------------------------- for(int c = kcPatternAmplify; c <= kcPatternShrinkSelection; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcPatternShrinkSelection); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcPatternShrinkSelection); //-------------------------------------- for(int c = kcStartPatternEditMisc; c <= kcEndPatternEditMisc; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcEndPatternEditMisc); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcEndPatternEditMisc); //-------------------------------------- for(int c = kcStartPatternClipboard; c <= kcEndPatternClipboard; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcEndPatternClipboard); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcEndPatternClipboard); //-------------------------------------- - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" Pattern Editor - Note Column", kCtxViewPatternsNote); for(int c = kcVPStartNotes; c <= kcVPEndNotes; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcVPEndNotes); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcVPEndNotes); //-------------------------------------- for(int c = kcSetOctave0; c <= kcSetOctave9; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcVPEndNotes); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcVPEndNotes); //-------------------------------------- for(int c = kcStartNoteMisc; c <= kcEndNoteMisc; c++) - newCat.commands.Add(c); + newCat.commands.push_back(c); - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" Pattern Editor - Instrument Column", kCtxViewPatternsIns); for(int c = kcSetIns0; c <= kcSetIns9; c++) - newCat.commands.Add(c); + newCat.commands.push_back(c); - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" Pattern Editor - Volume Column", kCtxViewPatternsVol); for(int c = kcSetVolumeStart; c <= kcSetVolumeEnd; c++) - newCat.commands.Add(c); + newCat.commands.push_back(c); - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" Pattern Editor - Effect Column", kCtxViewPatternsFX); for(int c = kcSetFXStart; c <= kcSetFXEnd; c++) - newCat.commands.Add(c); + newCat.commands.push_back(c); - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" Pattern Editor - Effect Parameter Column", kCtxViewPatternsFXparam); for(int c = kcSetFXParam0; c <= kcSetFXParamF; c++) - newCat.commands.Add(c); - commandCategories.Add(newCat); + newCat.commands.push_back(c); + commandCategories.push_back(newCat); } { CommandCategory newCat(" Sample [Top]", kCtxCtrlSamples); - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" Sample Editor", kCtxViewSamples); for(int c = kcStartSampleEditing; c <= kcEndSampleEditing; c++) - newCat.commands.Add(c); - newCat.separators.Add(kcEndSampleEditing); //-------------------------------------- + newCat.commands.push_back(c); + newCat.separators.push_back(kcEndSampleEditing); //-------------------------------------- for(int c = kcStartSampleMisc; c <= kcEndSampleMisc; c++) - newCat.commands.Add(c); + newCat.commands.push_back(c); - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" Instrument Editor", kCtxCtrlInstruments); for(int c = kcStartInstrumentCtrlMisc; c <= kcEndInstrumentCtrlMisc; c++) - newCat.commands.Add(c); + newCat.commands.push_back(c); - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" Envelope Editor", kCtxViewInstruments); for(int c = kcStartInstrumentMisc; c <= kcEndInstrumentMisc; c++) - newCat.commands.Add(c); + newCat.commands.push_back(c); - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" Comments [Top]", kCtxCtrlComments); - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" Comments [Bottom]", kCtxViewComments); - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } { CommandCategory newCat(" Plugin Editor", kCtxVSTGUI); for(int c = kcStartVSTGUICommands; c <= kcEndVSTGUICommands; c++) - newCat.commands.Add(c); + newCat.commands.push_back(c); - commandCategories.Add(newCat); + commandCategories.push_back(newCat); } } @@ -497,7 +498,7 @@ { // We will search in all categories firstCat = 0; - lastCat = commandCategories.GetSize() - 1; + lastCat = commandCategories.size() - 1; } CommandID curCommand = static_cast<CommandID>(m_lbnCommandKeys.GetItemData( m_lbnCommandKeys.GetCurSel())); @@ -508,7 +509,7 @@ // When searching, we also add the category names to the list. bool addCategoryName = (firstCat != lastCat); - for(int cmd = 0; cmd < commandCategories[cat].commands.GetSize(); cmd++) + for(size_t cmd = 0; cmd < commandCategories[cat].commands.size(); cmd++) { CommandID com = (CommandID)commandCategories[cat].commands[cmd]; @@ -934,9 +935,9 @@ int COptionsKeyboard::GetCategoryFromCommandID(CommandID command) const //--------------------------------------------------------------------- { - for(int cat = 0; cat < commandCategories.GetSize(); cat++) + for(size_t cat = 0; cat < commandCategories.size(); cat++) { - for(int cmd = 0; cmd < commandCategories[cat].commands.GetSize(); cmd++) + for(size_t cmd = 0; cmd < commandCategories[cat].commands.size(); cmd++) { if(commandCategories[cat].commands[cmd] == command) { Modified: trunk/OpenMPT/mptrack/KeyConfigDlg.h =================================================================== --- trunk/OpenMPT/mptrack/KeyConfigDlg.h 2014-07-19 16:46:30 UTC (rev 4187) +++ trunk/OpenMPT/mptrack/KeyConfigDlg.h 2014-07-19 21:08:07 UTC (rev 4188) @@ -17,52 +17,29 @@ OPENMPT_NAMESPACE_BEGIN -// Might promote to class so we can add rules +// Might promote to class so we can add rules // (eg automatically do note off stuff, generate chord keybindings from notes based just on modifier. // Would need GUI rules too as options would be different for each category -class CommandCategory +class CommandCategory { public: - CommandCategory(CString n, InputTargetContext d) - { - CommandCategory(); - name=n; - id=d; - } - + CommandCategory(CString n, InputTargetContext d) : name(n), id(d) { } - //copy constructor; necessary if we want to use arrays of this class - CommandCategory(const CommandCategory © ) + bool separatorAt(int c) const { - name = copy.name; - id = copy.id; - commands.Copy(copy.commands); - separators.Copy(copy.separators); - } - void operator=(const CommandCategory& copy) - { - name = copy.name; - id = copy.id; - commands.Copy(copy.commands); - separators.Copy(copy.separators); - } - bool separatorAt(int c) - { - for (int p=0; p<separators.GetSize(); p++) + for(std::vector<int>::const_iterator i = separators.begin(); i != separators.end(); i++) { - if (separators[p]==c) + if (*i == c) return true; } return false; } - CommandCategory() {}; - ~CommandCategory() {}; CString name; InputTargetContext id; - CArray<int> separators; - CArray<int> commands; + std::vector<int> separators; + std::vector<int> commands; }; @@ -120,7 +97,7 @@ public: COptionsKeyboard() : CPropertyPage(IDD_OPTIONS_KEYBOARD), m_eCustHotKey(false), m_eFindHotKey(true), m_nKeyboardCfg(0) { } BOOL SetKey(UINT nId, UINT nChar, UINT nFlags); - CArray<CommandCategory, CommandCategory> commandCategories; + std::vector<CommandCategory> commandCategories; void DefineCommandCategories(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-08-18 12:57:04
|
Revision: 4207 http://sourceforge.net/p/modplug/code/4207 Author: saga-games Date: 2014-08-18 12:56:55 +0000 (Mon, 18 Aug 2014) Log Message: ----------- [Imp] Instrument tab: In the sample map editor, show faint red dots for notes that are already assigned to another sample (http://forum.openmpt.org/index.php?topic=4112.msg37495#msg37495) Modified Paths: -------------- trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp trunk/OpenMPT/mptrack/dlg_misc.cpp trunk/OpenMPT/mptrack/dlg_misc.h Modified: trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp =================================================================== --- trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp 2014-08-16 16:12:00 UTC (rev 4206) +++ trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp 2014-08-18 12:56:55 UTC (rev 4207) @@ -1269,11 +1269,11 @@ } for(UINT i = 0; i < 2 * 12; i++) { - UINT b = 0; - if(i == note) b = 1; - else if(chord.notes[0] && i + 1 == chord.notes[0]) b = 1; - else if(chord.notes[1] && i + 1 == chord.notes[1]) b = 1; - else if(chord.notes[2] && i + 1 == chord.notes[2]) b = 1; + UINT b = CKeyboardControl::KEYFLAG_NORMAL; + if(i == note) b = CKeyboardControl::KEYFLAG_REDDOT; + else if(chord.notes[0] && i + 1 == chord.notes[0]) b = CKeyboardControl::KEYFLAG_REDDOT; + else if(chord.notes[1] && i + 1 == chord.notes[1]) b = CKeyboardControl::KEYFLAG_REDDOT; + else if(chord.notes[2] && i + 1 == chord.notes[2]) b = CKeyboardControl::KEYFLAG_REDDOT; m_Keyboard.SetFlags(i, b); } m_Keyboard.InvalidateRect(NULL, FALSE); Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp =================================================================== --- trunk/OpenMPT/mptrack/dlg_misc.cpp 2014-08-16 16:12:00 UTC (rev 4206) +++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2014-08-18 12:56:55 UTC (rev 4207) @@ -634,14 +634,15 @@ CRect rcClient, rect; CPaintDC dc(this); HDC hdc = dc.m_hDC; - HBRUSH brushRed; + HBRUSH brushDot[2]; if (!m_nOctaves) m_nOctaves = 1; GetClientRect(&rcClient); rect = rcClient; oldpen = ::SelectObject(hdc, CMainFrame::penBlack); oldbrush = ::SelectObject(hdc, CMainFrame::brushWhite); - brushRed = ::CreateSolidBrush(RGB(0xFF, 0, 0)); + brushDot[0] = ::CreateSolidBrush(RGB(0xFF, 0, 0)); + brushDot[1] = ::CreateSolidBrush(RGB(0xFF, 0xC0, 0xC0)); // White notes for (UINT note=0; note<m_nOctaves*7; note++) { @@ -650,9 +651,9 @@ if (val == m_nSelection) ::SelectObject(hdc, CMainFrame::brushGray); dc.Rectangle(&rect); if (val == m_nSelection) ::SelectObject(hdc, CMainFrame::brushWhite); - if ((val < NOTE_MAX) && (KeyFlags[val])) + if (val < NOTE_MAX && KeyFlags[val] != KEYFLAG_NORMAL && KeyFlags[val] < KEYFLAG_MAX) { - ::SelectObject(hdc, brushRed); + ::SelectObject(hdc, brushDot[KeyFlags[val] - 1]); dc.Ellipse(rect.left+2, rect.bottom - (rect.right-rect.left) + 2, rect.right-2, rect.bottom-2); ::SelectObject(hdc, CMainFrame::brushWhite); } @@ -681,9 +682,9 @@ if (val == m_nSelection) ::SelectObject(hdc, CMainFrame::brushGray); dc.Rectangle(&rect); if (val == m_nSelection) ::SelectObject(hdc, CMainFrame::brushBlack); - if ((val < NOTE_MAX) && (KeyFlags[val])) + if (val < NOTE_MAX && KeyFlags[val] != KEYFLAG_NORMAL && KeyFlags[val] < KEYFLAG_MAX) { - ::SelectObject(hdc, brushRed); + ::SelectObject(hdc, brushDot[KeyFlags[val] - 1]); dc.Ellipse(rect.left, rect.bottom - (rect.right-rect.left), rect.right, rect.bottom); ::SelectObject(hdc, CMainFrame::brushBlack); } @@ -693,6 +694,10 @@ } if (oldpen) ::SelectObject(hdc, oldpen); if (oldbrush) ::SelectObject(hdc, oldbrush); + for(int i = 0; i < CountOf(brushDot); i++) + { + DeleteBrush(brushDot[i]); + } } @@ -937,7 +942,9 @@ { UINT nOld = m_Keyboard.GetFlags(iNote); UINT ndx = nBaseOctave*12+iNote; - UINT nNew = (KeyboardMap[ndx] == nSample) ? CKeyboardControl::KEYFLAG_REDDOT : CKeyboardControl::KEYFLAG_NORMAL; + UINT nNew = CKeyboardControl::KEYFLAG_NORMAL; + if(KeyboardMap[ndx] == nSample) nNew = CKeyboardControl::KEYFLAG_REDDOT; + else if(KeyboardMap[ndx] != 0) nNew = CKeyboardControl::KEYFLAG_BRIGHTDOT; if (nNew != nOld) { m_Keyboard.SetFlags(iNote, nNew); Modified: trunk/OpenMPT/mptrack/dlg_misc.h =================================================================== --- trunk/OpenMPT/mptrack/dlg_misc.h 2014-08-16 16:12:00 UTC (rev 4206) +++ trunk/OpenMPT/mptrack/dlg_misc.h 2014-08-18 12:56:55 UTC (rev 4207) @@ -141,6 +141,8 @@ { KEYFLAG_NORMAL=0, KEYFLAG_REDDOT, + KEYFLAG_BRIGHTDOT, + KEYFLAG_MAX }; protected: HWND m_hParent; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-09-03 15:34:12
|
Revision: 4236 http://sourceforge.net/p/modplug/code/4236 Author: saga-games Date: 2014-09-03 15:33:53 +0000 (Wed, 03 Sep 2014) Log Message: ----------- [Imp] When adding a new shortcut that conflicts with an existing shortcut, do not automatically delete the existing shortcut but rather ask the user what to do. Modified Paths: -------------- trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/CommandSet.h trunk/OpenMPT/mptrack/KeyConfigDlg.cpp Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2014-09-02 17:03:37 UTC (rev 4235) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2014-09-03 15:33:53 UTC (rev 4236) @@ -700,11 +700,10 @@ { CString report= ""; - KeyCombination curKc; //Avoid duplicate for(size_t k = 0; k < commands[cmd].kcList.size(); k++) { - curKc=commands[cmd].kcList[k]; + KeyCombination curKc=commands[cmd].kcList[k]; if (curKc==kc) { //cm'ed out for perf @@ -712,38 +711,27 @@ return ""; } } + //Check that this keycombination isn't already assigned (in this context), except for dummy keys - for (int curCmd=0; curCmd<kcNumCommands; curCmd++) - { //search all commands - if (IsDummyCommand(cmd)) // no need to search if we are adding a dummy key - break; - if (IsDummyCommand((CommandID)curCmd)) //no need to check against a dummy key - continue; - for(size_t k = 0; k < commands[curCmd].kcList.size(); k++) - { //search all keys for curCommand - curKc=commands[curCmd].kcList[k]; - bool crossContext=false; - if (KeyCombinationConflict(curKc, kc, crossContext)) + std::pair<CommandID, KeyCombination> conflictCmd; + if((conflictCmd = IsConflicting(kc, cmd)).first != kcNull) + { + if (!overwrite) + { + //cm'ed out for perf + //Log("Not adding key: already exists and overwrite disabled\n"); + return ""; + } else + { + if (IsCrossContextConflict(kc, conflictCmd.second)) { - if (!overwrite) - { - //cm'ed out for perf - //Log("Not adding key: already exists and overwrite disabled\n"); - return ""; - } - else - { - if (crossContext) - { - report += "Warning! the following commands may conflict:\r\n >" + GetCommandText((CommandID)curCmd) + " in " + curKc.GetContextText() + "\r\n >" + GetCommandText((CommandID)cmd) + " in " + kc.GetContextText() + "\r\n\r\n"; - Log("%s", report); - } else - { - Remove(curKc, (CommandID)curCmd); - report += "Removed due to conflict in same context:\r\n >" + GetCommandText((CommandID)curCmd) + " in " + curKc.GetContextText() + "\r\n\r\n"; - Log("%s", report); - } - } + report += "Warning! the following commands may conflict:\r\n >" + GetCommandText(conflictCmd.first) + " in " + conflictCmd.second.GetContextText() + "\r\n >" + GetCommandText(cmd) + " in " + kc.GetContextText() + "\r\n\r\n"; + Log("%s", report); + } else + { + Remove(conflictCmd.second, conflictCmd.first); + report += "Removed due to conflict in same context:\r\n >" + GetCommandText(conflictCmd.first) + " in " + conflictCmd.second.GetContextText() + "\r\n\r\n"; + Log("%s", report); } } } @@ -758,9 +746,33 @@ } -bool CCommandSet::IsDummyCommand(CommandID cmd) -//--------------------------------------------- +std::pair<CommandID, KeyCombination> CCommandSet::IsConflicting(KeyCombination kc, CommandID cmd) const +//----------------------------------------------------------------------------------------------------- { + if(IsDummyCommand(cmd)) // no need to search if we are adding a dummy key + return std::pair<CommandID, KeyCombination>(kcNull, KeyCombination()); + + for(int curCmd = 0; curCmd < kcNumCommands; curCmd++) + { + if(curCmd == cmd || IsDummyCommand((CommandID)curCmd)) + continue; + + for(size_t k = 0; k < commands[curCmd].kcList.size(); k++) + { + const KeyCombination &curKc = commands[curCmd].kcList[k]; + if(KeyCombinationConflict(curKc, kc)) + { + return std::pair<CommandID, KeyCombination>((CommandID)curCmd, curKc); + } + } + } + return std::pair<CommandID, KeyCombination>(kcNull, KeyCombination()); +} + + +bool CCommandSet::IsDummyCommand(CommandID cmd) const +//--------------------------------------------------- +{ // e.g. Chord modifier is a dummy command, which serves only to automatically // generate a set of keycombinations for chords (I'm not proud of this design). return commands[cmd].isDummy; @@ -1686,8 +1698,8 @@ //Could do better search algo but this is not perf critical. -int CCommandSet::FindCmd(int uid) -//------------------------------- +int CCommandSet::FindCmd(int uid) const +//------------------------------------- { for (int i=0; i<kcNumCommands; i++) { @@ -1971,21 +1983,27 @@ } -bool CCommandSet::KeyCombinationConflict(KeyCombination kc1, KeyCombination kc2, bool &crossCxtConflict) +bool CCommandSet::KeyCombinationConflict(KeyCombination kc1, KeyCombination kc2) const { - bool modConflict = (kc1.Modifier()==kc2.Modifier()); - bool codeConflict = (kc1.KeyCode()==kc2.KeyCode()); - bool eventConflict = ((kc1.EventType()&kc2.EventType())!=0); - bool ctxConflict = (kc1.Context() == kc2.Context()); - crossCxtConflict = m_isParentContext[kc1.Context()][kc2.Context()] || m_isParentContext[kc2.Context()][kc1.Context()]; + bool modConflict = (kc1.Modifier()==kc2.Modifier()); + bool codeConflict = (kc1.KeyCode()==kc2.KeyCode()); + bool eventConflict = ((kc1.EventType()&kc2.EventType())!=0); + bool ctxConflict = (kc1.Context() == kc2.Context()); + bool crossCxtConflict = m_isParentContext[kc1.Context()][kc2.Context()] || m_isParentContext[kc2.Context()][kc1.Context()]; - bool conflict = modConflict && codeConflict && eventConflict && (ctxConflict || crossCxtConflict); return conflict; } + +bool CCommandSet::IsCrossContextConflict(KeyCombination kc1, KeyCombination kc2) const +//------------------------------------------------------------------------------------ +{ + return m_isParentContext[kc1.Context()][kc2.Context()] || m_isParentContext[kc2.Context()][kc1.Context()]; +} + //end rewbs.customKeys Modified: trunk/OpenMPT/mptrack/CommandSet.h =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.h 2014-09-02 17:03:37 UTC (rev 4235) +++ trunk/OpenMPT/mptrack/CommandSet.h 2014-09-03 15:33:53 UTC (rev 4236) @@ -1151,7 +1151,7 @@ struct KeyCombination { protected: - uint8 ctx; + uint8 ctx; // TODO: This should probably rather be a member of CommandStruct and not of the individual key combinations for consistency's sake. uint8 mod; uint8 code; uint8 event; @@ -1179,6 +1179,7 @@ { size_t operator() (const KeyCombination &kc) const { + STATIC_ASSERT(sizeof(KeyCombination) == sizeof(uint32)); return *reinterpret_cast<const uint32 *>(&kc); } }; @@ -1274,11 +1275,11 @@ inline void DefineKeyCommand(CommandID kc, UINT uid, const TCHAR *message, enmKcVisibility visible = kcVisible, enmKcDummy dummy = kcNoDummy); void SetupCommands(); void SetupContextHierarchy(); - bool IsDummyCommand(CommandID cmd); + bool IsDummyCommand(CommandID cmd) const; CString EnforceAll(KeyCombination kc, CommandID cmd, bool adding); - int FindCmd(int uid); - bool KeyCombinationConflict(KeyCombination kc1, KeyCombination kc2, bool &crossCxtConflict); + int FindCmd(int uid) const; + bool KeyCombinationConflict(KeyCombination kc1, KeyCombination kc2) const; const CModSpecifications *oldSpecs; CommandStruct commands[kcNumCommands]; @@ -1294,6 +1295,9 @@ CString Remove(KeyCombination kc, CommandID cmd); CString Remove(int pos, CommandID cmd); + std::pair<CommandID, KeyCombination> IsConflicting(KeyCombination kc, CommandID cmd) const; + bool IsCrossContextConflict(KeyCombination kc1, KeyCombination kc2) const; + //Tranformation bool QuickChange_SetEffects(const CModSpecifications &modSpecs); bool QuickChange_NotesRepeat(); Modified: trunk/OpenMPT/mptrack/KeyConfigDlg.cpp =================================================================== --- trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2014-09-02 17:03:37 UTC (rev 4235) +++ trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2014-09-03 15:33:53 UTC (rev 4236) @@ -767,7 +767,6 @@ void COptionsKeyboard::OnSetKeyChoice() //------------------------------------- { - CString report, reportHistory; CommandID cmd = (CommandID)m_nCurHotKey; if (cmd<0) { @@ -799,17 +798,39 @@ kc.EventType(kKeyEventDown); } - //process valid input - plocalCmdSet->Remove(m_nCurKeyChoice, cmd); - report = plocalCmdSet->Add(kc, cmd, true, m_nCurKeyChoice); + bool add = true; + std::pair<CommandID, KeyCombination> conflictCmd; + if((conflictCmd = plocalCmdSet->IsConflicting(kc, cmd)).first != kcNull + && !plocalCmdSet->IsCrossContextConflict(kc, conflictCmd.second) + && Reporting::Confirm("New shortcut (" + kc.GetKeyText() + ") conflicts with " + plocalCmdSet->GetCommandText(conflictCmd.first) + " in " + conflictCmd.second.GetContextText() + ".\nDelete the other shortcut and keep the new one?", "Shortcut Conflict") == cnfNo) + { + // Restore original choice + add = false; + if(m_nCurKeyChoice >= 0 && m_nCurKeyChoice < plocalCmdSet->GetKeyListSize(cmd)) + { + KeyCombination origKc = plocalCmdSet->GetKey(cmd, m_nCurKeyChoice); + m_eCustHotKey.SetKey(origKc.Modifier(), origKc.KeyCode()); + } else + { + m_eCustHotKey.SetWindowText(_T("")); + } + } - //Update log - m_eReport.GetWindowText(reportHistory); - //reportHistory = reportHistory.Mid(6,reportHistory.GetLength()-1); - m_eReport.SetWindowText(report + reportHistory); + if(add) + { + CString report, reportHistory; + //process valid input + plocalCmdSet->Remove(m_nCurKeyChoice, cmd); + report = plocalCmdSet->Add(kc, cmd, true, m_nCurKeyChoice); - ForceUpdateGUI(); - m_bModified=false; + //Update log + m_eReport.GetWindowText(reportHistory); + //reportHistory = reportHistory.Mid(6,reportHistory.GetLength()-1); + m_eReport.SetWindowText(report + reportHistory); + ForceUpdateGUI(); + } + + m_bModified = false; return; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-09-12 13:50:18
|
Revision: 4287 http://sourceforge.net/p/modplug/code/4287 Author: saga-games Date: 2014-09-12 13:50:07 +0000 (Fri, 12 Sep 2014) Log Message: ----------- [Imp] Song Cleanup: Find samples with identical stereo channels and offer to optimize them to mono. Modified Paths: -------------- trunk/OpenMPT/mptrack/CleanupSong.cpp trunk/OpenMPT/mptrack/mptrack.rc Modified: trunk/OpenMPT/mptrack/CleanupSong.cpp =================================================================== --- trunk/OpenMPT/mptrack/CleanupSong.cpp 2014-09-12 13:37:35 UTC (rev 4286) +++ trunk/OpenMPT/mptrack/CleanupSong.cpp 2014-09-12 13:50:07 UTC (rev 4287) @@ -534,13 +534,30 @@ } +// Check if the stereo channels of a sample contain identical data +template<typename T> +static bool ComapreStereoChannels(SmpLength length, const void *sampleData) +//-------------------------------------------------------- +{ + const T *data = static_cast<const T *>(sampleData); + for(SmpLength i = 0; i < length; i++, data += 2) + { + if(data[0] != data[1]) + { + return false; + } + } + return true; +} + // Remove unused sample data bool CModCleanupDlg::OptimizeSamples() //------------------------------------ { CSoundFile &sndFile = modDoc.GetrSoundFile(); - SAMPLEINDEX numLoopOpt = 0; + SAMPLEINDEX numLoopOpt = 0, numStereoOpt = 0; + std::vector<bool> stereoOptSamples(sndFile.GetNumSamples(), false); for(SAMPLEINDEX smp = 1; smp <= sndFile.GetNumSamples(); smp++) { @@ -557,48 +574,88 @@ } } + // Check if the sample contains identical stereo channels + if(sample.GetNumChannels() == 2) + { + bool identicalChannels = false; + if(sample.GetElementarySampleSize() == 1) + { + identicalChannels = ComapreStereoChannels<int8>(loopLength, sample.pSample); + } else if(sample.GetElementarySampleSize() == 2) + { + identicalChannels = ComapreStereoChannels<int16>(loopLength, sample.pSample); + } + if(identicalChannels) + { + numStereoOpt++; + stereoOptSamples[smp - 1] = true; + } + } + if(sample.pSample && sample.nLength > loopLength + 2) numLoopOpt++; } - if (numLoopOpt == 0) return false; + if(!numLoopOpt && !numStereoOpt) return false; - char s[512]; - wsprintf(s, "%d sample%s unused data after the loop end point,\n" - "Do you want to optimize %s and remove this unused data?", numLoopOpt, (numLoopOpt == 1) ? " has" : "s have", (numLoopOpt == 1) ? "it" : "them"); - if(Reporting::Confirm(s, "Sample Optimization", false, false, this) == cnfYes) + std::string s; + if(numLoopOpt) + s = mpt::String::Print("%1 sample%2 unused data after the loop end point.\n", numLoopOpt, (numLoopOpt == 1) ? " has" : "s have"); + if(numStereoOpt) + s += mpt::String::Print("%1 stereo sample%2 actually mono.\n", numStereoOpt, (numStereoOpt == 1) ? " is" : "s are"); + if(numLoopOpt + numStereoOpt == 1) + s += "Do you want to optimize it and remove this unused data?"; + else + s += "Do you want to optimize them and remove this unused data?"; + + if(Reporting::Confirm(s.c_str(), "Sample Optimization", false, false, this) != cnfYes) { - for(SAMPLEINDEX nSmp = 1; nSmp <= sndFile.m_nSamples; nSmp++) + return false; + } + + for(SAMPLEINDEX smp = 1; smp <= sndFile.m_nSamples; smp++) + { + ModSample &sample = sndFile.GetSample(smp); + + // Determine how much of the sample will be played + SmpLength loopLength = sample.nLength; + if(sample.uFlags[CHN_LOOP]) { - ModSample &sample = sndFile.GetSample(nSmp); + loopLength = sample.nLoopEnd; - // Determine how much of the sample will be played - SmpLength loopLength = sample.nLength; - if(sample.uFlags[CHN_LOOP]) + // Sustain loop is played before normal loop, and it can actually be located after the normal loop. + if(sample.uFlags[CHN_SUSTAINLOOP]) { - loopLength = sample.nLoopEnd; - - // Sustain loop is played before normal loop, and it can actually be located after the normal loop. - if(sample.uFlags[CHN_SUSTAINLOOP]) - { - loopLength = std::max(sample.nLoopEnd, sample.nSustainEnd); - } + loopLength = std::max(sample.nLoopEnd, sample.nSustainEnd); } + } - if(sample.nLength > loopLength + 2) + if(sample.nLength > loopLength + 2) + { + SmpLength lmax = loopLength + 2; + if(lmax < sample.nLength && lmax >= 2) { - SmpLength lmax = loopLength + 2; - if(lmax < sample.nLength && lmax >= 2) - { - modDoc.GetSampleUndo().PrepareUndo(nSmp, sundo_delete, "Trim Unused Data", lmax, sample.nLength); - ctrlSmp::ResizeSample(sample, lmax, sndFile); - } + modDoc.GetSampleUndo().PrepareUndo(smp, sundo_delete, "Trim Unused Data", lmax, sample.nLength); + ctrlSmp::ResizeSample(sample, lmax, sndFile); } } - wsprintf(s, "%d sample loop%s optimized" ,numLoopOpt, (numLoopOpt == 1) ? "" : "s"); + + // Convert stereo samples with identical channels to mono + if(stereoOptSamples[smp - 1]) + { + modDoc.GetSampleUndo().PrepareUndo(smp, sundo_replace, "Mono Conversion"); + ctrlSmp::ConvertToMono(sample, sndFile, ctrlSmp::onlyLeft); + } + } + if(numLoopOpt) + { + s = mpt::String::Print("%1 sample loop%2 optimized", numLoopOpt, (numLoopOpt == 1) ? "" : "s"); modDoc.AddToLog(s); - return true; } - - return false; + if(numStereoOpt) + { + s = mpt::String::Print("%1 sample%2 converted to mono", numStereoOpt, (numStereoOpt == 1) ? "" : "s"); + modDoc.AddToLog(s); + } + return true; } // Rearrange sample list Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2014-09-12 13:37:35 UTC (rev 4286) +++ trunk/OpenMPT/mptrack/mptrack.rc 2014-09-12 13:50:07 UTC (rev 4287) @@ -39,7 +39,7 @@ CONTROL "Remove unused",IDC_CHK_CLEANUP_SAMPLES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,54,90,10 CONTROL "Remove all",IDC_CHK_REMOVE_SAMPLES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,204,54,90,10 CONTROL "Rearrange",IDC_CHK_REARRANGE_SAMPLES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,66,90,10 - CONTROL "Remove data after loop end",IDC_CHK_OPTIMIZE_SAMPLES, + CONTROL "Remove unused sample data",IDC_CHK_OPTIMIZE_SAMPLES, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,204,66,108,10 CONTROL "Remove unused",IDC_CHK_CLEANUP_INSTRUMENTS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,84,90,10 CONTROL "Remove all (convert to samples)",IDC_CHK_REMOVE_INSTRUMENTS, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-09-12 23:51:38
|
Revision: 4288 http://sourceforge.net/p/modplug/code/4288 Author: saga-games Date: 2014-09-12 23:51:31 +0000 (Fri, 12 Sep 2014) Log Message: ----------- [Mod] Remove pretty pointless critical section in effect visualisation. [Imp] Cleanup: Give information about how many plugins were removed. Modified Paths: -------------- trunk/OpenMPT/mptrack/CleanupSong.cpp trunk/OpenMPT/mptrack/EffectVis.cpp Modified: trunk/OpenMPT/mptrack/CleanupSong.cpp =================================================================== --- trunk/OpenMPT/mptrack/CleanupSong.cpp 2014-09-12 13:50:07 UTC (rev 4287) +++ trunk/OpenMPT/mptrack/CleanupSong.cpp 2014-09-12 23:51:31 UTC (rev 4288) @@ -705,7 +705,7 @@ } } else { - Reporting::Information("Samples associated with an used instrument won't be removed in IT Project files.", "Removing unused instruments", this); + modDoc.AddToLog("Samples associated with an used instrument won't be removed in IT Project files."); } BeginWaitCursor(); @@ -820,9 +820,15 @@ } - UINT nRemoved = modDoc.RemovePlugs(usedmap); - - return (nRemoved > 0); + PLUGINDEX numRemoved = modDoc.RemovePlugs(usedmap); + if(numRemoved != 0) + { + char s[64]; + wsprintf(s, "%d unused plugin%s removed", numRemoved, (numRemoved == 1) ? "" : "s"); + modDoc.AddToLog(s); + return true; + } + return false; } @@ -832,7 +838,7 @@ { CSoundFile &sndFile = modDoc.GetrSoundFile(); - if(Reporting::Confirm(TEXT("WARNING: OpenMPT will convert the module to IT format and reset all song, sample and instrument attributes to default values. Continue?"), TEXT("Resetting variables"), false, false, this) == cnfNo) + if(Reporting::Confirm(_T("OpenMPT will convert the module to IT format and reset all song, sample and instrument attributes to default values. Continue?"), TEXT("Resetting variables"), false, false, this) == cnfNo) return false; // Stop play. Modified: trunk/OpenMPT/mptrack/EffectVis.cpp =================================================================== --- trunk/OpenMPT/mptrack/EffectVis.cpp 2014-09-12 13:50:07 UTC (rev 4287) +++ trunk/OpenMPT/mptrack/EffectVis.cpp 2014-09-12 23:51:31 UTC (rev 4288) @@ -113,8 +113,7 @@ if (m.IsPcNote()) { paramValue = m.GetValueEffectCol(); - } - else + } else { paramValue = m.param; } @@ -135,14 +134,12 @@ if (IsPcNote(row)) { uint16 param = ScreenYToPCParam(y); - CriticalSection cs; m.SetValueEffectCol(param); } else { ModCommand::PARAM param = ScreenYToFXParam(y); // Cap the parameter value as appropriate, based on effect type (e.g. Zxx gets capped to [0x00,0x7F]) effectInfo.GetEffectFromIndex(effectInfo.GetIndexFromEffect(m.command, param), param); - CriticalSection cs; m.param = param; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-09-15 14:51:32
|
Revision: 4291 http://sourceforge.net/p/modplug/code/4291 Author: saga-games Date: 2014-09-15 14:51:24 +0000 (Mon, 15 Sep 2014) Log Message: ----------- [Imp] Instrument tab: Since IT's fadeout value is 32 times less precise than what is displayed in the editor, automatically round it when the user makes adjustments. Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_ins.cpp trunk/OpenMPT/mptrack/Ctrl_ins.h Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2014-09-14 23:48:51 UTC (rev 4290) +++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2014-09-15 14:51:24 UTC (rev 4291) @@ -807,6 +807,7 @@ ON_EN_CHANGE(IDC_EDIT_PITCHTEMPOLOCK, OnEnChangeEditPitchtempolock) ON_BN_CLICKED(IDC_CHECK_PITCHTEMPOLOCK, OnBnClickedCheckPitchtempolock) ON_EN_KILLFOCUS(IDC_EDIT_PITCHTEMPOLOCK, OnEnKillfocusEditPitchtempolock) + ON_EN_KILLFOCUS(IDC_EDIT7, OnEnKillfocusEditFadeOut) END_MESSAGE_MAP() void CCtrlInstruments::DoDataExchange(CDataExchange* pDX) @@ -1181,6 +1182,13 @@ m_SpinFadeOut.EnableWindow(bITandXM); m_SpinFadeOut.SetRange(0, extendedFadeoutRange ? 32767 : 8192); m_EditFadeOut.SetLimitText(extendedFadeoutRange ? 5 : 4); + // XM-style fade-out is 32 times more precise than IT + UDACCEL accell[2]; + accell[0].nSec = 0; + accell[0].nInc = (m_sndFile.GetType() == MOD_TYPE_IT ? 32 : 1); + accell[1].nSec = 2; + accell[1].nInc = 5 * accell[0].nInc; + m_SpinFadeOut.SetAccel(CountOf(accell), accell); // Panning ranges (0...64 for IT, 0...256 for MPTM) m_SpinPanning.SetRange(0, (m_sndFile.GetType() & MOD_TYPE_IT) ? 64 : 256); @@ -2462,7 +2470,7 @@ } } -//rewbs.instroVSTi + void CCtrlInstruments::TogglePluginEditor() //---------------------------------------- { @@ -2471,8 +2479,8 @@ m_modDoc.TogglePluginEditor(m_CbnMixPlug.GetItemData(m_CbnMixPlug.GetCurSel())-1); } } -//end rewbs.instroVSTi + //rewbs.customKeys BOOL CCtrlInstruments::PreTranslateMessage(MSG *pMsg) //----------------------------------------------- @@ -2807,6 +2815,23 @@ } +void CCtrlInstruments::OnEnKillfocusEditFadeOut() +//----------------------------------------------- +{ + if(IsLocked() || !m_nInstrument || !m_sndFile.Instruments[m_nInstrument]) return; + + if(m_modDoc.GetModType() == MOD_TYPE_IT) + { + BOOL success; + uint32 fadeout = (GetDlgItemInt(IDC_EDIT7, &success, FALSE) + 16) & ~31; + if(success && fadeout != m_sndFile.Instruments[m_nInstrument]->nFadeOut) + { + SetDlgItemInt(IDC_EDIT7, fadeout, FALSE); + } + } +} + + void CCtrlInstruments::BuildTuningComboBox() //------------------------------------------ { @@ -2834,7 +2859,6 @@ void CCtrlInstruments::UpdatePluginList() //--------------------------------------- { - //Update plugin list m_CbnMixPlug.Clear(); m_CbnMixPlug.ResetContent(); CHAR s[64]; Modified: trunk/OpenMPT/mptrack/Ctrl_ins.h =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.h 2014-09-14 23:48:51 UTC (rev 4290) +++ trunk/OpenMPT/mptrack/Ctrl_ins.h 2014-09-15 14:51:24 UTC (rev 4291) @@ -192,6 +192,7 @@ afx_msg void OnEnChangeEditPitchtempolock(); afx_msg void OnBnClickedCheckPitchtempolock(); afx_msg void OnEnKillfocusEditPitchtempolock(); + afx_msg void OnEnKillfocusEditFadeOut(); //}}AFX_MSG DECLARE_MESSAGE_MAP() }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-09-16 07:52:40
|
Revision: 4295 http://sourceforge.net/p/modplug/code/4295 Author: manxorist Date: 2014-09-16 07:52:30 +0000 (Tue, 16 Sep 2014) Log Message: ----------- [Fix] Soundcard settings: Disable channel mapping label if channel mapping is not supported by the selected device. Modified Paths: -------------- trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/mptrack/resource.h Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2014-09-16 07:18:21 UTC (rev 4294) +++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2014-09-16 07:52:30 UTC (rev 4295) @@ -491,6 +491,7 @@ //-------------------------------------------- { int usedChannels = m_CbnChannels.GetItemData(m_CbnChannels.GetCurSel()); + GetDlgItem(IDC_STATIC_CHANNELMAPPING)->EnableWindow(m_CurrentDeviceCaps.CanChannelMapping ? TRUE : FALSE); for(int mch = 0; mch < NUM_CHANNELCOMBOBOXES; mch++) // Host channels { CStatic *statictext = &m_StaticChannelMapping[mch]; Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2014-09-16 07:18:21 UTC (rev 4294) +++ trunk/OpenMPT/mptrack/mptrack.rc 2014-09-16 07:52:30 UTC (rev 4295) @@ -1343,7 +1343,7 @@ CONTROL "Use device &exclusively",IDC_CHECK4,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,54,90,12 CONTROL "&Boost thread priority",IDC_CHECK5,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,108,72,90,12 CONTROL "&Hardware timing",IDC_CHECK9,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,204,72,72,12 - LTEXT "Channel &Mapping:",IDC_STATIC,12,108,60,12,SS_CENTERIMAGE + LTEXT "Channel &Mapping:",IDC_STATIC_CHANNELMAPPING,12,108,60,12,SS_CENTERIMAGE CTEXT "Front Left",IDC_STATIC_CHANNEL_FRONTLEFT,78,108,48,12,SS_CENTERIMAGE,WS_EX_STATICEDGE COMBOBOX IDC_COMBO_CHANNEL_FRONTLEFT,132,108,144,72,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CTEXT "Front Right",IDC_STATIC_CHANNEL_FRONTRIGHT,78,126,48,12,SS_CENTERIMAGE,WS_EX_STATICEDGE Modified: trunk/OpenMPT/mptrack/resource.h =================================================================== --- trunk/OpenMPT/mptrack/resource.h 2014-09-16 07:18:21 UTC (rev 4294) +++ trunk/OpenMPT/mptrack/resource.h 2014-09-16 07:52:30 UTC (rev 4295) @@ -963,6 +963,7 @@ #define IDC_COMBO_CHANNEL_REARLEFT 2477 #define IDC_COMBO_CHANNEL_REARRIGHT 2478 #define IDC_SCANTEXT 2479 +#define IDC_STATIC_CHANNELMAPPING 2480 #define ID_FILE_NEWMOD 32771 #define ID_FILE_NEWXM 32772 #define ID_FILE_NEWS3M 32773 @@ -1246,7 +1247,7 @@ #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 537 #define _APS_NEXT_COMMAND_VALUE 44644 -#define _APS_NEXT_CONTROL_VALUE 2480 +#define _APS_NEXT_CONTROL_VALUE 2481 #define _APS_NEXT_SYMED_VALUE 901 #endif #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-09-28 08:55:22
|
Revision: 4317 http://sourceforge.net/p/modplug/code/4317 Author: manxorist Date: 2014-09-28 08:55:05 +0000 (Sun, 28 Sep 2014) Log Message: ----------- [Ref] Replace all trivial occurences of mpt::String::Format with typesafe mpt::String::Print. [Fix] Fix format type bug in the lame based mp3 stream encoder error reporting. Modified Paths: -------------- trunk/OpenMPT/mptrack/CleanupSong.cpp trunk/OpenMPT/mptrack/MPTHacks.cpp trunk/OpenMPT/mptrack/Mod2wave.cpp trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/mptrack/StreamEncoder.cpp trunk/OpenMPT/mptrack/StreamEncoderFLAC.cpp trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp trunk/OpenMPT/mptrack/StreamEncoderVorbis.cpp trunk/OpenMPT/mptrack/StreamEncoderWAV.cpp trunk/OpenMPT/mptrack/TuningDialog.cpp Modified: trunk/OpenMPT/mptrack/CleanupSong.cpp =================================================================== --- trunk/OpenMPT/mptrack/CleanupSong.cpp 2014-09-28 08:44:59 UTC (rev 4316) +++ trunk/OpenMPT/mptrack/CleanupSong.cpp 2014-09-28 08:55:05 UTC (rev 4317) @@ -386,7 +386,7 @@ if(numRemovedPatterns) { - modDoc.AddToLog(mpt::String::Format("%u pattern%s removed.", numRemovedPatterns, numRemovedPatterns == 1 ? "" : "s")); + modDoc.AddToLog(mpt::String::Print("%1 pattern%2 removed.", numRemovedPatterns, numRemovedPatterns == 1 ? "" : "s")); return true; } return false; Modified: trunk/OpenMPT/mptrack/MPTHacks.cpp =================================================================== --- trunk/OpenMPT/mptrack/MPTHacks.cpp 2014-09-28 08:44:59 UTC (rev 4316) +++ trunk/OpenMPT/mptrack/MPTHacks.cpp 2014-09-28 08:55:05 UTC (rev 4317) @@ -186,7 +186,7 @@ // Pattern count if(m_SndFile.Patterns.GetNumPatterns() > originalSpecs->patternsMax) { - AddToLog(mpt::String::Format("Found too many patterns (%d allowed)", originalSpecs->patternsMax)); + AddToLog(mpt::String::Print("Found too many patterns (%1 allowed)", originalSpecs->patternsMax)); foundHacks = true; // REQUIRES (INTELLIGENT) AUTOFIX } @@ -224,7 +224,7 @@ } if(foundHere) { - AddToLog(mpt::String::Format("Found incompatible pattern lengths (must be between %d and %d rows)", originalSpecs->patternRowsMin, originalSpecs->patternRowsMax)); + AddToLog(mpt::String::Print("Found incompatible pattern lengths (must be between %1 and %2 rows)", originalSpecs->patternRowsMin, originalSpecs->patternRowsMax)); } // Check for invalid pattern commands @@ -253,7 +253,7 @@ // Check for too many channels if(m_SndFile.GetNumChannels() > originalSpecs->channelsMax || m_SndFile.GetNumChannels() < originalSpecs->channelsMin) { - AddToLog(mpt::String::Format("Found incompatible channel count (must be between %d and %d channels)", originalSpecs->channelsMin, originalSpecs->channelsMax)); + AddToLog(mpt::String::Print("Found incompatible channel count (must be between %1 and %2 channels)", originalSpecs->channelsMin, originalSpecs->channelsMax)); foundHacks = true; if(autofix) { @@ -283,7 +283,7 @@ // Check for too many samples if(m_SndFile.GetNumSamples() > originalSpecs->samplesMax) { - AddToLog(mpt::String::Format("Found too many samples (%d allowed)", originalSpecs->samplesMax)); + AddToLog(mpt::String::Print("Found too many samples (%1 allowed)", originalSpecs->samplesMax)); foundHacks = true; // REQUIRES (INTELLIGENT) AUTOFIX } @@ -311,7 +311,7 @@ // Check for too many instruments if(m_SndFile.GetNumInstruments() > originalSpecs->instrumentsMax) { - AddToLog(mpt::String::Format("Found too many instruments (%d allowed)", originalSpecs->instrumentsMax)); + AddToLog(mpt::String::Print("Found too many instruments (%1 allowed)", originalSpecs->instrumentsMax)); foundHacks = true; // REQUIRES (INTELLIGENT) AUTOFIX } @@ -361,7 +361,7 @@ // Check for too many orders if(m_SndFile.Order.GetLengthTailTrimmed() > originalSpecs->ordersMax) { - AddToLog(mpt::String::Format("Found too many orders (%d allowed)", originalSpecs->ordersMax)); + AddToLog(mpt::String::Print("Found too many orders (%1 allowed)", originalSpecs->ordersMax)); foundHacks = true; // REQUIRES (INTELLIGENT) AUTOFIX } @@ -369,7 +369,7 @@ // Check for invalid default tempo if(m_SndFile.m_nDefaultTempo > originalSpecs->tempoMax || m_SndFile.m_nDefaultTempo < originalSpecs->tempoMin) { - AddToLog(mpt::String::Format("Found incompatible default tempo (must be between %d and %d)", originalSpecs->tempoMin, originalSpecs->tempoMax)); + AddToLog(mpt::String::Print("Found incompatible default tempo (must be between %1 and %2)", originalSpecs->tempoMin, originalSpecs->tempoMax)); foundHacks = true; if(autofix) m_SndFile.m_nDefaultTempo = Clamp(m_SndFile.m_nDefaultTempo, originalSpecs->tempoMin, originalSpecs->tempoMax); @@ -378,7 +378,7 @@ // Check for invalid default speed if(m_SndFile.m_nDefaultSpeed > originalSpecs->speedMax || m_SndFile.m_nDefaultSpeed < originalSpecs->speedMin) { - AddToLog(mpt::String::Format("Found incompatible default speed (must be between %d and %d)", originalSpecs->speedMin, originalSpecs->speedMax)); + AddToLog(mpt::String::Print("Found incompatible default speed (must be between %1 and %2)", originalSpecs->speedMin, originalSpecs->speedMax)); foundHacks = true; if(autofix) m_SndFile.m_nDefaultSpeed = Clamp(m_SndFile.m_nDefaultSpeed, originalSpecs->speedMin, originalSpecs->speedMax); Modified: trunk/OpenMPT/mptrack/Mod2wave.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mod2wave.cpp 2014-09-28 08:44:59 UTC (rev 4316) +++ trunk/OpenMPT/mptrack/Mod2wave.cpp 2014-09-28 08:55:05 UTC (rev 4317) @@ -360,7 +360,7 @@ for(std::vector<uint32>::const_iterator it = encTraits->samplerates.begin(); it != encTraits->samplerates.end(); ++it) { uint32 samplerate = *it; - int ndx = m_CbnSampleRate.AddString(mpt::String::Format("%d Hz", samplerate).c_str()); + int ndx = m_CbnSampleRate.AddString(mpt::String::Print("%1 Hz", samplerate).c_str()); m_CbnSampleRate.SetItemData(ndx, samplerate); if(samplerate == encSettings.Samplerate) { Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2014-09-28 08:44:59 UTC (rev 4316) +++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2014-09-28 08:55:05 UTC (rev 4317) @@ -472,7 +472,7 @@ { if(m_CurrentDeviceCaps.CanSampleFormat || ((SampleFormat)bits == m_Settings.sampleFormat)) { - UINT ndx = m_CbnSampleFormat.AddString(mpt::String::Format("%d Bit", bits).c_str()); + UINT ndx = m_CbnSampleFormat.AddString(mpt::String::Print("%1 Bit", bits).c_str()); m_CbnSampleFormat.SetItemData(ndx, bits); if((SampleFormat)bits == m_Settings.sampleFormat) { Modified: trunk/OpenMPT/mptrack/StreamEncoder.cpp =================================================================== --- trunk/OpenMPT/mptrack/StreamEncoder.cpp 2014-09-28 08:44:59 UTC (rev 4316) +++ trunk/OpenMPT/mptrack/StreamEncoder.cpp 2014-09-28 08:55:05 UTC (rev 4317) @@ -102,25 +102,25 @@ std::string EncoderFactoryBase::DescribeQuality(float quality) const //------------------------------------------------------------------ { - return mpt::String::Format("VBR %i%%", static_cast<int>(quality * 100.0f)); + return mpt::String::Print("VBR %1%%", static_cast<int>(quality * 100.0f)); } std::string EncoderFactoryBase::DescribeBitrateVBR(int bitrate) const //------------------------------------------------------------------- { - return mpt::String::Format("VBR %i kbit", bitrate); + return mpt::String::Print("VBR %1 kbit", bitrate); } std::string EncoderFactoryBase::DescribeBitrateABR(int bitrate) const //------------------------------------------------------------------- { - return mpt::String::Format("ABR %i kbit", bitrate); + return mpt::String::Print("ABR %1 kbit", bitrate); } std::string EncoderFactoryBase::DescribeBitrateCBR(int bitrate) const //------------------------------------------------------------------- { - return mpt::String::Format("CBR %i kbit", bitrate); + return mpt::String::Print("CBR %1 kbit", bitrate); } Modified: trunk/OpenMPT/mptrack/StreamEncoderFLAC.cpp =================================================================== --- trunk/OpenMPT/mptrack/StreamEncoderFLAC.cpp 2014-09-28 08:44:59 UTC (rev 4316) +++ trunk/OpenMPT/mptrack/StreamEncoderFLAC.cpp 2014-09-28 08:55:05 UTC (rev 4317) @@ -285,7 +285,7 @@ format.Samplerate = samplerate; format.Channels = channels; format.Sampleformat = (SampleFormat)(bytes * 8); - format.Description = mpt::String::Format("%i Bit", bytes * 8); + format.Description = mpt::String::Print("%1 Bit", bytes * 8); format.Bitrate = 0; traits.formats.push_back(format); } Modified: trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp =================================================================== --- trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp 2014-09-28 08:44:59 UTC (rev 4316) +++ trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp 2014-09-28 08:55:05 UTC (rev 4317) @@ -344,7 +344,7 @@ ok = false; \ if(warn) \ { \ - Reporting::Error(mpt::String::Format("Your '%s' is missing '%s'.\n\nPlease copy a newer 'libmp3lame.dll' into OpenMPT's root directory.", filename, #f ).c_str(), "OpenMPT - MP3 Export"); \ + Reporting::Error(mpt::String::PrintW(L"Your '%1' is missing '%2'.\n\nPlease copy a newer 'libmp3lame.dll' into OpenMPT's root directory.", filename.ToWide(), L ## #f ).c_str(), L"OpenMPT - MP3 Export"); \ } \ } \ } while(0) @@ -1495,7 +1495,7 @@ return "VBR -V9.999"; } else { - return mpt::String::Format("VBR -V%i", static_cast<int>((1.0f - quality) * 10.0f)); + return mpt::String::Print("VBR -V%1", static_cast<int>((1.0f - quality) * 10.0f)); } } #endif // MPT_MP3ENCODER_LAME @@ -1508,7 +1508,7 @@ #ifdef MPT_MP3ENCODER_BLADE if(m_Type == MP3EncoderBlade) { - return mpt::String::Format("%i kbit", bitrate); + return mpt::String::Print("%1 kbit", bitrate); } #endif // MPT_MP3ENCODER_BLADE return EncoderFactoryBase::DescribeBitrateABR(bitrate); Modified: trunk/OpenMPT/mptrack/StreamEncoderVorbis.cpp =================================================================== --- trunk/OpenMPT/mptrack/StreamEncoderVorbis.cpp 2014-09-28 08:44:59 UTC (rev 4316) +++ trunk/OpenMPT/mptrack/StreamEncoderVorbis.cpp 2014-09-28 08:55:05 UTC (rev 4317) @@ -445,7 +445,7 @@ std::string VorbisEncoder::DescribeQuality(float quality) const //------------------------------------------------------------- { - return mpt::String::Format("Q%3.1f", quality * 10.0f); + return mpt::String::Print("Q%1", mpt::Format().ParsePrintf("%3.1f").ToString(quality * 10.0f)); } Modified: trunk/OpenMPT/mptrack/StreamEncoderWAV.cpp =================================================================== --- trunk/OpenMPT/mptrack/StreamEncoderWAV.cpp 2014-09-28 08:44:59 UTC (rev 4316) +++ trunk/OpenMPT/mptrack/StreamEncoderWAV.cpp 2014-09-28 08:55:05 UTC (rev 4317) @@ -192,7 +192,7 @@ } else { format.Sampleformat = (SampleFormat)(bytes * 8); - format.Description = mpt::String::Format("%i Bit", bytes * 8); + format.Description = mpt::String::Print("%1 Bit", bytes * 8); } format.Bitrate = 0; traits.formats.push_back(format); Modified: trunk/OpenMPT/mptrack/TuningDialog.cpp =================================================================== --- trunk/OpenMPT/mptrack/TuningDialog.cpp 2014-09-28 08:44:59 UTC (rev 4316) +++ trunk/OpenMPT/mptrack/TuningDialog.cpp 2014-09-28 08:55:05 UTC (rev 4317) @@ -671,7 +671,7 @@ void CTuningDialog::OnBnClickedButtonImport() //------------------------------------------- { - std::string sFilter = mpt::String::Format(TEXT("Tuning files (*%s, *%s, *.scl)|*%s;*%s;*.scl|"), + std::string sFilter = mpt::String::Print("Tuning files (*%1, *%2, *.scl)|*%3;*%4;*.scl|", CTuning::s_FileExtension, CTuningCollection::s_FileExtension, CTuning::s_FileExtension, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-10-01 07:16:33
|
Revision: 4337 http://sourceforge.net/p/modplug/code/4337 Author: manxorist Date: 2014-10-01 07:16:19 +0000 (Wed, 01 Oct 2014) Log Message: ----------- [Mod] Soundcard settings: Avoid modal dialog boxes and just disable the whole property page when an unavailable device gets selected. Modified Paths: -------------- trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/mptrack/resource.h Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2014-09-30 13:51:10 UTC (rev 4336) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2014-10-01 07:16:19 UTC (rev 4337) @@ -840,11 +840,10 @@ { if(!gpSoundDevice->IsAvailable()) { - theApp.GetSoundDevicesManager()->SetDeviceUnavailable(deviceIdentifier); Reporting::Error("Unable to open sound device: Device not available."); } else { - Reporting::Error("Unable to open sound device: Could not open sound device."); + Reporting::Error("Unable to open sound device."); } return false; } Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2014-09-30 13:51:10 UTC (rev 4336) +++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2014-10-01 07:16:19 UTC (rev 4337) @@ -161,28 +161,7 @@ void COptionsSoundcard::SetInitialDevice() //---------------------------------------- { - bool ok = false; - std::set<SoundDevice::Identifier> triedSet; - while(!ok) - { - m_CurrentDeviceInfo = theApp.GetSoundDevicesManager()->FindDeviceInfoBestMatch(m_InitialDeviceIdentifier, TrackerSettings::Instance().m_SoundDevicePreferSameTypeIfDeviceUnavailable); - SoundDevice::Identifier dev = m_CurrentDeviceInfo.GetIdentifier(); - if(triedSet.find(dev) != triedSet.end()) - { - Reporting::Error("No sound device available."); - break; - } - m_CurrentDeviceCaps = theApp.GetSoundDevicesManager()->GetDeviceCaps(dev, CMainFrame::GetMainFrame()->gpSoundDevice); - m_CurrentDeviceDynamicCaps = theApp.GetSoundDevicesManager()->GetDeviceDynamicCaps(dev, TrackerSettings::Instance().GetSampleRates(), CMainFrame::GetMainFrame(), CMainFrame::GetMainFrame()->gpSoundDevice, true); - m_Settings = TrackerSettings::Instance().GetSoundDeviceSettings(dev); - if(theApp.GetSoundDevicesManager()->IsDeviceUnavailable(dev)) - { - triedSet.insert(dev); - m_InitialDeviceIdentifier = m_CurrentDeviceInfo.GetIdentifier(); - continue; // makes progress because FindDeviceInfoBestMatch will not return devices again that were found out to be unavailable - } - ok = true; - } + SetDevice(m_InitialDeviceIdentifier, true); } @@ -193,28 +172,22 @@ SoundDevice::Info newInfo; SoundDevice::Caps newCaps; SoundDevice::DynamicCaps newDynamicCaps; - SoundDevice::Settings newSettigs; + SoundDevice::Settings newSettings; newInfo = theApp.GetSoundDevicesManager()->FindDeviceInfo(dev); newCaps = theApp.GetSoundDevicesManager()->GetDeviceCaps(dev, CMainFrame::GetMainFrame()->gpSoundDevice); newDynamicCaps = theApp.GetSoundDevicesManager()->GetDeviceDynamicCaps(dev, TrackerSettings::Instance().GetSampleRates(), CMainFrame::GetMainFrame(), CMainFrame::GetMainFrame()->gpSoundDevice, true); bool deviceChanged = (dev != olddev); if(deviceChanged || forceReload) { - newSettigs = TrackerSettings::Instance().GetSoundDeviceSettings(dev); + newSettings = TrackerSettings::Instance().GetSoundDeviceSettings(dev); } else { - newSettigs = m_Settings; + newSettings = m_Settings; } - if(theApp.GetSoundDevicesManager()->IsDeviceUnavailable(dev)) - { - Reporting::Information("Device not available. Reverting to old device."); - UpdateEverything(); - return; - } m_CurrentDeviceInfo = newInfo; m_CurrentDeviceCaps = newCaps; m_CurrentDeviceDynamicCaps = newDynamicCaps; - m_Settings = newSettigs; + m_Settings = newSettings; } @@ -228,6 +201,7 @@ CMainFrame::GetMainFrame()->gpSoundDevice = nullptr; } theApp.GetSoundDevicesManager()->ReEnumerate(); + SetDevice(m_CurrentDeviceInfo.GetIdentifier(), true); UpdateEverything(); } @@ -245,6 +219,10 @@ void COptionsSoundcard::UpdateLatency() //------------------------------------- { + { + GetDlgItem(IDC_STATIC_LATENCY)->EnableWindow(TRUE); + m_CbnLatencyMS.EnableWindow(TRUE); + } // latency { static const double latencies [] = { @@ -276,12 +254,20 @@ } } } + if(theApp.GetSoundDevicesManager()->IsDeviceUnavailable(m_CurrentDeviceInfo.GetIdentifier())) + { + GetDlgItem(IDC_STATIC_LATENCY)->EnableWindow(FALSE); + m_CbnLatencyMS.EnableWindow(FALSE); + } } void COptionsSoundcard::UpdateUpdateInterval() //-------------------------------------------- { + { + m_CbnUpdateIntervalMS.EnableWindow(TRUE); + } // update interval { static const double updateIntervals [] = { @@ -304,12 +290,21 @@ } } } + if(theApp.GetSoundDevicesManager()->IsDeviceUnavailable(m_CurrentDeviceInfo.GetIdentifier())) + { + m_CbnUpdateIntervalMS.EnableWindow(FALSE); + } } void COptionsSoundcard::UpdateGeneral() //------------------------------------- { + { + m_CbnStoppedMode.EnableWindow(TRUE); + CPropertySheet *sheet = dynamic_cast<CPropertySheet *>(GetParent()); + if(sheet) sheet->GetDlgItem(IDOK)->EnableWindow(TRUE); + } // General { if(m_CurrentDeviceCaps.CanKeepDeviceRunning) @@ -331,6 +326,12 @@ } CheckDlgButton(IDC_CHECK7, TrackerSettings::Instance().m_SoundSettingsOpenDeviceAtStartup ? BST_CHECKED : BST_UNCHECKED); } + if(theApp.GetSoundDevicesManager()->IsDeviceUnavailable(m_CurrentDeviceInfo.GetIdentifier())) + { + m_CbnStoppedMode.EnableWindow(FALSE); + CPropertySheet *sheet = dynamic_cast<CPropertySheet *>(GetParent()); + if(sheet) sheet->GetDlgItem(IDOK)->EnableWindow(FALSE); + } } @@ -358,12 +359,7 @@ } } - if(theApp.GetSoundDevicesManager()->IsDeviceUnavailable(it->GetIdentifier())) { - continue; - } - - { CString name = mpt::ToCString(it->name); cbi.mask = CBEIF_IMAGE | CBEIF_LPARAM | CBEIF_TEXT | CBEIF_SELECTEDIMAGE | CBEIF_OVERLAY; cbi.iItem = iItem; @@ -442,6 +438,9 @@ void COptionsSoundcard::UpdateChannels() //-------------------------------------- { + { + m_CbnChannels.EnableWindow(TRUE); + } m_CbnChannels.ResetContent(); UINT maxChannels = 0; if(m_CurrentDeviceDynamicCaps.channelNames.size() > 0) @@ -462,12 +461,19 @@ } } m_CbnChannels.SetCurSel(sel); + if(theApp.GetSoundDevicesManager()->IsDeviceUnavailable(m_CurrentDeviceInfo.GetIdentifier())) + { + m_CbnChannels.EnableWindow(FALSE); + } } void COptionsSoundcard::UpdateSampleFormat() //------------------------------------------ { + { + m_CbnSampleFormat.EnableWindow(TRUE); + } UINT n = 0; m_CbnSampleFormat.ResetContent(); m_CbnSampleFormat.EnableWindow(m_CurrentDeviceCaps.CanSampleFormat ? TRUE : FALSE); @@ -498,12 +504,19 @@ } } m_CbnSampleFormat.SetCurSel(n); + if(theApp.GetSoundDevicesManager()->IsDeviceUnavailable(m_CurrentDeviceInfo.GetIdentifier())) + { + m_CbnSampleFormat.EnableWindow(FALSE); + } } void COptionsSoundcard::UpdateDither() //------------------------------------ { + { + m_CbnDither.EnableWindow(TRUE); + } m_CbnDither.ResetContent(); SampleFormat sampleFormat = static_cast<SampleFormatEnum>(m_CbnSampleFormat.GetItemData(m_CbnSampleFormat.GetCurSel())); if(sampleFormat.IsInt() && sampleFormat.GetBitsPerSample() < 32) @@ -533,12 +546,26 @@ { m_CbnDither.SetCurSel(m_Settings.DitherType); } + if(theApp.GetSoundDevicesManager()->IsDeviceUnavailable(m_CurrentDeviceInfo.GetIdentifier())) + { + m_CbnDither.EnableWindow(FALSE); + } } void COptionsSoundcard::UpdateChannelMapping() //-------------------------------------------- { + { + GetDlgItem(IDC_STATIC_CHANNELMAPPING)->EnableWindow(TRUE); + for(int mch = 0; mch < NUM_CHANNELCOMBOBOXES; mch++) + { + CStatic *statictext = &m_StaticChannelMapping[mch]; + CComboBox *combo = &m_CbnChannelMapping[mch]; + statictext->EnableWindow(TRUE); + combo->EnableWindow(TRUE); + } + } int usedChannels = m_CbnChannels.GetItemData(m_CbnChannels.GetCurSel()); if(m_Settings.ChannelMapping.GetNumHostChannels() != static_cast<uint32>(usedChannels)) { @@ -571,6 +598,17 @@ } } } + if(theApp.GetSoundDevicesManager()->IsDeviceUnavailable(m_CurrentDeviceInfo.GetIdentifier())) + { + GetDlgItem(IDC_STATIC_CHANNELMAPPING)->EnableWindow(FALSE); + for(int mch = 0; mch < NUM_CHANNELCOMBOBOXES; mch++) + { + CStatic *statictext = &m_StaticChannelMapping[mch]; + CComboBox *combo = &m_CbnChannelMapping[mch]; + statictext->EnableWindow(FALSE); + combo->EnableWindow(FALSE); + } + } } @@ -670,6 +708,11 @@ void COptionsSoundcard::UpdateSampleRates() //----------------------------------------- { + { + GetDlgItem(IDC_STATIC_FORMAT)->EnableWindow(TRUE); + m_CbnMixingFreq.EnableWindow(TRUE); + } + m_CbnMixingFreq.ResetContent(); std::vector<uint32> samplerates; @@ -701,12 +744,25 @@ } } m_CbnMixingFreq.SetCurSel(n); + if(theApp.GetSoundDevicesManager()->IsDeviceUnavailable(m_CurrentDeviceInfo.GetIdentifier())) + { + GetDlgItem(IDC_STATIC_FORMAT)->EnableWindow(FALSE); + m_CbnMixingFreq.EnableWindow(FALSE); + } } void COptionsSoundcard::UpdateControls() //-------------------------------------- { + { + m_BtnDriverPanel.EnableWindow(TRUE); + GetDlgItem(IDC_CHECK4)->EnableWindow(TRUE); + GetDlgItem(IDC_CHECK5)->EnableWindow(TRUE); + GetDlgItem(IDC_CHECK9)->EnableWindow(TRUE); + GetDlgItem(IDC_STATIC_UPDATEINTERVAL)->EnableWindow(TRUE); + GetDlgItem(IDC_COMBO_UPDATEINTERVAL)->EnableWindow(TRUE); + } if(!m_CurrentDeviceCaps.CanKeepDeviceRunning) { m_Settings.KeepDeviceRunning = false; @@ -721,6 +777,15 @@ CheckDlgButton(IDC_CHECK4, m_CurrentDeviceCaps.CanExclusiveMode && m_Settings.ExclusiveMode ? MF_CHECKED : MF_UNCHECKED); CheckDlgButton(IDC_CHECK5, m_CurrentDeviceCaps.CanBoostThreadPriority && m_Settings.BoostThreadPriority ? MF_CHECKED : MF_UNCHECKED); CheckDlgButton(IDC_CHECK9, m_CurrentDeviceCaps.CanUseHardwareTiming && m_Settings.UseHardwareTiming ? MF_CHECKED : MF_UNCHECKED); + if(theApp.GetSoundDevicesManager()->IsDeviceUnavailable(m_CurrentDeviceInfo.GetIdentifier())) + { + m_BtnDriverPanel.EnableWindow(FALSE); + GetDlgItem(IDC_CHECK4)->EnableWindow(FALSE); + GetDlgItem(IDC_CHECK5)->EnableWindow(FALSE); + GetDlgItem(IDC_CHECK9)->EnableWindow(FALSE); + GetDlgItem(IDC_STATIC_UPDATEINTERVAL)->EnableWindow(FALSE); + GetDlgItem(IDC_COMBO_UPDATEINTERVAL)->EnableWindow(FALSE); + } } @@ -735,6 +800,9 @@ void COptionsSoundcard::OnOK() //---------------------------- { + if(!theApp.GetSoundDevicesManager()->IsDeviceUnavailable(m_CurrentDeviceInfo.GetIdentifier())) + { + // General { TrackerSettings::Instance().m_SoundSettingsOpenDeviceAtStartup = IsDlgButtonChecked(IDC_CHECK7) ? true : false; @@ -806,6 +874,14 @@ SetDevice(m_CurrentDeviceInfo.GetIdentifier(), true); // Poll changed ASIO sample format and channel names UpdateDevice(); UpdateStatistics(); + + } else + { + + Reporting::Error("Sound card currently not available."); + + } + CPropertyPage::OnOK(); } @@ -835,7 +911,13 @@ m_EditStatistics.SetWindowText(s.c_str()); } else { - m_EditStatistics.SetWindowText(""); + if(theApp.GetSoundDevicesManager()->IsDeviceUnavailable(m_CurrentDeviceInfo.GetIdentifier())) + { + m_EditStatistics.SetWindowText("Device currently unavailable."); + } else + { + m_EditStatistics.SetWindowText(""); + } } } Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2014-09-30 13:51:10 UTC (rev 4336) +++ trunk/OpenMPT/mptrack/mptrack.rc 2014-10-01 07:16:19 UTC (rev 4337) @@ -1331,11 +1331,11 @@ CONTROL "",IDC_COMBO1,"ComboBoxEx32",CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP,12,18,264,96 PUSHBUTTON "&Setup device ...",IDC_BUTTON2,48,36,72,12 PUSHBUTTON "&Rescan device list",IDC_BUTTON1,204,36,72,12 - LTEXT "&Latency:",IDC_STATIC,12,54,30,12,SS_CENTERIMAGE + LTEXT "&Latency:",IDC_STATIC_LATENCY,12,54,30,12,SS_CENTERIMAGE COMBOBOX IDC_COMBO2,48,54,54,83,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP LTEXT "&Period:",IDC_STATIC_UPDATEINTERVAL,12,72,30,12,SS_CENTERIMAGE COMBOBOX IDC_COMBO_UPDATEINTERVAL,48,72,54,83,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP - LTEXT "&Format:",IDC_STATIC,12,90,30,12,SS_CENTERIMAGE + LTEXT "&Format:",IDC_STATIC_FORMAT,12,90,30,12,SS_CENTERIMAGE COMBOBOX IDC_COMBO3,48,90,54,90,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_COMBO5,108,90,42,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_COMBO6,156,90,42,80,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP Modified: trunk/OpenMPT/mptrack/resource.h =================================================================== --- trunk/OpenMPT/mptrack/resource.h 2014-09-30 13:51:10 UTC (rev 4336) +++ trunk/OpenMPT/mptrack/resource.h 2014-10-01 07:16:19 UTC (rev 4337) @@ -964,6 +964,8 @@ #define IDC_COMBO_CHANNEL_REARRIGHT 2478 #define IDC_SCANTEXT 2479 #define IDC_STATIC_CHANNELMAPPING 2480 +#define IDC_STATIC_LATENCY 2481 +#define IDC_STATIC_FORMAT 2482 #define ID_FILE_NEWMOD 32771 #define ID_FILE_NEWXM 32772 #define ID_FILE_NEWS3M 32773 @@ -1247,7 +1249,7 @@ #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 537 #define _APS_NEXT_COMMAND_VALUE 44644 -#define _APS_NEXT_CONTROL_VALUE 2481 +#define _APS_NEXT_CONTROL_VALUE 2483 #define _APS_NEXT_SYMED_VALUE 901 #endif #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-10-02 17:23:10
|
Revision: 4357 http://sourceforge.net/p/modplug/code/4357 Author: saga-games Date: 2014-10-02 17:23:04 +0000 (Thu, 02 Oct 2014) Log Message: ----------- [Imp] Tree view: Dropping a file or folder on the sample browser opens this file or folder in the sample browser. [Imp] Tree view: Dropping a soundfont file on the upper part of the tree view adds it to the list of soundfonts. Modified Paths: -------------- trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/mptrack/View_tre.h Modified: trunk/OpenMPT/mptrack/View_tre.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp 2014-10-02 12:28:17 UTC (rev 4356) +++ trunk/OpenMPT/mptrack/View_tre.cpp 2014-10-02 17:23:04 UTC (rev 4357) @@ -88,6 +88,7 @@ ON_WM_LBUTTONUP() ON_WM_RBUTTONUP() ON_WM_KEYDOWN() + ON_WM_DROPFILES() ON_NOTIFY_REFLECT(NM_DBLCLK, OnItemDblClk) ON_NOTIFY_REFLECT(NM_RETURN, OnItemReturn) ON_NOTIFY_REFLECT(NM_RCLICK, OnItemRightClick) @@ -197,6 +198,7 @@ m_dwStatus |= TREESTATUS_SINGLEEXPAND; } ModifyStyle(dwRemove, dwAdd); + ModifyStyleEx(0, WS_EX_ACCEPTFILES); if(!IsSampleBrowser()) { @@ -2340,7 +2342,7 @@ LPNMTREEVIEW pnm = (LPNMTREEVIEW)pnmhdr; if ((pnm->itemNew.iImage == IMAGE_FOLDER) || (pnm->itemNew.iImage == IMAGE_OPENFOLDER)) { - UINT iNewImage = (pnm->itemNew.state & TVIS_EXPANDED) ? IMAGE_OPENFOLDER : IMAGE_FOLDER; + int iNewImage = (pnm->itemNew.state & TVIS_EXPANDED) ? IMAGE_OPENFOLDER : IMAGE_FOLDER; SetItemImage(pnm->itemNew.hItem, iNewImage, iNewImage); } if (pResult) *pResult = TRUE; @@ -2424,11 +2426,10 @@ //---------------------------------------------------- { POINT pt; - UINT flags; GetCursorPos(&pt); ScreenToClient(&pt); HTREEITEM hItem = GetSelectedItem(); - if ((hItem) && (hItem == HitTest(pt, &flags))) + if ((hItem) && (hItem == HitTest(pt))) { ExecuteItem(hItem); } @@ -3643,4 +3644,44 @@ } +// Drop files from Windows +void CModTree::OnDropFiles(HDROP hDropInfo) +//----------------------------------------- +{ + bool refreshDLS = false; + const UINT nFiles = ::DragQueryFileW(hDropInfo, (UINT)-1, NULL, 0); + CMainFrame::GetMainFrame()->SetForegroundWindow(); + for(UINT f = 0; f < nFiles; f++) + { + WCHAR fileName[MAX_PATH]; + if(::DragQueryFileW(hDropInfo, f, fileName, CountOf(fileName))) + { + mpt::PathString file(mpt::PathString::FromNative(fileName)); + if(IsSampleBrowser()) + { + // Set sample browser location to this directory or file + CMainFrame::GetMainFrame()->GetUpperTreeview()->m_InstrLibPath = mpt::PathString(); + CMainFrame::GetMainFrame()->GetUpperTreeview()->InstrumentLibraryChDir(file, ::PathIsDirectoryW(fileName) == FALSE); + break; + } else + { + if(CTrackApp::AddDLSBank(file)) + { + refreshDLS = true; + } else + { + // Pass message on + theApp.OpenDocumentFile(file); + } + } + } + } + if(refreshDLS) + { + RefreshDlsBanks(); + } + ::DragFinish(hDropInfo); +} + + OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/View_tre.h =================================================================== --- trunk/OpenMPT/mptrack/View_tre.h 2014-10-02 12:28:17 UTC (rev 4356) +++ trunk/OpenMPT/mptrack/View_tre.h 2014-10-02 17:23:04 UTC (rev 4357) @@ -272,6 +272,7 @@ afx_msg void OnCloseItem(); afx_msg void OnBeginLabelEdit(NMHDR *nmhdr, LRESULT *result); afx_msg void OnEndLabelEdit(NMHDR *nmhdr, LRESULT *result); + afx_msg void OnDropFiles(HDROP hDropInfo); // -> CODE#0023 // -> DESC="IT project files (.itp)" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-10-06 15:18:54
|
Revision: 4394 http://sourceforge.net/p/modplug/code/4394 Author: manxorist Date: 2014-10-06 15:18:40 +0000 (Mon, 06 Oct 2014) Log Message: ----------- [Ref] Remove explicit iostream formatting in StreamEncoderFLAC and StreamEncoderMP3. Modified Paths: -------------- trunk/OpenMPT/mptrack/StreamEncoderFLAC.cpp trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp Modified: trunk/OpenMPT/mptrack/StreamEncoderFLAC.cpp =================================================================== --- trunk/OpenMPT/mptrack/StreamEncoderFLAC.cpp 2014-10-06 13:20:50 UTC (rev 4393) +++ trunk/OpenMPT/mptrack/StreamEncoderFLAC.cpp 2014-10-06 15:18:40 UTC (rev 4394) @@ -16,9 +16,6 @@ #include "Mptrack.h" #include "TrackerSettings.h" -#include <locale> -#include <sstream> - #define FLAC__NO_DLL #include <flac/include/FLAC/metadata.h> #include <flac/include/FLAC/format.h> @@ -263,13 +260,11 @@ traits.fileDescription = "FLAC"; traits.encoderSettingsName = "FLAC"; traits.encoderName = "libFLAC"; - std::ostringstream description; - description.imbue(std::locale::classic()); - description << "Free Lossless Audio Codec" << std::endl; - description << "Vendor: " << FLAC__VENDOR_STRING << std::endl; - description << "Version: " << FLAC__VERSION_STRING << std::endl; - description << "API: " << FLAC_API_VERSION_CURRENT << "." << FLAC_API_VERSION_REVISION << "." << FLAC_API_VERSION_AGE << std::endl; - traits.description = description.str(); + traits.description = ""; + traits.description += mpt::String::Print<std::string>("Free Lossless Audio Codec\n"); + traits.description += mpt::String::Print<std::string>("Vendor: %1\n", FLAC__VENDOR_STRING); + traits.description += mpt::String::Print<std::string>("Version: %1\n", FLAC__VERSION_STRING); + traits.description += mpt::String::Print<std::string>("API: %1.%2.%3\n", FLAC_API_VERSION_CURRENT, FLAC_API_VERSION_REVISION, FLAC_API_VERSION_AGE); traits.canTags = true; traits.maxChannels = 4; traits.samplerates = TrackerSettings::Instance().GetSampleRates(); Modified: trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp =================================================================== --- trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp 2014-10-06 13:20:50 UTC (rev 4393) +++ trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp 2014-10-06 15:18:40 UTC (rev 4394) @@ -22,9 +22,6 @@ #include "../common/StringFixer.h" #include <deque> -#include <iomanip> -#include <locale> -#include <sstream> // For ACM debugging purposes #define ACMLOG(x, ...) @@ -697,18 +694,18 @@ traits.fileDescription = "MPEG-1 Layer 3"; traits.encoderSettingsName = "MP3Blade"; traits.encoderName = lame ? "Lame_enc.dll" : "BladeEnc.dll"; - std::ostringstream description; - description.imbue(std::locale::classic()); BE_VERSION ver; MemsetZero(ver); beVersion(&ver); - description << "DLL version: " << (int)ver.byDLLMajorVersion << "." << (int)ver.byDLLMinorVersion << std::endl; - description << "Engine version: " << (int)ver.byMajorVersion << "." << (int)ver.byMinorVersion << " "; - description << std::setfill('0') << std::setw(4) << (int)ver.wYear << "-" << std::setfill('0') << std::setw(2) << (int)ver.byMonth << "-" << std::setfill('0') << std::setw(2) << (int)ver.byDay << std::endl; + traits.description = ""; + traits.description += mpt::String::Print<std::string>("DLL version: %1.%2\n", (int)ver.byDLLMajorVersion, (int)ver.byDLLMinorVersion); + traits.description += mpt::String::Print<std::string>("Engine version: %1.%2 %3-%4-%5\n" + , (int)ver.byMajorVersion, (int)ver.byMinorVersion + , mpt::fmt::dec0<4>((int)ver.wYear), mpt::fmt::dec0<2>((int)ver.byMonth), mpt::fmt::dec0<2>((int)ver.byDay) + ); std::string url; mpt::String::Copy(url, ver.zHomepage); - description << "URL: " << url << std::endl; - traits.description = description.str(); + traits.description += mpt::String::Print<std::string>("URL: \n", url); traits.canTags = true; traits.maxChannels = 2; traits.samplerates = std::vector<uint32>(mpeg1layer3_samplerates, mpeg1layer3_samplerates + CountOf(mpeg1layer3_samplerates));; @@ -897,13 +894,13 @@ return reinterpret_cast<AcmDynBind*>(inst)->AcmFormatEnumCB(driver, pafd, fdwSupport); } template<size_t size> - static void AppendField(std::ostream &s, const std::string &field, const CHAR(&val)[size]) + static void AppendField(std::string &s, const std::string &field, const CHAR(&val)[size]) { std::string tmp; mpt::String::Copy(tmp, val); if(!tmp.empty()) { - s << field << ": " << tmp << std::endl; + s += field + std::string(": ") + tmp + std::string("\n"); } } BOOL AcmFormatEnumCB(HACMDRIVERID driver, LPACMFORMATDETAILS pafd, DWORD fdwSupport) @@ -973,8 +970,7 @@ std::string driverNameLong; std::string driverNameShort; std::string driverNameCombined; - std::ostringstream driverDescription; - driverDescription.imbue(std::locale::classic()); + std::string driverDescription; if(add.szLongName[0]) { @@ -1047,9 +1043,9 @@ formats_waveformats.push_back(wfex); } - if(!driverDescription.str().empty()) + if(!driverDescription.empty()) { - drivers.insert(driverDescription.str()); + drivers.insert(driverDescription); } found_codec = true; @@ -1125,18 +1121,15 @@ traits.fileExtension = "mp3"; traits.fileShortDescription = "MP3 (ACM)"; traits.fileDescription = "MPEG Layer 3"; - std::ostringstream name; - name.imbue(std::locale::classic()); DWORD ver = acmGetVersion(); if(ver & 0xffff) { - name << "Microsoft Windows ACM " << ((ver>>24)&0xff) << "." << ((ver>>16)&0xff) << "." << ((ver>>0)&0xffff); + traits.encoderName = mpt::String::Print<std::string>("%1 %2.%3.%4", "Microsoft Windows ACM", mpt::fmt::hex0<2>((ver>>24)&0xff), mpt::fmt::hex0<2>((ver>>16)&0xff), mpt::fmt::hex0<4>((ver>>0)&0xffff)); } else { - name << "Microsoft Windows ACM " << ((ver>>24)&0xff) << "." << ((ver>>16)&0xff); + traits.encoderName = mpt::String::Print<std::string>("%1 %2.%3", "Microsoft Windows ACM", mpt::fmt::hex0<2>((ver>>24)&0xff), mpt::fmt::hex0<2>((ver>>16)&0xff)); } traits.encoderSettingsName = "MP3ACM"; - traits.encoderName = name.str(); for(std::set<std::string>::const_iterator i = drivers.begin(); i != drivers.end(); ++i) { traits.description += (*i); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-10-11 14:08:04
|
Revision: 4421 http://sourceforge.net/p/modplug/code/4421 Author: manxorist Date: 2014-10-11 14:07:49 +0000 (Sat, 11 Oct 2014) Log Message: ----------- [Ref] build: Add VSTi-Debug and VSTi-Release configurations for Win32 and x64 to mptrack_10.vcxproj and MPTRACK_10.sln. Those build a DLL version of mptrack which is of no use real at the moment apart from easier experimenting with a VSTi version. The macro OPENMPT_VSTI is defined in addition to MODPLUG_TRACKER for the VSTi configurations. VST SDK files have not yet been added to the project. Modified Paths: -------------- trunk/OpenMPT/mptrack/MPTRACK_10.sln trunk/OpenMPT/mptrack/mptrack_10.vcxproj Modified: trunk/OpenMPT/mptrack/MPTRACK_10.sln =================================================================== --- trunk/OpenMPT/mptrack/MPTRACK_10.sln 2014-10-11 13:50:02 UTC (rev 4420) +++ trunk/OpenMPT/mptrack/MPTRACK_10.sln 2014-10-11 14:07:49 UTC (rev 4421) @@ -35,6 +35,10 @@ Release|x64 = Release|x64 ReleaseNoLTCG|Win32 = ReleaseNoLTCG|Win32 ReleaseNoLTCG|x64 = ReleaseNoLTCG|x64 + VSTi-Debug|Win32 = VSTi-Debug|Win32 + VSTi-Debug|x64 = VSTi-Debug|x64 + VSTi-Release|Win32 = VSTi-Release|Win32 + VSTi-Release|x64 = VSTi-Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Debug|Win32.ActiveCfg = Debug|Win32 @@ -49,6 +53,14 @@ {21D95071-FB97-4E69-B3B1-050D0D4A5021}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 {21D95071-FB97-4E69-B3B1-050D0D4A5021}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|x64 {21D95071-FB97-4E69-B3B1-050D0D4A5021}.ReleaseNoLTCG|x64.Build.0 = ReleaseNoLTCG|x64 + {21D95071-FB97-4E69-B3B1-050D0D4A5021}.VSTi-Debug|Win32.ActiveCfg = VSTi-Debug|Win32 + {21D95071-FB97-4E69-B3B1-050D0D4A5021}.VSTi-Debug|Win32.Build.0 = VSTi-Debug|Win32 + {21D95071-FB97-4E69-B3B1-050D0D4A5021}.VSTi-Debug|x64.ActiveCfg = VSTi-Debug|x64 + {21D95071-FB97-4E69-B3B1-050D0D4A5021}.VSTi-Debug|x64.Build.0 = VSTi-Debug|x64 + {21D95071-FB97-4E69-B3B1-050D0D4A5021}.VSTi-Release|Win32.ActiveCfg = VSTi-Release|Win32 + {21D95071-FB97-4E69-B3B1-050D0D4A5021}.VSTi-Release|Win32.Build.0 = VSTi-Release|Win32 + {21D95071-FB97-4E69-B3B1-050D0D4A5021}.VSTi-Release|x64.ActiveCfg = VSTi-Release|x64 + {21D95071-FB97-4E69-B3B1-050D0D4A5021}.VSTi-Release|x64.Build.0 = VSTi-Release|x64 {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Debug|Win32.ActiveCfg = Debug|Win32 {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Debug|Win32.Build.0 = Debug|Win32 {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Debug|x64.ActiveCfg = Debug|x64 @@ -61,6 +73,14 @@ {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|x64 {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.ReleaseNoLTCG|x64.Build.0 = ReleaseNoLTCG|x64 + {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.VSTi-Debug|Win32.ActiveCfg = Debug|Win32 + {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.VSTi-Debug|Win32.Build.0 = Debug|Win32 + {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.VSTi-Debug|x64.ActiveCfg = Debug|x64 + {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.VSTi-Debug|x64.Build.0 = Debug|x64 + {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.VSTi-Release|Win32.ActiveCfg = Release|Win32 + {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.VSTi-Release|Win32.Build.0 = Release|Win32 + {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.VSTi-Release|x64.ActiveCfg = Release|x64 + {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.VSTi-Release|x64.Build.0 = Release|x64 {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Debug|Win32.ActiveCfg = Debug|Win32 {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Debug|Win32.Build.0 = Debug|Win32 {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Debug|x64.ActiveCfg = Debug|x64 @@ -73,6 +93,14 @@ {6B11F6A8-B131-4D2B-80EF-5731A9016436}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 {6B11F6A8-B131-4D2B-80EF-5731A9016436}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|x64 {6B11F6A8-B131-4D2B-80EF-5731A9016436}.ReleaseNoLTCG|x64.Build.0 = ReleaseNoLTCG|x64 + {6B11F6A8-B131-4D2B-80EF-5731A9016436}.VSTi-Debug|Win32.ActiveCfg = Debug|Win32 + {6B11F6A8-B131-4D2B-80EF-5731A9016436}.VSTi-Debug|Win32.Build.0 = Debug|Win32 + {6B11F6A8-B131-4D2B-80EF-5731A9016436}.VSTi-Debug|x64.ActiveCfg = Debug|x64 + {6B11F6A8-B131-4D2B-80EF-5731A9016436}.VSTi-Debug|x64.Build.0 = Debug|x64 + {6B11F6A8-B131-4D2B-80EF-5731A9016436}.VSTi-Release|Win32.ActiveCfg = Release|Win32 + {6B11F6A8-B131-4D2B-80EF-5731A9016436}.VSTi-Release|Win32.Build.0 = Release|Win32 + {6B11F6A8-B131-4D2B-80EF-5731A9016436}.VSTi-Release|x64.ActiveCfg = Release|x64 + {6B11F6A8-B131-4D2B-80EF-5731A9016436}.VSTi-Release|x64.Build.0 = Release|x64 {189B867F-FF4B-45A1-B741-A97492EE69AF}.Debug|Win32.ActiveCfg = Debug|Win32 {189B867F-FF4B-45A1-B741-A97492EE69AF}.Debug|Win32.Build.0 = Debug|Win32 {189B867F-FF4B-45A1-B741-A97492EE69AF}.Debug|x64.ActiveCfg = Debug|x64 @@ -85,6 +113,14 @@ {189B867F-FF4B-45A1-B741-A97492EE69AF}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 {189B867F-FF4B-45A1-B741-A97492EE69AF}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|x64 {189B867F-FF4B-45A1-B741-A97492EE69AF}.ReleaseNoLTCG|x64.Build.0 = ReleaseNoLTCG|x64 + {189B867F-FF4B-45A1-B741-A97492EE69AF}.VSTi-Debug|Win32.ActiveCfg = Debug|Win32 + {189B867F-FF4B-45A1-B741-A97492EE69AF}.VSTi-Debug|Win32.Build.0 = Debug|Win32 + {189B867F-FF4B-45A1-B741-A97492EE69AF}.VSTi-Debug|x64.ActiveCfg = Debug|x64 + {189B867F-FF4B-45A1-B741-A97492EE69AF}.VSTi-Debug|x64.Build.0 = Debug|x64 + {189B867F-FF4B-45A1-B741-A97492EE69AF}.VSTi-Release|Win32.ActiveCfg = Release|Win32 + {189B867F-FF4B-45A1-B741-A97492EE69AF}.VSTi-Release|Win32.Build.0 = Release|Win32 + {189B867F-FF4B-45A1-B741-A97492EE69AF}.VSTi-Release|x64.ActiveCfg = Release|x64 + {189B867F-FF4B-45A1-B741-A97492EE69AF}.VSTi-Release|x64.Build.0 = Release|x64 {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Debug|Win32.ActiveCfg = Debug|Win32 {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Debug|Win32.Build.0 = Debug|Win32 {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Debug|x64.ActiveCfg = Debug|x64 @@ -97,6 +133,14 @@ {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|x64 {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.ReleaseNoLTCG|x64.Build.0 = ReleaseNoLTCG|x64 + {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.VSTi-Debug|Win32.ActiveCfg = Debug|Win32 + {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.VSTi-Debug|Win32.Build.0 = Debug|Win32 + {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.VSTi-Debug|x64.ActiveCfg = Debug|x64 + {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.VSTi-Debug|x64.Build.0 = Debug|x64 + {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.VSTi-Release|Win32.ActiveCfg = Release|Win32 + {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.VSTi-Release|Win32.Build.0 = Release|Win32 + {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.VSTi-Release|x64.ActiveCfg = Release|x64 + {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.VSTi-Release|x64.Build.0 = Release|x64 {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Debug|Win32.ActiveCfg = Debug|Win32 {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Debug|Win32.Build.0 = Debug|Win32 {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Debug|x64.ActiveCfg = Debug|x64 @@ -109,6 +153,14 @@ {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|x64 {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.ReleaseNoLTCG|x64.Build.0 = ReleaseNoLTCG|x64 + {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.VSTi-Debug|Win32.ActiveCfg = Debug|Win32 + {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.VSTi-Debug|Win32.Build.0 = Debug|Win32 + {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.VSTi-Debug|x64.ActiveCfg = Debug|x64 + {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.VSTi-Debug|x64.Build.0 = Debug|x64 + {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.VSTi-Release|Win32.ActiveCfg = Release|Win32 + {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.VSTi-Release|Win32.Build.0 = Release|Win32 + {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.VSTi-Release|x64.ActiveCfg = Release|x64 + {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.VSTi-Release|x64.Build.0 = Release|x64 {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Debug|Win32.ActiveCfg = Debug|Win32 {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Debug|Win32.Build.0 = Debug|Win32 {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Debug|x64.ActiveCfg = Debug|x64 @@ -121,6 +173,14 @@ {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|x64 {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.ReleaseNoLTCG|x64.Build.0 = ReleaseNoLTCG|x64 + {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.VSTi-Debug|Win32.ActiveCfg = Debug|Win32 + {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.VSTi-Debug|Win32.Build.0 = Debug|Win32 + {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.VSTi-Debug|x64.ActiveCfg = Debug|x64 + {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.VSTi-Debug|x64.Build.0 = Debug|x64 + {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.VSTi-Release|Win32.ActiveCfg = Release|Win32 + {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.VSTi-Release|Win32.Build.0 = Release|Win32 + {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.VSTi-Release|x64.ActiveCfg = Release|x64 + {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.VSTi-Release|x64.Build.0 = Release|x64 {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Debug|Win32.ActiveCfg = Debug|Win32 {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Debug|Win32.Build.0 = Debug|Win32 {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Debug|x64.ActiveCfg = Debug|x64 @@ -133,6 +193,14 @@ {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|x64 {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.ReleaseNoLTCG|x64.Build.0 = ReleaseNoLTCG|x64 + {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.VSTi-Debug|Win32.ActiveCfg = Debug|Win32 + {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.VSTi-Debug|Win32.Build.0 = Debug|Win32 + {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.VSTi-Debug|x64.ActiveCfg = Debug|x64 + {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.VSTi-Debug|x64.Build.0 = Debug|x64 + {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.VSTi-Release|Win32.ActiveCfg = Release|Win32 + {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.VSTi-Release|Win32.Build.0 = Release|Win32 + {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.VSTi-Release|x64.ActiveCfg = Release|x64 + {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.VSTi-Release|x64.Build.0 = Release|x64 {59248302-52E0-4CC0-9BBE-E475BA4A9B41}.Debug|Win32.ActiveCfg = Debug|Win32 {59248302-52E0-4CC0-9BBE-E475BA4A9B41}.Debug|Win32.Build.0 = Debug|Win32 {59248302-52E0-4CC0-9BBE-E475BA4A9B41}.Debug|x64.ActiveCfg = Debug|x64 @@ -145,6 +213,14 @@ {59248302-52E0-4CC0-9BBE-E475BA4A9B41}.ReleaseNoLTCG|Win32.Build.0 = Release|Win32 {59248302-52E0-4CC0-9BBE-E475BA4A9B41}.ReleaseNoLTCG|x64.ActiveCfg = Release|x64 {59248302-52E0-4CC0-9BBE-E475BA4A9B41}.ReleaseNoLTCG|x64.Build.0 = Release|x64 + {59248302-52E0-4CC0-9BBE-E475BA4A9B41}.VSTi-Debug|Win32.ActiveCfg = Debug|Win32 + {59248302-52E0-4CC0-9BBE-E475BA4A9B41}.VSTi-Debug|Win32.Build.0 = Debug|Win32 + {59248302-52E0-4CC0-9BBE-E475BA4A9B41}.VSTi-Debug|x64.ActiveCfg = Debug|x64 + {59248302-52E0-4CC0-9BBE-E475BA4A9B41}.VSTi-Debug|x64.Build.0 = Debug|x64 + {59248302-52E0-4CC0-9BBE-E475BA4A9B41}.VSTi-Release|Win32.ActiveCfg = Release|Win32 + {59248302-52E0-4CC0-9BBE-E475BA4A9B41}.VSTi-Release|Win32.Build.0 = Release|Win32 + {59248302-52E0-4CC0-9BBE-E475BA4A9B41}.VSTi-Release|x64.ActiveCfg = Release|x64 + {59248302-52E0-4CC0-9BBE-E475BA4A9B41}.VSTi-Release|x64.Build.0 = Release|x64 {2512E2CA-578A-4F10-9363-4BFC9A5EF960}.Debug|Win32.ActiveCfg = Debug|Win32 {2512E2CA-578A-4F10-9363-4BFC9A5EF960}.Debug|Win32.Build.0 = Debug|Win32 {2512E2CA-578A-4F10-9363-4BFC9A5EF960}.Debug|x64.ActiveCfg = Debug|x64 @@ -157,6 +233,14 @@ {2512E2CA-578A-4F10-9363-4BFC9A5EF960}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 {2512E2CA-578A-4F10-9363-4BFC9A5EF960}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|x64 {2512E2CA-578A-4F10-9363-4BFC9A5EF960}.ReleaseNoLTCG|x64.Build.0 = ReleaseNoLTCG|x64 + {2512E2CA-578A-4F10-9363-4BFC9A5EF960}.VSTi-Debug|Win32.ActiveCfg = Debug|Win32 + {2512E2CA-578A-4F10-9363-4BFC9A5EF960}.VSTi-Debug|Win32.Build.0 = Debug|Win32 + {2512E2CA-578A-4F10-9363-4BFC9A5EF960}.VSTi-Debug|x64.ActiveCfg = Debug|x64 + {2512E2CA-578A-4F10-9363-4BFC9A5EF960}.VSTi-Debug|x64.Build.0 = Debug|x64 + {2512E2CA-578A-4F10-9363-4BFC9A5EF960}.VSTi-Release|Win32.ActiveCfg = Release|Win32 + {2512E2CA-578A-4F10-9363-4BFC9A5EF960}.VSTi-Release|Win32.Build.0 = Release|Win32 + {2512E2CA-578A-4F10-9363-4BFC9A5EF960}.VSTi-Release|x64.ActiveCfg = Release|x64 + {2512E2CA-578A-4F10-9363-4BFC9A5EF960}.VSTi-Release|x64.Build.0 = Release|x64 {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Debug|Win32.ActiveCfg = Debug|Win32 {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Debug|Win32.Build.0 = Debug|Win32 {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Debug|x64.ActiveCfg = Debug|x64 @@ -169,6 +253,14 @@ {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|x64 {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.ReleaseNoLTCG|x64.Build.0 = ReleaseNoLTCG|x64 + {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.VSTi-Debug|Win32.ActiveCfg = Debug|Win32 + {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.VSTi-Debug|Win32.Build.0 = Debug|Win32 + {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.VSTi-Debug|x64.ActiveCfg = Debug|x64 + {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.VSTi-Debug|x64.Build.0 = Debug|x64 + {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.VSTi-Release|Win32.ActiveCfg = Release|Win32 + {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.VSTi-Release|Win32.Build.0 = Release|Win32 + {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.VSTi-Release|x64.ActiveCfg = Release|x64 + {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.VSTi-Release|x64.Build.0 = Release|x64 {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10}.Debug|Win32.ActiveCfg = Debug|Win32 {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10}.Debug|Win32.Build.0 = Debug|Win32 {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10}.Debug|x64.ActiveCfg = Debug|x64 @@ -181,6 +273,14 @@ {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10}.ReleaseNoLTCG|Win32.Build.0 = Release|Win32 {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10}.ReleaseNoLTCG|x64.ActiveCfg = Release|x64 {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10}.ReleaseNoLTCG|x64.Build.0 = Release|x64 + {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10}.VSTi-Debug|Win32.ActiveCfg = Debug|Win32 + {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10}.VSTi-Debug|Win32.Build.0 = Debug|Win32 + {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10}.VSTi-Debug|x64.ActiveCfg = Debug|x64 + {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10}.VSTi-Debug|x64.Build.0 = Debug|x64 + {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10}.VSTi-Release|Win32.ActiveCfg = Release|Win32 + {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10}.VSTi-Release|Win32.Build.0 = Release|Win32 + {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10}.VSTi-Release|x64.ActiveCfg = Release|x64 + {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10}.VSTi-Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Modified: trunk/OpenMPT/mptrack/mptrack_10.vcxproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack_10.vcxproj 2014-10-11 13:50:02 UTC (rev 4420) +++ trunk/OpenMPT/mptrack/mptrack_10.vcxproj 2014-10-11 14:07:49 UTC (rev 4421) @@ -25,6 +25,22 @@ <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> + <ProjectConfiguration Include="VSTi-Debug|Win32"> + <Configuration>VSTi-Debug</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="VSTi-Debug|x64"> + <Configuration>VSTi-Debug</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="VSTi-Release|Win32"> + <Configuration>VSTi-Release</Configuration> + <Platform>Win32</Platform> + </ProjectConfiguration> + <ProjectConfiguration Include="VSTi-Release|x64"> + <Configuration>VSTi-Release</Configuration> + <Platform>x64</Platform> + </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectName>mptrack</ProjectName> @@ -39,12 +55,24 @@ <WholeProgramOptimization>true</WholeProgramOptimization> <PlatformToolset>v100</PlatformToolset> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VSTi-Release|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseOfMfc>Static</UseOfMfc> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>v100</PlatformToolset> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseOfMfc>Static</UseOfMfc> <WholeProgramOptimization>true</WholeProgramOptimization> <PlatformToolset>v100</PlatformToolset> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VSTi-Release|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseOfMfc>Static</UseOfMfc> + <WholeProgramOptimization>true</WholeProgramOptimization> + <PlatformToolset>v100</PlatformToolset> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseOfMfc>Static</UseOfMfc> @@ -61,10 +89,18 @@ <ConfigurationType>Application</ConfigurationType> <UseOfMfc>Static</UseOfMfc> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|Win32'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseOfMfc>Static</UseOfMfc> + </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseOfMfc>Static</UseOfMfc> </PropertyGroup> + <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|x64'" Label="Configuration"> + <ConfigurationType>DynamicLibrary</ConfigurationType> + <UseOfMfc>Static</UseOfMfc> + </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> @@ -72,10 +108,18 @@ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='VSTi-Release|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='VSTi-Release|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> @@ -88,29 +132,49 @@ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|Win32'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> </ImportGroup> + <ImportGroup Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|x64'" Label="PropertySheets"> + <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> + <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" /> + </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup> <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\bin\$(Platform)-Debug\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|Win32'">..\bin\$(Platform)-Debug\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\bin\$(Platform)-Debug\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|x64'">..\bin\$(Platform)-Debug\</OutDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|Win32'">..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|x64'">..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|Win32'">true</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|x64'">true</LinkIncremental> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\bin\$(Platform)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='VSTi-Release|Win32'">..\bin\$(Platform)\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\bin\$(Platform)\</OutDir> + <OutDir Condition="'$(Configuration)|$(Platform)'=='VSTi-Release|x64'">..\bin\$(Platform)\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|Win32'">..\bin\$(Platform)\</OutDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|x64'">..\bin\$(Platform)\</OutDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='VSTi-Release|Win32'">..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> + <IntDir Condition="'$(Configuration)|$(Platform)'=='VSTi-Release|x64'">..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|Win32'">..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|x64'">..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='VSTi-Release|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> + <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='VSTi-Release|x64'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|x64'">false</LinkIncremental> </PropertyGroup> @@ -166,6 +230,58 @@ <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|Win32'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + </Midl> + <ClCompile> + <AdditionalOptions>/EHsc %(AdditionalOptions)</AdditionalOptions> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\common;..\soundlib;..\include;..\include\msinttypes\inttypes;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;$(IntDir)svn_version;..\build\svn_version;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;MODPLUG_TRACKER;OPENMPT_VSTI;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> + <PrecompiledHeader>Use</PrecompiledHeader> + <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile> + <BrowseInformation>true</BrowseInformation> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>EditAndContinue</DebugInformationFormat> + <CompileAs>Default</CompileAs> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + </ResourceCompile> + <Link> + <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> + <Version>5.0</Version> + <SuppressStartupBanner>true</SuppressStartupBanner> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <DelayLoadDLLs>OpenMPT_SoundTouch_f32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <AssemblyDebug>true</AssemblyDebug> + <GenerateMapFile>true</GenerateMapFile> + <SubSystem>Windows</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <LargeAddressAware>true</LargeAddressAware> + </Link> + <Manifest> + <AdditionalManifestFiles>$(ProjectDir)res/rt_manif.bin;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PreBuildEvent> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> + </PreBuildEvent> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Midl> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> @@ -217,6 +333,57 @@ <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|x64'"> + <Midl> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + </Midl> + <ClCompile> + <AdditionalOptions>/EHsc %(AdditionalOptions)</AdditionalOptions> + <Optimization>Disabled</Optimization> + <AdditionalIncludeDirectories>..\common;..\soundlib;..\include;..\include\msinttypes\inttypes;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;$(IntDir)svn_version;..\build\svn_version;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;MODPLUG_TRACKER;OPENMPT_VSTI;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> + <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> + <PrecompiledHeader>Use</PrecompiledHeader> + <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile> + <BrowseInformation>true</BrowseInformation> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <CompileAs>Default</CompileAs> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + </ResourceCompile> + <Link> + <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> + <Version>5.0</Version> + <SuppressStartupBanner>true</SuppressStartupBanner> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <DelayLoadDLLs>OpenMPT_SoundTouch_f32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <AssemblyDebug>true</AssemblyDebug> + <GenerateMapFile>true</GenerateMapFile> + <SubSystem>Windows</SubSystem> + <RandomizedBaseAddress>false</RandomizedBaseAddress> + <DataExecutionPrevention> + </DataExecutionPrevention> + <LargeAddressAware>true</LargeAddressAware> + </Link> + <Manifest> + <AdditionalManifestFiles>$(ProjectDir)res/rt_manif.bin;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PreBuildEvent> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> + </PreBuildEvent> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Midl> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> @@ -274,6 +441,63 @@ <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VSTi-Release|Win32'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + <TargetEnvironment>Win32</TargetEnvironment> + </Midl> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <AdditionalIncludeDirectories>..\common;..\soundlib;..\include;..\include\msinttypes\inttypes;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;$(IntDir)svn_version;..\build\svn_version;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;MODPLUG_TRACKER;OPENMPT_VSTI;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> + <PrecompiledHeader>Use</PrecompiledHeader> + <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <CompileAs>Default</CompileAs> + <ExceptionHandling>Async</ExceptionHandling> + <IntrinsicFunctions>true</IntrinsicFunctions> + <FloatingPointModel>Fast</FloatingPointModel> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <WholeProgramOptimization>true</WholeProgramOptimization> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + </ResourceCompile> + <Link> + <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> + <Version>5.0</Version> + <SuppressStartupBanner>true</SuppressStartupBanner> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <DelayLoadDLLs>OpenMPT_SoundTouch_f32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>true</RandomizedBaseAddress> + <DataExecutionPrevention>false</DataExecutionPrevention> + <IgnoreSpecificDefaultLibraries> + </IgnoreSpecificDefaultLibraries> + <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> + <LargeAddressAware>true</LargeAddressAware> + </Link> + <Manifest> + <AdditionalManifestFiles>$(ProjectDir)res/rt_manif.bin;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PreBuildEvent> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> + </PreBuildEvent> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Midl> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> @@ -330,6 +554,62 @@ <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> </PreBuildEvent> </ItemDefinitionGroup> + <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='VSTi-Release|x64'"> + <Midl> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <MkTypLibCompatible>true</MkTypLibCompatible> + <SuppressStartupBanner>true</SuppressStartupBanner> + </Midl> + <ClCompile> + <Optimization>MaxSpeed</Optimization> + <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> + <AdditionalIncludeDirectories>..\common;..\soundlib;..\include;..\include\msinttypes\inttypes;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;$(IntDir)svn_version;..\build\svn_version;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> + <PreprocessorDefinitions>NDEBUG;WIN32;_WINDOWS;MODPLUG_TRACKER;OPENMPT_VSTI;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <StringPooling>true</StringPooling> + <RuntimeLibrary>MultiThreaded</RuntimeLibrary> + <BufferSecurityCheck>true</BufferSecurityCheck> + <FunctionLevelLinking>true</FunctionLevelLinking> + <ForceConformanceInForLoopScope>true</ForceConformanceInForLoopScope> + <PrecompiledHeader>Use</PrecompiledHeader> + <PrecompiledHeaderFile>stdafx.h</PrecompiledHeaderFile> + <WarningLevel>Level4</WarningLevel> + <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <CompileAs>Default</CompileAs> + <ExceptionHandling>Async</ExceptionHandling> + <IntrinsicFunctions>true</IntrinsicFunctions> + <FloatingPointModel>Fast</FloatingPointModel> + <MultiProcessorCompilation>true</MultiProcessorCompilation> + <WholeProgramOptimization>true</WholeProgramOptimization> + </ClCompile> + <ResourceCompile> + <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <Culture>0x0409</Culture> + </ResourceCompile> + <Link> + <AdditionalOptions>%(AdditionalOptions)</AdditionalOptions> + <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> + <Version>5.0</Version> + <SuppressStartupBanner>true</SuppressStartupBanner> + <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> + <DelayLoadDLLs>OpenMPT_SoundTouch_f32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> + <GenerateDebugInformation>true</GenerateDebugInformation> + <SubSystem>Windows</SubSystem> + <OptimizeReferences>true</OptimizeReferences> + <EnableCOMDATFolding>true</EnableCOMDATFolding> + <RandomizedBaseAddress>true</RandomizedBaseAddress> + <DataExecutionPrevention>false</DataExecutionPrevention> + <IgnoreSpecificDefaultLibraries> + </IgnoreSpecificDefaultLibraries> + <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration> + <LargeAddressAware>true</LargeAddressAware> + </Link> + <Manifest> + <AdditionalManifestFiles>$(ProjectDir)res/rt_manif.bin;%(AdditionalManifestFiles)</AdditionalManifestFiles> + </Manifest> + <PreBuildEvent> + <Command>..\build\svn_version\update_svn_version_vs.cmd $(IntDir)</Command> + </PreBuildEvent> + </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|Win32'"> <Midl> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> @@ -469,10 +749,15 @@ <ClCompile Include="..\soundlib\Dlsbank.cpp" /> <ClCompile Include="..\soundlib\Fastmix.cpp"> <DebugInformationFormat Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">ProgramDatabase</DebugInformationFormat> + <DebugInformationFormat Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|Win32'">ProgramDatabase</DebugInformationFormat> <InlineFunctionExpansion Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AnySuitable</InlineFunctionExpansion> + <InlineFunctionExpansion Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|Win32'">AnySuitable</InlineFunctionExpansion> <IntrinsicFunctions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</IntrinsicFunctions> + <IntrinsicFunctions Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|Win32'">true</IntrinsicFunctions> <InlineFunctionExpansion Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AnySuitable</InlineFunctionExpansion> + <InlineFunctionExpansion Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|x64'">AnySuitable</InlineFunctionExpansion> <IntrinsicFunctions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</IntrinsicFunctions> + <IntrinsicFunctions Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|x64'">true</IntrinsicFunctions> </ClCompile> <ClCompile Include="..\soundlib\ITCompression.cpp" /> <ClCompile Include="..\soundlib\ITTools.cpp" /> @@ -573,13 +858,19 @@ <ClCompile Include="ScaleEnvPointsDlg.cpp" /> <ClCompile Include="..\common\stdafx.cpp"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='VSTi-Debug|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='VSTi-Release|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> + <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='VSTi-Release|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|x64'">Create</PrecompiledHeader> <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</MultiProcessorCompilation> + <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='VSTi-Release|Win32'">false</MultiProcessorCompilation> <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</MultiProcessorCompilation> + <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='VSTi-Release|x64'">false</MultiProcessorCompilation> <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|Win32'">false</MultiProcessorCompilation> <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='ReleaseNoLTCG|x64'">false</MultiProcessorCompilation> </ClCompile> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-10-12 08:35:53
|
Revision: 4428 http://sourceforge.net/p/modplug/code/4428 Author: manxorist Date: 2014-10-12 08:35:43 +0000 (Sun, 12 Oct 2014) Log Message: ----------- [Ref] Fix some #include paths that do not work with a more restricted include path setting. Modified Paths: -------------- trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/StreamEncoder.h Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2014-10-11 23:24:33 UTC (rev 4427) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2014-10-12 08:35:43 UTC (rev 4428) @@ -35,7 +35,7 @@ #include "ExceptionHandler.h" #include "PatternClipboard.h" #include "MemoryMappedFile.h" -#include "soundlib/FileReader.h" +#include "../soundlib/FileReader.h" #include "../common/Profiler.h" #include "FileDialog.h" #include <HtmlHelp.h> Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2014-10-11 23:24:33 UTC (rev 4427) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2014-10-12 08:35:43 UTC (rev 4428) @@ -34,7 +34,7 @@ #else #include "MemoryMappedFile.h" #endif -#include "soundlib/FileReader.h" +#include "../soundlib/FileReader.h" #include <shlwapi.h> #include "FileDialog.h" Modified: trunk/OpenMPT/mptrack/StreamEncoder.h =================================================================== --- trunk/OpenMPT/mptrack/StreamEncoder.h 2014-10-11 23:24:33 UTC (rev 4427) +++ trunk/OpenMPT/mptrack/StreamEncoder.h 2014-10-12 08:35:43 UTC (rev 4428) @@ -12,8 +12,8 @@ #include "Settings.h" -#include "soundlib/Tagging.h" -#include "soundlib/SampleFormat.h" +#include "../soundlib/Tagging.h" +#include "../soundlib/SampleFormat.h" #include <iosfwd> #include <string> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-10-20 14:15:01
|
Revision: 4453 http://sourceforge.net/p/modplug/code/4453 Author: manxorist Date: 2014-10-20 14:14:37 +0000 (Mon, 20 Oct 2014) Log Message: ----------- [Fix] Fix VS2008 Win64 build (broken since r4448 ). Revision Links: -------------- http://sourceforge.net/p/modplug/code/4448 Modified Paths: -------------- trunk/OpenMPT/mptrack/MPTRACK_08.sln trunk/OpenMPT/mptrack/mptrack_08.vcproj Modified: trunk/OpenMPT/mptrack/MPTRACK_08.sln =================================================================== --- trunk/OpenMPT/mptrack/MPTRACK_08.sln 2014-10-20 13:32:53 UTC (rev 4452) +++ trunk/OpenMPT/mptrack/MPTRACK_08.sln 2014-10-20 14:14:37 UTC (rev 4453) @@ -37,8 +37,6 @@ Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 - ReleaseNoLTCG|Win32 = ReleaseNoLTCG|Win32 - ReleaseNoLTCG|x64 = ReleaseNoLTCG|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Debug|Win32.ActiveCfg = Debug|Win32 @@ -49,9 +47,6 @@ {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Release|Win32.Build.0 = Release|Win32 {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Release|x64.ActiveCfg = Release|x64 {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Release|x64.Build.0 = Release|x64 - {21D95071-FB97-4E69-B3B1-050D0D4A5021}.ReleaseNoLTCG|Win32.ActiveCfg = Release|x64 - {21D95071-FB97-4E69-B3B1-050D0D4A5021}.ReleaseNoLTCG|x64.ActiveCfg = Release|x64 - {21D95071-FB97-4E69-B3B1-050D0D4A5021}.ReleaseNoLTCG|x64.Build.0 = Release|x64 {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Debug|Win32.ActiveCfg = Debug|Win32 {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Debug|Win32.Build.0 = Debug|Win32 {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Debug|x64.ActiveCfg = Debug|x64 @@ -60,9 +55,6 @@ {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Release|Win32.Build.0 = Release|Win32 {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Release|x64.ActiveCfg = Release|x64 {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.Release|x64.Build.0 = Release|x64 - {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.ReleaseNoLTCG|Win32.ActiveCfg = ReleaseNoLTCG|Win32 - {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 - {E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|Win32 {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Debug|Win32.ActiveCfg = Debug|Win32 {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Debug|Win32.Build.0 = Debug|Win32 {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Debug|x64.ActiveCfg = Debug|x64 @@ -71,9 +63,6 @@ {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Release|Win32.Build.0 = Release|Win32 {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Release|x64.ActiveCfg = Release|x64 {6B11F6A8-B131-4D2B-80EF-5731A9016436}.Release|x64.Build.0 = Release|x64 - {6B11F6A8-B131-4D2B-80EF-5731A9016436}.ReleaseNoLTCG|Win32.ActiveCfg = ReleaseNoLTCG|Win32 - {6B11F6A8-B131-4D2B-80EF-5731A9016436}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 - {6B11F6A8-B131-4D2B-80EF-5731A9016436}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|Win32 {189B867F-FF4B-45A1-B741-A97492EE69AF}.Debug|Win32.ActiveCfg = Debug|Win32 {189B867F-FF4B-45A1-B741-A97492EE69AF}.Debug|Win32.Build.0 = Debug|Win32 {189B867F-FF4B-45A1-B741-A97492EE69AF}.Debug|x64.ActiveCfg = Debug|x64 @@ -82,9 +71,6 @@ {189B867F-FF4B-45A1-B741-A97492EE69AF}.Release|Win32.Build.0 = Release|Win32 {189B867F-FF4B-45A1-B741-A97492EE69AF}.Release|x64.ActiveCfg = Release|x64 {189B867F-FF4B-45A1-B741-A97492EE69AF}.Release|x64.Build.0 = Release|x64 - {189B867F-FF4B-45A1-B741-A97492EE69AF}.ReleaseNoLTCG|Win32.ActiveCfg = ReleaseNoLTCG|Win32 - {189B867F-FF4B-45A1-B741-A97492EE69AF}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 - {189B867F-FF4B-45A1-B741-A97492EE69AF}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|Win32 {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Debug|Win32.ActiveCfg = Debug|Win32 {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Debug|Win32.Build.0 = Debug|Win32 {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Debug|x64.ActiveCfg = Debug|x64 @@ -93,9 +79,6 @@ {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Release|Win32.Build.0 = Release|Win32 {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Release|x64.ActiveCfg = Release|x64 {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.Release|x64.Build.0 = Release|x64 - {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.ReleaseNoLTCG|Win32.ActiveCfg = ReleaseNoLTCG|Win32 - {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 - {89AF16DD-32CC-4A7E-B219-5F117D761F9F}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|Win32 {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Debug|Win32.ActiveCfg = Debug|Win32 {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Debug|Win32.Build.0 = Debug|Win32 {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Debug|x64.ActiveCfg = Debug|x64 @@ -104,9 +87,6 @@ {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Release|Win32.Build.0 = Release|Win32 {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Release|x64.ActiveCfg = Release|x64 {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.Release|x64.Build.0 = Release|x64 - {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.ReleaseNoLTCG|Win32.ActiveCfg = ReleaseNoLTCG|Win32 - {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 - {F5F8F6DE-84CF-4E9D-91EA-D9B5E2AA36CD}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|Win32 {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Debug|Win32.ActiveCfg = Debug|Win32 {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Debug|Win32.Build.0 = Debug|Win32 {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Debug|x64.ActiveCfg = Debug|x64 @@ -115,9 +95,6 @@ {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Release|Win32.Build.0 = Release|Win32 {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Release|x64.ActiveCfg = Release|x64 {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.Release|x64.Build.0 = Release|x64 - {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.ReleaseNoLTCG|Win32.ActiveCfg = ReleaseNoLTCG|Win32 - {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 - {1654FB18-FDE6-406F-9D84-BA12BFBD67B2}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|Win32 {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Debug|Win32.ActiveCfg = Debug|Win32 {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Debug|Win32.Build.0 = Debug|Win32 {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Debug|x64.ActiveCfg = Debug|x64 @@ -126,9 +103,6 @@ {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Release|Win32.Build.0 = Release|Win32 {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Release|x64.ActiveCfg = Release|x64 {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.Release|x64.Build.0 = Release|x64 - {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.ReleaseNoLTCG|Win32.ActiveCfg = ReleaseNoLTCG|Win32 - {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 - {63AF9025-A6CE-4147-A05D-6E2CCFD3A0D7}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|Win32 {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Debug|Win32.ActiveCfg = Debug|Win32 {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Debug|Win32.Build.0 = Debug|Win32 {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Debug|x64.ActiveCfg = Debug|x64 @@ -137,18 +111,14 @@ {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Release|Win32.Build.0 = Release|Win32 {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Release|x64.ActiveCfg = Release|x64 {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.Release|x64.Build.0 = Release|x64 - {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.ReleaseNoLTCG|Win32.ActiveCfg = ReleaseNoLTCG|Win32 - {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 - {95CC809B-03FC-4EDB-BB20-FD07A698C05F}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|Win32 {BC116B29-9958-4389-B294-7529BB7C7D37}.Debug|Win32.ActiveCfg = Debug|Win32 {BC116B29-9958-4389-B294-7529BB7C7D37}.Debug|Win32.Build.0 = Debug|Win32 - {BC116B29-9958-4389-B294-7529BB7C7D37}.Debug|x64.ActiveCfg = Debug|Win32 + {BC116B29-9958-4389-B294-7529BB7C7D37}.Debug|x64.ActiveCfg = Debug|x64 + {BC116B29-9958-4389-B294-7529BB7C7D37}.Debug|x64.Build.0 = Debug|x64 {BC116B29-9958-4389-B294-7529BB7C7D37}.Release|Win32.ActiveCfg = Release|Win32 {BC116B29-9958-4389-B294-7529BB7C7D37}.Release|Win32.Build.0 = Release|Win32 - {BC116B29-9958-4389-B294-7529BB7C7D37}.Release|x64.ActiveCfg = Release|Win32 - {BC116B29-9958-4389-B294-7529BB7C7D37}.ReleaseNoLTCG|Win32.ActiveCfg = ReleaseNoLTCG|Win32 - {BC116B29-9958-4389-B294-7529BB7C7D37}.ReleaseNoLTCG|Win32.Build.0 = ReleaseNoLTCG|Win32 - {BC116B29-9958-4389-B294-7529BB7C7D37}.ReleaseNoLTCG|x64.ActiveCfg = ReleaseNoLTCG|Win32 + {BC116B29-9958-4389-B294-7529BB7C7D37}.Release|x64.ActiveCfg = Release|x64 + {BC116B29-9958-4389-B294-7529BB7C7D37}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Modified: trunk/OpenMPT/mptrack/mptrack_08.vcproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack_08.vcproj 2014-10-20 13:32:53 UTC (rev 4452) +++ trunk/OpenMPT/mptrack/mptrack_08.vcproj 2014-10-20 14:14:37 UTC (rev 4453) @@ -119,14 +119,13 @@ /> </Configuration> <Configuration - Name="Release|Win32" - OutputDirectory="..\bin\$(PlatformName)\" - IntermediateDirectory="..\build\obj\$(ProjectName)\$(PlatformName)\$(ConfigurationName)" + Name="Debug|x64" + OutputDirectory="$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="1" ATLMinimizesCRunTimeLibraryUsage="false" - WholeProgramOptimization="1" > <Tool Name="VCPreBuildEventTool" @@ -143,26 +142,27 @@ /> <Tool Name="VCMIDLTool" - PreprocessorDefinitions="NDEBUG" + PreprocessorDefinitions="_DEBUG" MkTypLibCompatible="true" SuppressStartupBanner="true" - TargetEnvironment="1" - TypeLibraryName=".\Bin/mptrack.tlb" + TargetEnvironment="3" + TypeLibraryName=".\Debug/mptrack.tlb" /> <Tool Name="VCCLCompilerTool" - Optimization="2" - InlineFunctionExpansion="2" + Optimization="0" AdditionalIncludeDirectories="..\common;..\soundlib;..\include\msinttypes\stdint;..\include\msinttypes\inttypes;..\include;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;"$(IntDir)\svn_version";..\build\svn_version" - PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS,MODPLUG_TRACKER" + PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,MODPLUG_TRACKER" StringPooling="true" ExceptionHandling="2" - RuntimeLibrary="0" + BasicRuntimeChecks="3" + RuntimeLibrary="1" BufferSecurityCheck="true" - EnableFunctionLevelLinking="false" + EnableFunctionLevelLinking="true" UsePrecompiledHeader="2" PrecompiledHeaderThrough="stdafx.h" - WarningLevel="3" + BrowseInformation="1" + WarningLevel="4" SuppressStartupBanner="false" DebugInformationFormat="3" CompileAs="0" @@ -172,7 +172,7 @@ /> <Tool Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" + PreprocessorDefinitions="_DEBUG" Culture="1033" /> <Tool @@ -180,19 +180,19 @@ /> <Tool Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" Version="5.0" - LinkIncremental="1" + LinkIncremental="2" SuppressStartupBanner="true" AdditionalLibraryDirectories="" DelayLoadDLLs="OpenMPT_SoundTouch_f32.dll" GenerateDebugInformation="true" + AssemblyDebug="1" + GenerateMapFile="true" SubSystem="2" LargeAddressAware="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="2" + RandomizedBaseAddress="1" DataExecutionPrevention="0" + TargetMachine="17" /> <Tool Name="VCALinkTool" @@ -218,13 +218,14 @@ /> </Configuration> <Configuration - Name="Debug|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + Name="Release|Win32" + OutputDirectory="..\bin\$(PlatformName)\" + IntermediateDirectory="..\build\obj\$(ProjectName)\$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" UseOfMFC="1" ATLMinimizesCRunTimeLibraryUsage="false" + WholeProgramOptimization="1" > <Tool Name="VCPreBuildEventTool" @@ -241,27 +242,26 @@ /> <Tool Name="VCMIDLTool" - PreprocessorDefinitions="_DEBUG" + PreprocessorDefinitions="NDEBUG" MkTypLibCompatible="true" SuppressStartupBanner="true" - TargetEnvironment="3" - TypeLibraryName=".\Debug/mptrack.tlb" + TargetEnvironment="1" + TypeLibraryName=".\Bin/mptrack.tlb" /> <Tool Name="VCCLCompilerTool" - Optimization="0" + Optimization="2" + InlineFunctionExpansion="2" AdditionalIncludeDirectories="..\common;..\soundlib;..\include\msinttypes\stdint;..\include\msinttypes\inttypes;..\include;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;"$(IntDir)\svn_version";..\build\svn_version" - PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,MODPLUG_TRACKER" + PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS,MODPLUG_TRACKER" StringPooling="true" ExceptionHandling="2" - BasicRuntimeChecks="3" - RuntimeLibrary="1" + RuntimeLibrary="0" BufferSecurityCheck="true" - EnableFunctionLevelLinking="true" + EnableFunctionLevelLinking="false" UsePrecompiledHeader="2" PrecompiledHeaderThrough="stdafx.h" - BrowseInformation="1" - WarningLevel="4" + WarningLevel="3" SuppressStartupBanner="false" DebugInformationFormat="3" CompileAs="0" @@ -271,7 +271,7 @@ /> <Tool Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" + PreprocessorDefinitions="NDEBUG" Culture="1033" /> <Tool @@ -279,19 +279,19 @@ /> <Tool Name="VCLinkerTool" + AdditionalOptions="/MACHINE:I386" Version="5.0" - LinkIncremental="2" + LinkIncremental="1" SuppressStartupBanner="true" AdditionalLibraryDirectories="" DelayLoadDLLs="OpenMPT_SoundTouch_f32.dll" GenerateDebugInformation="true" - AssemblyDebug="1" - GenerateMapFile="true" SubSystem="2" LargeAddressAware="2" - RandomizedBaseAddress="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="2" DataExecutionPrevention="0" - TargetMachine="17" /> <Tool Name="VCALinkTool" @@ -795,7 +795,7 @@ /> </FileConfiguration> <FileConfiguration - Name="Release|Win32" + Name="Debug|x64" > <Tool Name="VCCLCompilerTool" @@ -803,7 +803,7 @@ /> </FileConfiguration> <FileConfiguration - Name="Debug|x64" + Name="Release|Win32" > <Tool Name="VCCLCompilerTool" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-10-21 15:08:16
|
Revision: 4456 http://sourceforge.net/p/modplug/code/4456 Author: manxorist Date: 2014-10-21 15:08:04 +0000 (Tue, 21 Oct 2014) Log Message: ----------- [Imp] Stream Export: For LAME and Vorbis, show an estimated target bitrate for VBR modes. Modified Paths: -------------- trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp trunk/OpenMPT/mptrack/StreamEncoderVorbis.cpp Modified: trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp =================================================================== --- trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp 2014-10-21 10:58:54 UTC (rev 4455) +++ trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp 2014-10-21 15:08:04 UTC (rev 4456) @@ -1481,14 +1481,15 @@ #ifdef MPT_MP3ENCODER_LAME if(m_Type == MP3EncoderLame) { - int q = static_cast<int>((1.0f - quality) * 10.0f); + static const int q_table[11] = { 240, 220, 190, 170, 160, 130, 120, 100, 80, 70, 50 }; // http://wiki.hydrogenaud.io/index.php?title=LAME + int q = Util::Round<int>((1.0f - quality) * 10.0f); if(q < 0) q = 0; if(q >= 10) { - return "VBR -V9.999"; + return mpt::String::Print("VBR -V%1 (~%2 kbit)", "9.999", q_table[q]); } else { - return mpt::String::Print("VBR -V%1", static_cast<int>((1.0f - quality) * 10.0f)); + return mpt::String::Print("VBR -V%1 (~%2 kbit)", Util::Round<int>((1.0f - quality) * 10.0f), q_table[q]); } } #endif // MPT_MP3ENCODER_LAME Modified: trunk/OpenMPT/mptrack/StreamEncoderVorbis.cpp =================================================================== --- trunk/OpenMPT/mptrack/StreamEncoderVorbis.cpp 2014-10-21 10:58:54 UTC (rev 4455) +++ trunk/OpenMPT/mptrack/StreamEncoderVorbis.cpp 2014-10-21 15:08:04 UTC (rev 4456) @@ -445,7 +445,9 @@ std::string VorbisEncoder::DescribeQuality(float quality) const //------------------------------------------------------------- { - return mpt::String::Print("Q%1", mpt::Format().ParsePrintf("%3.1f").ToString(quality * 10.0f)); + static const int q_table[11] = { 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 500 }; // http://wiki.hydrogenaud.io/index.php?title=Recommended_Ogg_Vorbis + int q = Clamp(Util::Round<int>(quality * 10.0f), 0, 10); + return mpt::String::Print("Q%1 (~%2 kbit)", mpt::fmt::f("%3.1f", quality * 10.0f), q_table[q]); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-10-23 19:34:57
|
Revision: 4475 http://sourceforge.net/p/modplug/code/4475 Author: saga-games Date: 2014-10-23 19:34:49 +0000 (Thu, 23 Oct 2014) Log Message: ----------- [Fix] Move FX slot dialog: Dialog still said "move chain" even when in clone mode. Modified Paths: -------------- trunk/OpenMPT/mptrack/MoveFXSlotDialog.cpp trunk/OpenMPT/mptrack/MoveFXSlotDialog.h trunk/OpenMPT/mptrack/mptrack.rc Modified: trunk/OpenMPT/mptrack/MoveFXSlotDialog.cpp =================================================================== --- trunk/OpenMPT/mptrack/MoveFXSlotDialog.cpp 2014-10-23 19:27:47 UTC (rev 4474) +++ trunk/OpenMPT/mptrack/MoveFXSlotDialog.cpp 2014-10-23 19:34:49 UTC (rev 4475) @@ -21,7 +21,6 @@ { CDialog::DoDataExchange(pDX); DDX_Control(pDX, IDC_COMBO1, m_CbnEmptySlots); - DDX_Control(pDX, IDC_EDIT1, m_EditPrompt); } @@ -35,10 +34,12 @@ { m_csPrompt.Format(_T("Clone plugin in slot %d to the following empty slot:"), currentSlot + 1); m_csTitle = _T("Clone To Slot..."); + m_csChain = _T("&Clone follow-up plugin chain if possible"); } else { m_csPrompt.Format(_T("Move plugin in slot %d to the following empty slot:"), currentSlot + 1); m_csTitle = _T("Move To Slot..."); + m_csChain = _T("&Move follow-up plugin chain if possible"); } } @@ -47,7 +48,8 @@ //------------------------------------ { CDialog::OnInitDialog(); - m_EditPrompt.SetWindowText(m_csPrompt); + SetDlgItemText(IDC_STATIC1, m_csPrompt); + SetDlgItemText(IDC_CHECK1, m_csChain); SetWindowText(m_csTitle); if(m_EmptySlots.empty()) Modified: trunk/OpenMPT/mptrack/MoveFXSlotDialog.h =================================================================== --- trunk/OpenMPT/mptrack/MoveFXSlotDialog.h 2014-10-23 19:27:47 UTC (rev 4474) +++ trunk/OpenMPT/mptrack/MoveFXSlotDialog.h 2014-10-23 19:34:49 UTC (rev 4475) @@ -16,8 +16,7 @@ { protected: const std::vector<PLUGINDEX> &m_EmptySlots; - CString m_csPrompt, m_csTitle; - CEdit m_EditPrompt; + CString m_csPrompt, m_csTitle, m_csChain; size_t m_nToSlot; PLUGINDEX m_nDefaultSlot; bool moveChain; Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2014-10-23 19:27:47 UTC (rev 4474) +++ trunk/OpenMPT/mptrack/mptrack.rc 2014-10-23 19:34:49 UTC (rev 4475) @@ -2657,16 +2657,15 @@ SCROLLBAR IDC_SCROLLBAR1,317,7,12,233,SBS_VERT | WS_DISABLED | WS_TABSTOP END -IDD_MOVEFXSLOT DIALOGEX 0, 0, 133, 87 +IDD_MOVEFXSLOT DIALOGEX 0, 0, 208, 58 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Dialog" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN - DEFPUSHBUTTON "OK",IDOK,78,66,50,14 - PUSHBUTTON "Cancel",IDCANCEL,6,66,50,14 - COMBOBOX IDC_COMBO1,42,30,48,172,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_EDIT1,6,6,120,19,ES_CENTER | ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER - CONTROL "Move plugin chain if possible",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,6,48,120,12 + LTEXT "Move",IDC_STATIC1,6,6,192,8 + COMBOBOX IDC_COMBO1,6,18,48,172,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "Chain",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,60,20,138,8 + DEFPUSHBUTTON "&OK",IDOK,150,36,50,14 + PUSHBUTTON "&Cancel",IDCANCEL,96,36,50,14 END IDD_CONTROL_GRAPH DIALOGEX 0, 0, 424, 145 @@ -2756,9 +2755,9 @@ IDD_MOVEFXSLOT, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 126 + RIGHTMARGIN, 201 TOPMARGIN, 7 - BOTTOMMARGIN, 82 + BOTTOMMARGIN, 53 END IDD_CONTROL_GRAPH, DIALOG This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-10-26 21:31:55
|
Revision: 4507 http://sourceforge.net/p/modplug/code/4507 Author: saga-games Date: 2014-10-26 21:31:40 +0000 (Sun, 26 Oct 2014) Log Message: ----------- [Fix] Tree view: Duplicating samples was broken since OpenMPT 1.23.01.00 [Fix] Rearranging samples no longer messes up the undo buffer. Modified Paths: -------------- trunk/OpenMPT/mptrack/Modedit.cpp trunk/OpenMPT/mptrack/Undo.cpp trunk/OpenMPT/mptrack/Undo.h Modified: trunk/OpenMPT/mptrack/Modedit.cpp =================================================================== --- trunk/OpenMPT/mptrack/Modedit.cpp 2014-10-26 15:43:26 UTC (rev 4506) +++ trunk/OpenMPT/mptrack/Modedit.cpp 2014-10-26 21:31:40 UTC (rev 4507) @@ -284,14 +284,6 @@ const SAMPLEINDEX oldNumSamples = m_SndFile.GetNumSamples(), newNumSamples = static_cast<SAMPLEINDEX>(newOrder.size()); - for(SAMPLEINDEX i = 0; i < std::min(newNumSamples, oldNumSamples); i++) - { - if(newOrder[i] != i + 1) - { - GetSampleUndo().PrepareUndo(i + 1, sundo_replace, "Rearrange"); - } - } - std::vector<int> sampleCount(oldNumSamples + 1, 0); std::vector<ModSample> sampleHeaders(oldNumSamples + 1); std::vector<SAMPLEINDEX> newIndex(oldNumSamples + 1, 0); // One of the new indexes for the old sample @@ -305,7 +297,7 @@ { sampleCount[origSlot]++; sampleHeaders[origSlot] = m_SndFile.GetSample(origSlot); - newIndex[origSlot] = i + 1; + if(!newIndex[origSlot]) newIndex[origSlot] = i + 1; } } @@ -315,6 +307,7 @@ if(sampleCount[i] == 0) { m_SndFile.DestroySample(i); + GetSampleUndo().ClearUndo(i); } sampleNames[i] = m_SndFile.m_szNames[i]; samplePaths[i] = m_SndFile.GetSamplePath(i); @@ -344,7 +337,7 @@ target.pSample = ModSample::AllocateSample(target.nLength, target.GetBytesPerSample()); if(target.pSample != nullptr) { - memcpy(target.pSample, sampleHeaders[origSlot].pSample, target.GetBytesPerSample()); + memcpy(target.pSample, sampleHeaders[origSlot].pSample, target.GetSampleSizeInBytes()); target.PrecomputeLoops(m_SndFile, false); } else { @@ -363,6 +356,8 @@ } } + GetSampleUndo().RearrangeSamples(newIndex); + for(CHANNELINDEX c = 0; c < CountOf(m_SndFile.m_PlayState.Chn); c++) { ModChannel &chn = m_SndFile.m_PlayState.Chn[c]; Modified: trunk/OpenMPT/mptrack/Undo.cpp =================================================================== --- trunk/OpenMPT/mptrack/Undo.cpp 2014-10-26 15:43:26 UTC (rev 4506) +++ trunk/OpenMPT/mptrack/Undo.cpp 2014-10-26 21:31:40 UTC (rev 4507) @@ -350,7 +350,7 @@ if(changeStart > oldSample.nLength || changeStart > changeEnd) { // Something is surely screwed up. - ASSERT(false); + MPT_ASSERT(false); return false; } @@ -393,7 +393,7 @@ break; default: - ASSERT(false); // whoops, what's this? someone forgot to implement it, some code is obviously missing here! + MPT_ASSERT(false); // whoops, what's this? someone forgot to implement it, some code is obviously missing here! return false; } @@ -471,7 +471,7 @@ case sundo_insert: // delete inserted data - ASSERT(changeLen == sample.nLength - undo.OldSample.nLength); + MPT_ASSERT(changeLen == sample.nLength - undo.OldSample.nLength); memcpy(pCurrentSample + undo.changeStart * bytesPerSample, pCurrentSample + undo.changeEnd * bytesPerSample, (sample.nLength - undo.changeEnd) * bytesPerSample); // also clean the sample end memset(pCurrentSample + undo.OldSample.nLength * bytesPerSample, 0, (sample.nLength - undo.OldSample.nLength) * bytesPerSample); @@ -501,7 +501,7 @@ break; default: - ASSERT(false); // whoops, what's this? someone forgot to implement it, some code is obviously missing here! + MPT_ASSERT(false); // whoops, what's this? someone forgot to implement it, some code is obviously missing here! return false; } @@ -582,6 +582,33 @@ } +// Update undo buffer when using rearrange sample functionality +void CSampleUndo::RearrangeSamples(undobuf_t &buffer, const std::vector<SAMPLEINDEX> &newIndex) +//--------------------------------------------------------------------------------------------- +{ + undobuf_t newBuf(modDoc.GetNumSamples()); + + for(SAMPLEINDEX smp = 1; smp < newIndex.size(); smp++) + { + MPT_ASSERT(newIndex[smp] <= modDoc.GetNumSamples()); + if(newIndex[smp] > 0 && newIndex[smp] <= modDoc.GetNumSamples() && smp <= buffer.size()) + { + newBuf[newIndex[smp] - 1] = buffer[smp - 1]; + } + } +#ifdef _DEBUG + for(size_t i = 0; i < buffer.size(); i++) + { + if(newIndex[i + 1] != 0) + MPT_ASSERT(newBuf[newIndex[i + 1] - 1].size() == buffer[i].size()); + else + MPT_ASSERT(buffer[i].empty()); + } +#endif + buffer = newBuf; +} + + // Return total amount of bytes used by the sample undo buffer. size_t CSampleUndo::GetBufferCapacity(const undobuf_t &buffer) const //------------------------------------------------------------------ Modified: trunk/OpenMPT/mptrack/Undo.h =================================================================== --- trunk/OpenMPT/mptrack/Undo.h 2014-10-26 15:43:26 UTC (rev 4506) +++ trunk/OpenMPT/mptrack/Undo.h 2014-10-26 21:31:40 UTC (rev 4507) @@ -148,6 +148,7 @@ bool SampleBufferExists(const undobuf_t &buffer, const SAMPLEINDEX smp) const; void RestrictBufferSize(undobuf_t &buffer, size_t &capacity); size_t GetBufferCapacity(const undobuf_t &buffer) const; + void RearrangeSamples(undobuf_t &buffer, const std::vector<SAMPLEINDEX> &newIndex); bool PrepareBuffer(undobuf_t &buffer, const SAMPLEINDEX smp, sampleUndoTypes changeType, const char *description, SmpLength changeStart, SmpLength changeEnd); bool Undo(undobuf_t &fromBuf, undobuf_t &toBuf, const SAMPLEINDEX smp); @@ -166,6 +167,7 @@ const char *GetUndoName(const SAMPLEINDEX smp) const; const char *GetRedoName(const SAMPLEINDEX smp) const; void RestrictBufferSize(); + void RearrangeSamples(const std::vector<SAMPLEINDEX> &newIndex) { RearrangeSamples(UndoBuffer, newIndex); RearrangeSamples(RedoBuffer, newIndex); } CSampleUndo(CModDoc &parent) : modDoc(parent) { } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-10-27 12:14:04
|
Revision: 4510 http://sourceforge.net/p/modplug/code/4510 Author: saga-games Date: 2014-10-27 12:13:48 +0000 (Mon, 27 Oct 2014) Log Message: ----------- [Mod] Only marked on-disk sample as modfied after undo/redo if the waveform actually changed. [Fix] Tree view: Set path didn't work if the old path was empty. Modified Paths: -------------- trunk/OpenMPT/mptrack/Undo.cpp trunk/OpenMPT/mptrack/View_smp.cpp trunk/OpenMPT/mptrack/View_tre.cpp Modified: trunk/OpenMPT/mptrack/Undo.cpp =================================================================== --- trunk/OpenMPT/mptrack/Undo.cpp 2014-10-27 08:25:23 UTC (rev 4509) +++ trunk/OpenMPT/mptrack/Undo.cpp 2014-10-27 12:13:48 UTC (rev 4510) @@ -516,6 +516,11 @@ } sample.PrecomputeLoops(sndFile, true); + if(undo.changeType != sundo_none) + { + sample.uFlags.set(SMP_MODIFIED); + } + fromBuf[smp - 1].push_back(undo); DeleteStep(fromBuf, smp, fromBuf[smp - 1].size() - 1); Modified: trunk/OpenMPT/mptrack/View_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_smp.cpp 2014-10-27 08:25:23 UTC (rev 4509) +++ trunk/OpenMPT/mptrack/View_smp.cpp 2014-10-27 12:13:48 UTC (rev 4510) @@ -2198,7 +2198,7 @@ if(pModDoc == nullptr) return; if(pModDoc->GetSampleUndo().Undo(m_nSample)) { - SetModified(HINT_SAMPLEINFO | HINT_SAMPLEDATA | HINT_SMPNAMES, true, true); + SetModified(HINT_SAMPLEINFO | HINT_SAMPLEDATA | HINT_SMPNAMES, true, false); } } @@ -2210,7 +2210,7 @@ if(pModDoc == nullptr) return; if(pModDoc->GetSampleUndo().Redo(m_nSample)) { - SetModified(HINT_SAMPLEINFO | HINT_SAMPLEDATA | HINT_SMPNAMES, true, true); + SetModified(HINT_SAMPLEINFO | HINT_SAMPLEDATA | HINT_SMPNAMES, true, false); } } Modified: trunk/OpenMPT/mptrack/View_tre.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp 2014-10-27 08:25:23 UTC (rev 4509) +++ trunk/OpenMPT/mptrack/View_tre.cpp 2014-10-27 12:13:48 UTC (rev 4510) @@ -3132,8 +3132,11 @@ SAMPLEINDEX smpID = static_cast<SAMPLEINDEX>(modItem.val1); const mpt::PathString path = pModDoc->GetrSoundFile().GetSamplePath(smpID); FileDialog dlg = OpenFileDialog() - .ExtensionFilter("All Samples|*.wav;*.flac|All files(*.*)|*.*||") // Only show samples that we actually can save as well. - .DefaultFilename(path.empty() ? TrackerDirectories::Instance().GetWorkingDirectory(DIR_SAMPLES) : path); + .ExtensionFilter("All Samples|*.wav;*.flac|All files(*.*)|*.*||"); // Only show samples that we actually can save as well. + if(path.empty()) + dlg.WorkingDirectory(TrackerDirectories::Instance().GetWorkingDirectory(DIR_SAMPLES)); + else + dlg.DefaultFilename(path); if(!dlg.Show()) return; TrackerDirectories::Instance().SetWorkingDirectory(dlg.GetWorkingDirectory(), DIR_SAMPLES); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-11-01 01:09:48
|
Revision: 4524 http://sourceforge.net/p/modplug/code/4524 Author: saga-games Date: 2014-11-01 01:09:28 +0000 (Sat, 01 Nov 2014) Log Message: ----------- [Imp] Make MIDI Mapping dialog more usable by making the mapping list more human-readable. [Imp] Sample tab: Improve sample loop point input behaviour so that loop end can be entered before loop start. Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/mptrack/Ctrl_smp.h trunk/OpenMPT/mptrack/MIDIMappingDialog.cpp trunk/OpenMPT/mptrack/MIDIMappingDialog.h trunk/OpenMPT/mptrack/mptrack.rc Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2014-10-31 18:29:55 UTC (rev 4523) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2014-11-01 01:09:28 UTC (rev 4524) @@ -96,10 +96,10 @@ ON_EN_CHANGE(IDC_SAMPLE_NAME, OnNameChanged) ON_EN_CHANGE(IDC_SAMPLE_FILENAME, OnFileNameChanged) ON_EN_CHANGE(IDC_EDIT_SAMPLE, OnSampleChanged) - ON_EN_CHANGE(IDC_EDIT1, OnLoopStartChanged) - ON_EN_CHANGE(IDC_EDIT2, OnLoopEndChanged) - ON_EN_CHANGE(IDC_EDIT3, OnSustainStartChanged) - ON_EN_CHANGE(IDC_EDIT4, OnSustainEndChanged) + ON_EN_CHANGE(IDC_EDIT1, OnLoopPointsChanged) + ON_EN_CHANGE(IDC_EDIT2, OnLoopPointsChanged) + ON_EN_CHANGE(IDC_EDIT3, OnSustainPointsChanged) + ON_EN_CHANGE(IDC_EDIT4, OnSustainPointsChanged) ON_EN_CHANGE(IDC_EDIT5, OnFineTuneChanged) ON_EN_CHANGE(IDC_EDIT7, OnVolumeChanged) ON_EN_CHANGE(IDC_EDIT8, OnGlobalVolChanged) @@ -2616,34 +2616,20 @@ } -void CCtrlSamples::OnLoopStartChanged() +void CCtrlSamples::OnLoopPointsChanged() //-------------------------------------- { if(IsLocked()) return; ModSample &sample = m_sndFile.GetSample(m_nSample); - SmpLength n = GetDlgItemInt(IDC_EDIT1); - if ((n >= 0) && (n < sample.nLength) && ((n < sample.nLoopEnd) || !sample.uFlags[CHN_LOOP])) + SmpLength start = GetDlgItemInt(IDC_EDIT1, NULL, FALSE), end = GetDlgItemInt(IDC_EDIT2, NULL, FALSE); + if(start < end || sample.uFlags[CHN_LOOP]) { - sample.SetLoop(n, sample.nLoopEnd, sample.uFlags[CHN_LOOP], sample.uFlags[CHN_PINGPONGLOOP], m_sndFile); + sample.SetLoop(start, end, sample.uFlags[CHN_LOOP], sample.uFlags[CHN_PINGPONGLOOP], m_sndFile); SetModified(HINT_SAMPLEINFO | HINT_SAMPLEDATA, false, false); } } -void CCtrlSamples::OnLoopEndChanged() -//------------------------------------ -{ - if(IsLocked()) return; - ModSample &sample = m_sndFile.GetSample(m_nSample); - SmpLength n = GetDlgItemInt(IDC_EDIT2); - if ((n >= 0) && (n <= sample.nLength) && ((n > sample.nLoopStart) || !sample.uFlags[CHN_LOOP])) - { - sample.SetLoop(sample.nLoopStart, n, sample.uFlags[CHN_LOOP], sample.uFlags[CHN_PINGPONGLOOP], m_sndFile); - SetModified(HINT_SAMPLEINFO | HINT_SAMPLEDATA, false, false); - } -} - - void CCtrlSamples::OnSustainTypeChanged() //--------------------------------------- { @@ -2677,36 +2663,20 @@ } -void CCtrlSamples::OnSustainStartChanged() -//---------------------------------------- +void CCtrlSamples::OnSustainPointsChanged() +//----------------------------------------- { if(IsLocked()) return; ModSample &sample = m_sndFile.GetSample(m_nSample); - SmpLength n = GetDlgItemInt(IDC_EDIT3); - if ((n >= 0) && (n <= sample.nLength) - && ((n < sample.nSustainEnd) || !sample.uFlags[CHN_SUSTAINLOOP])) + SmpLength start = GetDlgItemInt(IDC_EDIT3, NULL, FALSE), end = GetDlgItemInt(IDC_EDIT4, NULL, FALSE); + if(start < end || !sample.uFlags[CHN_SUSTAINLOOP]) { - sample.SetSustainLoop(n, sample.nSustainEnd, sample.uFlags[CHN_SUSTAINLOOP], sample.uFlags[CHN_PINGPONGSUSTAIN], m_sndFile); + sample.SetSustainLoop(start, end, sample.uFlags[CHN_SUSTAINLOOP], sample.uFlags[CHN_PINGPONGSUSTAIN], m_sndFile); SetModified(HINT_SAMPLEINFO | HINT_SAMPLEDATA, false, false); } } -void CCtrlSamples::OnSustainEndChanged() -//-------------------------------------- -{ - if(IsLocked()) return; - ModSample &sample = m_sndFile.GetSample(m_nSample); - SmpLength n = GetDlgItemInt(IDC_EDIT4); - if ((n >= 0) && (n <= sample.nLength) - && ((n > sample.nSustainStart) || !sample.uFlags[CHN_SUSTAINLOOP])) - { - sample.SetSustainLoop(sample.nSustainStart, n, sample.uFlags[CHN_SUSTAINLOOP], sample.uFlags[CHN_PINGPONGSUSTAIN], m_sndFile); - SetModified(HINT_SAMPLEINFO | HINT_SAMPLEDATA, false, false); - } -} - - #define SMPLOOP_ACCURACY 7 // 5% #define BIDILOOP_ACCURACY 2 // 5% Modified: trunk/OpenMPT/mptrack/Ctrl_smp.h =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.h 2014-10-31 18:29:55 UTC (rev 4523) +++ trunk/OpenMPT/mptrack/Ctrl_smp.h 2014-11-01 01:09:28 UTC (rev 4524) @@ -112,11 +112,9 @@ afx_msg void OnFineTuneChanged(); afx_msg void OnBaseNoteChanged(); afx_msg void OnLoopTypeChanged(); - afx_msg void OnLoopStartChanged(); - afx_msg void OnLoopEndChanged(); + afx_msg void OnLoopPointsChanged(); afx_msg void OnSustainTypeChanged(); - afx_msg void OnSustainStartChanged(); - afx_msg void OnSustainEndChanged(); + afx_msg void OnSustainPointsChanged(); afx_msg void OnVibTypeChanged(); afx_msg void OnVibDepthChanged(); afx_msg void OnVibSweepChanged(); Modified: trunk/OpenMPT/mptrack/MIDIMappingDialog.cpp =================================================================== --- trunk/OpenMPT/mptrack/MIDIMappingDialog.cpp 2014-10-31 18:29:55 UTC (rev 4523) +++ trunk/OpenMPT/mptrack/MIDIMappingDialog.cpp 2014-11-01 01:09:28 UTC (rev 4524) @@ -11,7 +11,9 @@ #include "stdafx.h" #include "mptrack.h" #include "MIDIMappingDialog.h" +#include "InputHandler.h" #include "../soundlib/MIDIEvents.h" +#include "../common/StringFixer.h" #include "mainfrm.h" @@ -25,6 +27,7 @@ m_rMIDIMapper(m_rSndFile.GetMIDIMapper()) //--------------------------------------------------------------------- { + CMainFrame::GetMainFrame()->GetInputHandler()->Bypass(true); oldMIDIRecondWnd = CMainFrame::GetMainFrame()->GetMidiRecordWnd(); } @@ -33,6 +36,7 @@ //--------------------------------------- { CMainFrame::GetMainFrame()->SetMidiRecordWnd(oldMIDIRecondWnd); + CMainFrame::GetMainFrame()->GetInputHandler()->Bypass(false); } @@ -43,7 +47,6 @@ DDX_Control(pDX, IDC_COMBO_CONTROLLER, m_ControllerCBox); DDX_Control(pDX, IDC_COMBO_PLUGIN, m_PluginCBox); DDX_Control(pDX, IDC_COMBO_PARAM, m_PlugParamCBox); - DDX_Control(pDX, IDC_EDIT1, m_EditValue); DDX_Control(pDX, IDC_LIST1, m_List); DDX_Control(pDX, IDC_COMBO_CHANNEL, m_ChannelCBox); DDX_Control(pDX, IDC_COMBO_EVENT, m_EventCBox); @@ -52,7 +55,7 @@ BEGIN_MESSAGE_MAP(CMIDIMappingDialog, CDialog) - ON_LBN_SELCHANGE(IDC_LIST1, OnLbnSelchangeList1) + ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST1, OnSelectionChanged) ON_BN_CLICKED(IDC_CHECKACTIVE, OnBnClickedCheckactive) ON_BN_CLICKED(IDC_CHECKCAPTURE, OnBnClickedCheckCapture) ON_CBN_SELCHANGE(IDC_COMBO_CONTROLLER, OnCbnSelchangeComboController) @@ -66,6 +69,10 @@ ON_MESSAGE(WM_MOD_MIDIMSG, OnMidiMsg) ON_NOTIFY(UDN_DELTAPOS, IDC_SPINMOVEMAPPING, OnDeltaposSpinmovemapping) ON_BN_CLICKED(IDC_CHECK_PATRECORD, OnBnClickedCheckPatRecord) + + ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, &CMIDIMappingDialog::OnToolTipNotify) + ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, &CMIDIMappingDialog::OnToolTipNotify) + END_MESSAGE_MAP() @@ -87,7 +94,6 @@ OnCbnSelchangeComboChannel(); OnCbnSelchangeComboEvent(); OnCbnSelchangeComboController(); - UpdateString(); break; } } @@ -102,32 +108,53 @@ CDialog::OnInitDialog(); // Add events - m_EventCBox.SetItemData(m_EventCBox.AddString("Controller change (0xB)"), MIDIEvents::evControllerChange); - m_EventCBox.SetItemData(m_EventCBox.AddString("Polyphonic aftertouch (0xA)"), MIDIEvents::evPolyAftertouch); - m_EventCBox.SetItemData(m_EventCBox.AddString("Channel aftertouch (0xD)"), MIDIEvents::evChannelAftertouch); + m_EventCBox.SetItemData(m_EventCBox.AddString("Controller Change (0xB)"), MIDIEvents::evControllerChange); + m_EventCBox.SetItemData(m_EventCBox.AddString("Polyphonic Aftertouch (0xA)"), MIDIEvents::evPolyAftertouch); + m_EventCBox.SetItemData(m_EventCBox.AddString("Channel Aftertouch (0xD)"), MIDIEvents::evChannelAftertouch); // Add controller names for(size_t i = MIDIEvents::MIDICC_start; i <= MIDIEvents::MIDICC_end; i++) { CString temp; - temp.Format("%3d %s", i, MIDIEvents::MidiCCNames[i]); + temp.Format("%3u %s", i, MIDIEvents::MidiCCNames[i]); m_ControllerCBox.AddString(temp); } // Add plugin names AddPluginNamesToCombobox(m_PluginCBox, m_rSndFile.m_MixPlugins); + // Initialize mapping list + const struct + { + const TCHAR *text; + int width; + } labels[] = + { + { _T("Active"), 20 }, + { _T("Channel"), 48 }, + { _T("Event"), 56 }, + { _T("Controller"), 120 }, + { _T("Plugin"), 120 }, + { _T("Parameter"), 120 }, + { _T("Capture"), 36 }, + { _T("Pattern Record"), 36 } + }; + for(int i = 0; i < CountOf(labels); i++) + { + m_List.InsertColumn(i, labels[i].text, LVCFMT_LEFT, labels[i].width); + } + m_List.SetExtendedStyle(m_List.GetExtendedStyle() | LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT); + // Add directives to list - typedef CMIDIMapper::const_iterator CITER; - for(CITER iter = m_rMIDIMapper.Begin(); iter != m_rMIDIMapper.End(); iter++) + for(size_t i = 0; i < m_rMIDIMapper.GetCount(); i++) { - m_List.AddString(CreateListString(*iter)); + InsertItem(m_rMIDIMapper.GetDirective(i), int(i)); } if(m_rMIDIMapper.GetCount() > 0 && m_Setting.IsDefault()) { - m_List.SetCurSel(0); - OnLbnSelchangeList1(); + SelectItem(0); + OnSelectionChanged(); } else { UpdateDialog(); @@ -135,16 +162,75 @@ GetDlgItem(IDC_CHECK_PATRECORD)->EnableWindow((m_rSndFile.GetType() == MOD_TYPE_MPT) ? TRUE : FALSE); - UpdateString(); - CMainFrame::GetMainFrame()->SetMidiRecordWnd(GetSafeHwnd()); CheckDlgButton(IDC_CHECK_MIDILEARN, BST_CHECKED); - + EnableToolTips(TRUE); + return TRUE; // return TRUE unless you set the focus to a control } +int CMIDIMappingDialog::InsertItem(const CMIDIMappingDirective& m, int insertAt) +//------------------------------------------------------------------------------ +{ + insertAt = m_List.InsertItem(insertAt, _T("")); + if(insertAt == -1) + return -1; + + CString s; + m_List.SetCheck(insertAt, m.IsActive() ? TRUE : FALSE); + if(m.GetAnyChannel()) + s = _T("Any"); + else + s.Format(_T("Ch %u"), m.GetChannel()); + m_List.SetItemText(insertAt, 1, s); + + switch(m.GetEvent()) + { + case MIDIEvents::evControllerChange: + s = _T("CC"); break; + case MIDIEvents::evPolyAftertouch: + s = _T("PolyAT"); break; + case MIDIEvents::evChannelAftertouch: + s = _T("ChanAT"); break; + default: + s.Format(_T("0x%02X"), m.GetEvent()); break; + } + m_List.SetItemText(insertAt, 2, s); + + if(m.GetController() <= MIDIEvents::MIDICC_end && m.GetEvent() == MIDIEvents::evControllerChange) + { + s.Format(_T("%u "), m.GetController()); + s += MIDIEvents::MidiCCNames[m.GetController()]; + m_List.SetItemText(insertAt, 3, s); + } + + const PLUGINDEX plugindex = m.GetPlugIndex(); + if(plugindex > 0 && plugindex < MAX_MIXPLUGINS) + { + s.Format(_T("FX%u: "), plugindex); + s += m_rSndFile.m_MixPlugins[plugindex - 1].GetName(); + m_List.SetItemText(insertAt, 4, s); + s.Format(_T("%02u: "), m.GetParamIndex()); + s += m_rSndFile.m_MixPlugins[plugindex - 1].GetParamName(m.GetParamIndex()).c_str(); + m_List.SetItemText(insertAt, 5, s); + } + m_List.SetItemText(insertAt, 6, m.GetCaptureMIDI() ? _T("Cap") : _T("")); + m_List.SetItemText(insertAt, 7, m.GetAllowPatternEdit() ? _T("PR") : _T("")); + + return insertAt; +} + + +void CMIDIMappingDialog::SelectItem(int i) +//---------------------------------------- +{ + m_List.SetItemState(i, LVIS_SELECTED, LVIS_SELECTED); + m_List.SetSelectionMark(i); +} + + void CMIDIMappingDialog::UpdateDialog() //------------------------------------- { @@ -167,13 +253,12 @@ m_ControllerCBox.SetCurSel(m_Setting.GetController()); m_PluginCBox.SetCurSel(m_Setting.GetPlugIndex() - 1); m_PlugParamCBox.SetCurSel(m_Setting.GetParamIndex()); - SetDlgItemText(IDC_EDIT1, m_Setting.ToString().c_str()); UpdateEvent(); UpdateParameters(); - const int i = m_List.GetCurSel(); - const bool enableMover = i >= 0 && ( (i > 0 && m_rMIDIMapper.AreOrderEqual(i - 1, i)) || (i + 1 < m_List.GetCount() && m_rMIDIMapper.AreOrderEqual(i, i + 1))); + const int i = m_List.GetSelectionMark(); + const bool enableMover = i >= 0 && ( (i > 0 && m_rMIDIMapper.AreOrderEqual(i - 1, i)) || (i + 1 < m_List.GetItemCount() && m_rMIDIMapper.AreOrderEqual(i, i + 1))); m_SpinMoveMapping.EnableWindow(enableMover); } @@ -199,10 +284,34 @@ } -void CMIDIMappingDialog::OnLbnSelchangeList1() -//-------------------------------------------- +void CMIDIMappingDialog::OnSelectionChanged(NMHDR *pNMHDR, LRESULT * /*pResult*/) +//-------------------------------------------------------------------------------- { - const int i = m_List.GetCurSel(); + int i; + if(pNMHDR != nullptr) + { + NMLISTVIEW *nmlv = (NMLISTVIEW *)pNMHDR; + + if(((nmlv->uOldState ^ nmlv->uNewState) & 0x3000) != 0 && nmlv->uOldState != 0) + { + // Check box status changed + CMIDIMappingDirective m = m_rMIDIMapper.GetDirective(nmlv->iItem); + m.SetActive(nmlv->uNewState == 0x2000); + m_rMIDIMapper.SetDirective(nmlv->iItem, m); + if(m_rSndFile.GetpModDoc()) + m_rSndFile.GetpModDoc()->SetModified(); + if(nmlv->iItem == m_List.GetSelectionMark()) + CheckDlgButton(IDC_CHECKACTIVE, nmlv->uNewState == 0x2000 ? BST_CHECKED :BST_UNCHECKED); + } + + if(nmlv->uNewState & LVIS_SELECTED) + i = nmlv->iItem; + else + return; + } else + { + i = m_List.GetSelectionMark(); + } if(i < 0 || (size_t)i >= m_rMIDIMapper.GetCount()) return; m_Setting = m_rMIDIMapper.GetDirective(i); UpdateDialog(); @@ -213,7 +322,6 @@ //----------------------------------------------- { m_Setting.SetActive(IsDlgButtonChecked(IDC_CHECKACTIVE) == BST_CHECKED); - UpdateString(); } @@ -221,7 +329,6 @@ //------------------------------------------------ { m_Setting.SetCaptureMIDI(IsDlgButtonChecked(IDC_CHECKCAPTURE) == BST_CHECKED); - UpdateString(); } @@ -229,22 +336,13 @@ //-------------------------------------------------- { m_Setting.SetAllowPatternEdit(IsDlgButtonChecked(IDC_CHECK_PATRECORD) == BST_CHECKED); - UpdateString(); } -void CMIDIMappingDialog::UpdateString() -//------------------------------------- -{ - SetDlgItemText(IDC_EDIT1, m_Setting.ToString().c_str()); -} - - void CMIDIMappingDialog::OnCbnSelchangeComboController() //------------------------------------------------------ { m_Setting.SetController(m_ControllerCBox.GetCurSel()); - UpdateString(); } @@ -252,7 +350,6 @@ //--------------------------------------------------- { m_Setting.SetChannel(m_ChannelCBox.GetCurSel()); - UpdateString(); } @@ -263,7 +360,6 @@ if(i < 0 || i >= MAX_MIXPLUGINS) return; m_Setting.SetPlugIndex(i+1); UpdateParameters(); - UpdateString(); } @@ -271,7 +367,6 @@ //------------------------------------------------- { m_Setting.SetParamIndex(m_PlugParamCBox.GetCurSel()); - UpdateString(); } @@ -281,7 +376,6 @@ uint8 eventType = static_cast<uint8>(m_EventCBox.GetItemData(m_EventCBox.GetCurSel())); m_Setting.SetEvent(eventType); UpdateEvent(); - UpdateString(); } @@ -291,16 +385,14 @@ if(m_rSndFile.GetModSpecifications().MIDIMappingDirectivesMax <= m_rMIDIMapper.GetCount()) { Reporting::Information("Maximum amount of MIDI Mapping directives reached."); - } - else + } else { const size_t i = m_rMIDIMapper.AddDirective(m_Setting); if(m_rSndFile.GetpModDoc()) m_rSndFile.GetpModDoc()->SetModified(); - m_List.InsertString(i, CreateListString(m_Setting)); - m_List.SetCurSel(i); - OnLbnSelchangeList1(); + SelectItem(InsertItem(m_Setting, i)); + OnSelectionChanged(); } } @@ -308,17 +400,16 @@ void CMIDIMappingDialog::OnBnClickedButtonReplace() //------------------------------------------------- { - const int i = m_List.GetCurSel(); + const int i = m_List.GetSelectionMark(); if(i >= 0 && (size_t)i < m_rMIDIMapper.GetCount()) { const size_t newIndex = m_rMIDIMapper.SetDirective(i, m_Setting); if(m_rSndFile.GetpModDoc()) m_rSndFile.GetpModDoc()->SetModified(); - m_List.DeleteString(i); - m_List.InsertString(newIndex, CreateListString(m_Setting)); - m_List.SetCurSel(newIndex); - OnLbnSelchangeList1(); + m_List.DeleteItem(i); + SelectItem(InsertItem(m_Setting, newIndex)); + OnSelectionChanged(); } } @@ -326,106 +417,113 @@ void CMIDIMappingDialog::OnBnClickedButtonRemove() //------------------------------------------------ { - int i = m_List.GetCurSel(); + int i = m_List.GetSelectionMark(); if(i >= 0 && (size_t)i < m_rMIDIMapper.GetCount()) { m_rMIDIMapper.RemoveDirective(i); if(m_rSndFile.GetpModDoc()) m_rSndFile.GetpModDoc()->SetModified(); - m_List.DeleteString(i); - if(m_List.GetCount() > 0) + m_List.DeleteItem(i); + if(m_List.GetItemCount() > 0) { - if(i < m_List.GetCount()) - m_List.SetCurSel(i); + if(i < m_List.GetItemCount()) + SelectItem(i); else - m_List.SetCurSel(i-1); + SelectItem(i - 1); } - i = m_List.GetCurSel(); + i = m_List.GetSelectionMark(); if(i >= 0 && (size_t)i < m_rMIDIMapper.GetCount()) m_Setting = m_rMIDIMapper.GetDirective(i); - OnLbnSelchangeList1(); - + OnSelectionChanged(); } } -CString CMIDIMappingDialog::CreateListString(const CMIDIMappingDirective& s) -//-------------------------------------------------------------------------- +void CMIDIMappingDialog::OnDeltaposSpinmovemapping(NMHDR *pNMHDR, LRESULT *pResult) +//--------------------------------------------------------------------------------- { - CString str; - str.Preallocate(100); - str = s.ToString().c_str(); - const BYTE plugindex = s.GetPlugIndex(); + const int index = m_List.GetSelectionMark(); + if(index < 0 || index >= m_List.GetItemCount()) return; - //Short ID name - while(str.GetLength() < 19) str.AppendChar('.'); - str.AppendChar('.'); + LPNMUPDOWN pNMUpDown = reinterpret_cast<LPNMUPDOWN>(pNMHDR); - //Controller name - if(s.GetController() <= MIDIEvents::MIDICC_end && s.GetEvent() == MIDIEvents::evControllerChange) + int newIndex = -1; + if(pNMUpDown->iDelta < 0) //Up { - CString tstr; - tstr.Format("%d %s", s.GetController(), MIDIEvents::MidiCCNames[s.GetController()]); - str.Insert(20, tstr); + if(index - 1 >= 0 && m_rMIDIMapper.AreOrderEqual(index-1, index)) + { + newIndex = index - 1; + } + } else //Down + { + if(index + 1 < m_List.GetItemCount() && m_rMIDIMapper.AreOrderEqual(index, index+1)) + { + newIndex = index + 1; + } } - while(str.GetLength() < 54) str.AppendChar('.'); - str.AppendChar('.'); - - //Plugname - if(plugindex > 0 && plugindex < MAX_MIXPLUGINS && m_rSndFile.m_MixPlugins[plugindex-1].pMixPlugin) + if(newIndex != -1) { - str.Insert(55, m_rSndFile.m_MixPlugins[plugindex-1].GetName()); - while(str.GetLength() < 79) str.AppendChar('.'); - str.AppendChar('.'); - - //Param name - str.Insert(80, m_rSndFile.m_MixPlugins[plugindex-1].GetParamName(s.GetParamIndex()).c_str()); + m_rMIDIMapper.Swap(size_t(newIndex), size_t(index)); + m_List.DeleteItem(index); + InsertItem(m_rMIDIMapper.GetDirective(newIndex), newIndex); + SelectItem(newIndex); } - else - str.Insert(55, "No plugin"); - - return str; + + *pResult = 0; } -void CMIDIMappingDialog::OnDeltaposSpinmovemapping(NMHDR *pNMHDR, LRESULT *pResult) -//--------------------------------------------------------------------------------- +BOOL CMIDIMappingDialog::OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult) +//-------------------------------------------------------------------------------- { - const int index = m_List.GetCurSel(); - if(index < 0 || index >= m_List.GetCount()) return; + MPT_UNREFERENCED_PARAMETER(id); + MPT_UNREFERENCED_PARAMETER(pResult); - LPNMUPDOWN pNMUpDown = reinterpret_cast<LPNMUPDOWN>(pNMHDR); - - if(pNMUpDown->iDelta < 0) //Up + // need to handle both ANSI and UNICODE versions of the message + TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR; + TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR; + const char *strTipText = ""; + UINT_PTR nID = pNMHDR->idFrom; + if(pNMHDR->code == TTN_NEEDTEXTA && (pTTTA->uFlags & TTF_IDISHWND) || + pNMHDR->code == TTN_NEEDTEXTW && (pTTTW->uFlags & TTF_IDISHWND)) { - if(index - 1 >= 0 && m_rMIDIMapper.AreOrderEqual(index-1, index)) - { - CString str; - m_List.GetText(index, str); - m_List.DeleteString(index); - m_List.InsertString(index-1, str); - m_rMIDIMapper.Swap(size_t(index-1), size_t(index)); - m_List.SetCurSel(index-1); - } + // idFrom is actually the HWND of the tool + nID = ::GetDlgCtrlID((HWND)nID); } - else //Down + + switch(nID) { - if(index + 1 < m_List.GetCount() && m_rMIDIMapper.AreOrderEqual(index, index+1)) - { - CString str; - m_List.GetText(index, str); - m_List.DeleteString(index); - m_List.InsertString(index+1, str); - m_rMIDIMapper.Swap(size_t(index), size_t(index+1)); - m_List.SetCurSel(index+1); - } + case IDC_CHECKCAPTURE: + strTipText = "The event is not passed to any further MIDI mappings or recording facilities."; + break; + case IDC_CHECKACTIVE: + strTipText = "The MIDI mapping is enabled and can be procssed."; + break; + case IDC_CHECK_PATRECORD: + strTipText = "Parameter changes are recorded into patterns as Parameter Control events."; + break; + case IDC_CHECK_MIDILEARN: + strTipText = "Listens to incoming MIDI data to automatically fill in the appropriate data."; + break; + case IDC_SPINMOVEMAPPING: + strTipText = "Change the processing order of the current selected MIDI mapping."; + break; } - - - *pResult = 0; + + if(pNMHDR->code == TTN_NEEDTEXTA) + { + // 80 chars max?! + mpt::String::CopyN(pTTTA->szText, strTipText); + } else + { + ::MultiByteToWideChar(CP_ACP , 0, strTipText, strlen(strTipText) + 1, + pTTTW->szText, CountOf(pTTTW->szText)); + } + + return TRUE; } Modified: trunk/OpenMPT/mptrack/MIDIMappingDialog.h =================================================================== --- trunk/OpenMPT/mptrack/MIDIMappingDialog.h 2014-10-31 18:29:55 UTC (rev 4523) +++ trunk/OpenMPT/mptrack/MIDIMappingDialog.h 2014-11-01 01:09:28 UTC (rev 4524) @@ -38,8 +38,7 @@ CComboBox m_PlugParamCBox; CComboBox m_ChannelCBox; CComboBox m_EventCBox; - CEdit m_EditValue; - CListBox m_List; + CListCtrl m_List; CSpinButtonCtrl m_SpinMoveMapping; public: @@ -50,15 +49,16 @@ void UpdateDialog(); void UpdateEvent(); void UpdateParameters(); - void UpdateString(); - CString CreateListString(const CMIDIMappingDirective& s); + int InsertItem(const CMIDIMappingDirective& m, int insertAt); + void SelectItem(int i); virtual BOOL OnInitDialog(); virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support DECLARE_MESSAGE_MAP() - afx_msg void OnLbnSelchangeList1(); + afx_msg void OnSelectionChanged(NMHDR *pNMHDR = nullptr, LRESULT *pResult = nullptr); + afx_msg BOOL OnToolTipNotify(UINT id, NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnBnClickedCheckactive(); afx_msg void OnBnClickedCheckCapture(); Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2014-10-31 18:29:55 UTC (rev 4523) +++ trunk/OpenMPT/mptrack/mptrack.rc 2014-11-01 01:09:28 UTC (rev 4524) @@ -2556,34 +2556,33 @@ LTEXT "Static",IDC_MESSAGETEXT,7,7,172,40 END -IDD_MIDIPARAMCONTROL DIALOGEX 0, 0, 340, 223 +IDD_MIDIPARAMCONTROL DIALOGEX 0, 0, 412, 247 STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_TOOLWINDOW CAPTION "MIDI Mapping" FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - GROUPBOX "Current mapping",IDC_STATIC,5,5,325,105 - CONTROL "Active",IDC_CHECKACTIVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,20,42,10 - CONTROL "Capture",IDC_CHECKCAPTURE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,67,20,39,10 - LTEXT "Channel",IDC_STATIC,15,35,27,8 - COMBOBOX IDC_COMBO_CHANNEL,15,45,36,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Event",IDC_STATIC,61,35,20,8 - COMBOBOX IDC_COMBO_EVENT,61,45,104,73,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Controller",IDC_STATIC,171,35,32,8 - COMBOBOX IDC_COMBO_CONTROLLER,171,45,150,90,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Plugin",IDC_STATIC,15,60,20,8 - COMBOBOX IDC_COMBO_PLUGIN,15,70,150,76,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LTEXT "Parameter",IDC_STATIC,171,60,34,8 - COMBOBOX IDC_COMBO_PARAM,171,70,149,83,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_EDIT1,15,90,114,12,ES_AUTOHSCROLL | ES_READONLY - PUSHBUTTON "Add",IDC_BUTTON_ADD,175,90,45,12 - PUSHBUTTON "Replace",IDC_BUTTON_REPLACE,225,90,45,12 - PUSHBUTTON "Remove",IDC_BUTTON_REMOVE,275,90,45,12 - LISTBOX IDC_LIST1,5,115,313,82,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - CONTROL "",IDC_SPINMOVEMAPPING,"msctls_updown32",0x0,318,115,11,82 - CONTROL "MIDI Learn",IDC_CHECK_MIDILEARN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,276,18,47,11 - DEFPUSHBUTTON "Close",IDOK,276,204,50,14 - CONTROL "Pattern Record",IDC_CHECK_PATRECORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,114,20,65,10 + GROUPBOX "Current Mapping",IDC_STATIC,5,5,391,91 + CONTROL "&Active",IDC_CHECKACTIVE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,18,48,10 + CONTROL "&Capture",IDC_CHECKCAPTURE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,66,18,48,10 + CONTROL "Pattern &Record",IDC_CHECK_PATRECORD,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,114,18,65,10 + CONTROL "&MIDI Learn",IDC_CHECK_MIDILEARN,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,276,18,59,11 + LTEXT "C&hannel",IDC_STATIC,12,36,27,8 + COMBOBOX IDC_COMBO_CHANNEL,12,48,36,65,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "&Event",IDC_STATIC,60,36,102,8 + COMBOBOX IDC_COMBO_EVENT,60,48,102,73,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "C&ontroller",IDC_STATIC,174,36,150,8 + COMBOBOX IDC_COMBO_CONTROLLER,174,48,150,90,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Pl&ugin",IDC_STATIC,12,66,150,8 + COMBOBOX IDC_COMBO_PLUGIN,12,78,150,76,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "&Parameter",IDC_STATIC,174,66,150,8 + COMBOBOX IDC_COMBO_PARAM,174,78,150,83,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "A&dd",IDC_BUTTON_ADD,342,18,45,12 + PUSHBUTTON "Rep&lace",IDC_BUTTON_REPLACE,342,36,45,12 + PUSHBUTTON "Remo&ve",IDC_BUTTON_REMOVE,342,54,45,12 + CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SINGLESEL | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,5,102,385,120 + CONTROL "",IDC_SPINMOVEMAPPING,"msctls_updown32",0x0,390,102,11,120 + DEFPUSHBUTTON "Close",IDOK,342,228,60,14 END IDD_TUNING DIALOGEX 0, 0, 512, 231 @@ -2720,9 +2719,9 @@ IDD_MIDIPARAMCONTROL, DIALOG BEGIN - RIGHTMARGIN, 336 + RIGHTMARGIN, 408 TOPMARGIN, 2 - BOTTOMMARGIN, 222 + BOTTOMMARGIN, 246 END IDD_TUNING, DIALOG This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-11-01 07:33:01
|
Revision: 4525 http://sourceforge.net/p/modplug/code/4525 Author: manxorist Date: 2014-11-01 07:32:51 +0000 (Sat, 01 Nov 2014) Log Message: ----------- [Ref] VUMeter: Remove global variables and implement it in its own class. [Ref] VUMeter: Cleanup pointless double-rounding in decay calculation. [Mod] VUMeter: Do not clamp the internal maximum value to the maximum displayable value. This caused the VUMeter to decay immediately even directly after extreme clipping. Modified Paths: -------------- trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mainbar.cpp trunk/OpenMPT/mptrack/Mainfrm.h Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2014-11-01 01:09:28 UTC (rev 4524) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2014-11-01 07:32:51 UTC (rev 4525) @@ -118,11 +118,6 @@ std::vector<mpt::PathString> CMainFrame::s_ExampleModulePaths; std::vector<mpt::PathString> CMainFrame::s_TemplateModulePaths; -LONG CMainFrame::gnLVuMeter = 0; -LONG CMainFrame::gnRVuMeter = 0; -bool CMainFrame::gnClipLeft = false; -bool CMainFrame::gnClipRight = false; - // GDI HICON CMainFrame::m_hIcon = NULL; HFONT CMainFrame::m_hGUIFont = NULL; @@ -689,15 +684,18 @@ //============================== : public AudioReadTargetBufferInterleavedDynamic { +private: + VUMeter &vumeter; public: - StereoVuMeterTargetWrapper(SampleFormat sampleFormat, bool clipFloat, Dither &dither, void *buffer) + StereoVuMeterTargetWrapper(SampleFormat sampleFormat, bool clipFloat, Dither &dither, void *buffer, VUMeter &vumeter) : AudioReadTargetBufferInterleavedDynamic(sampleFormat, clipFloat, dither, buffer) + , vumeter(vumeter) { return; } virtual void DataCallback(int *MixSoundBuffer, std::size_t channels, std::size_t countChunk) { - CMainFrame::CalcStereoVuMeters(MixSoundBuffer, countChunk, channels); + vumeter.Process(MixSoundBuffer, channels, countChunk); AudioReadTargetBufferInterleavedDynamic::DataCallback(MixSoundBuffer, channels, countChunk); } }; @@ -716,7 +714,7 @@ timingInfo.Speed = timeInfo.Speed; m_pSndFile->m_TimingInfo = timingInfo; m_Dither.SetMode((DitherMode)settings.DitherType); - StereoVuMeterTargetWrapper target(settings.sampleFormat, flags.NeedsClippedFloat, m_Dither, buffer); + StereoVuMeterTargetWrapper target(settings.sampleFormat, flags.NeedsClippedFloat, m_Dither, buffer, m_VUMeter); CSoundFile::samplecount_t renderedFrames = m_pSndFile->Read(numFrames, target); ASSERT(renderedFrames <= numFrames); CSoundFile::samplecount_t remainingFrames = numFrames - renderedFrames; @@ -833,39 +831,46 @@ } -void CMainFrame::CalcStereoVuMeters(int *pMix, unsigned long nSamples, unsigned long nChannels) -//--------------------------------------------------------------------------------------------- +void VUMeter::Process(const int *mixbuffer, std::size_t numChannels, std::size_t numFrames) +//----------------------------------------------------------------------------------------- { - const int * const p = pMix; - int lmax = gnLVuMeter, rmax = gnRVuMeter; - if (nChannels > 1) + for(std::size_t frame = 0; frame < numFrames; ++frame) { - for (UINT i=0; i<nSamples; i++) + for(std::size_t channel = 0; channel < std::min(numChannels, maxChannels); ++channel) { - int vl = p[i*nChannels]; - int vr = p[i*nChannels+1]; - if (vl < 0) vl = -vl; - if (vr < 0) vr = -vr; - if (vl > lmax) lmax = vl; - if (vr > rmax) rmax = vr; + Channel &c = channels[channel]; + const int sample = mixbuffer[frame*numChannels + channel]; + c.peak = std::max(c.peak, std::abs(sample)); + if(sample < MIXING_CLIPMIN || MIXING_CLIPMAX < sample) + { + c.clipped = true; + } } - } else + } +} + + +void VUMeter::Decay(int32 secondsNum, int32 secondsDen) +//----------------------------------------------------- +{ + int32 decay = Util::muldivr(120000 << 11, secondsNum, secondsDen); + for(std::size_t channel = 0; channel < maxChannels; ++channel) { - for (UINT i=0; i<nSamples; i++) - { - int vl = p[i*nChannels]; - if (vl < 0) vl = -vl; - if (vl > lmax) lmax = vl; - } - rmax = lmax; + channels[channel].peak = std::max(channels[channel].peak - decay, 0); } - gnLVuMeter = lmax; - gnRVuMeter = rmax; - if(lmax > MIXING_CLIPMAX) gnClipLeft = true; - if(rmax > MIXING_CLIPMAX) gnClipRight = true; } +void VUMeter::ResetClipped() +//-------------------------- +{ + for(std::size_t channel = 0; channel < maxChannels; ++channel) + { + channels[channel].clipped = false; + } +} + + bool CMainFrame::DoNotification(DWORD dwSamplesRead, int64 streamPosition) //------------------------------------------------------------------------ { @@ -969,18 +974,13 @@ { // Master VU meter - uint32 lVu = (gnLVuMeter >> 11); - uint32 rVu = (gnRVuMeter >> 11); - if(lVu > 0x10000) lVu = 0x10000; - if(rVu > 0x10000) rVu = 0x10000; - notification.masterVU[0] = lVu; - notification.masterVU[1] = rVu; - if(gnClipLeft) notification.masterVU[0] |= Notification::ClipVU; - if(gnClipRight) notification.masterVU[1] |= Notification::ClipVU; - uint32 dwVuDecay = Util::muldiv(dwSamplesRead, 120000, m_pSndFile->m_MixerSettings.gdwMixingFreq) + 1; + notification.masterVU[0] = Clamp(m_VUMeter[0].peak >> 11, 0, 0x10000); + notification.masterVU[1] = Clamp(m_VUMeter[1].peak >> 11, 0, 0x10000); + if(m_VUMeter[0].clipped) notification.masterVU[0] |= Notification::ClipVU; + if(m_VUMeter[1].clipped) notification.masterVU[1] |= Notification::ClipVU; + int32 us = Util::muldivr(dwSamplesRead, 1000000, m_pSndFile->m_MixerSettings.gdwMixingFreq); + m_VUMeter.Decay(dwSamplesRead, m_pSndFile->m_MixerSettings.gdwMixingFreq); - if (lVu >= dwVuDecay) gnLVuMeter = (lVu - dwVuDecay) << 11; else gnLVuMeter = 0; - if (rVu >= dwVuDecay) gnRVuMeter = (rVu - dwVuDecay) << 11; else gnRVuMeter = 0; } { @@ -1325,8 +1325,7 @@ m_wndToolBar.SetCurrentSong(m_pSndFile); - gnLVuMeter = gnRVuMeter = 0; - gnClipLeft = gnClipRight = false; + m_VUMeter = VUMeter(); if(!StartPlayback()) { Modified: trunk/OpenMPT/mptrack/Mainbar.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mainbar.cpp 2014-11-01 01:09:28 UTC (rev 4524) +++ trunk/OpenMPT/mptrack/Mainbar.cpp 2014-11-01 07:32:51 UTC (rev 4525) @@ -1224,7 +1224,7 @@ //----------------------------------------- { // Reset clip indicator. - CMainFrame::gnClipLeft = CMainFrame::gnClipRight = false; + CMainFrame::GetMainFrame()->m_VUMeter.ResetClipped(); } Modified: trunk/OpenMPT/mptrack/Mainfrm.h =================================================================== --- trunk/OpenMPT/mptrack/Mainfrm.h 2014-11-01 01:09:28 UTC (rev 4524) +++ trunk/OpenMPT/mptrack/Mainfrm.h 2014-11-01 07:32:51 UTC (rev 4525) @@ -296,6 +296,26 @@ } +class VUMeter +{ +public: + static const std::size_t maxChannels = 4; + struct Channel + { + int32 peak; + bool clipped; + Channel() : peak(0), clipped(false) { } + }; +private: + Channel channels[maxChannels]; +public: + const Channel & operator [] (std::size_t channel) const { return channels[channel]; } + void Process(const int *mixbuffer, std::size_t numChannels, std::size_t numFrames); // mixbuffer is interleaved + void Decay(int32 secondsNum, int32 secondsDen); + void ResetClipped(); +}; + + //====================================================================================================== class CMainFrame: public CMDIFrameWnd, public SoundDevice::ISource, public SoundDevice::IMessageReceiver //====================================================================================================== @@ -324,13 +344,11 @@ SoundDevice::IBase *gpSoundDevice; UINT_PTR m_NotifyTimer; Dither m_Dither; + VUMeter m_VUMeter; DWORD m_AudioThreadId; bool m_InNotifyHandler; - static LONG gnLVuMeter, gnRVuMeter; - static bool gnClipLeft, gnClipRight; - // Midi Input public: static HMIDIIN shMidiIn; @@ -375,7 +393,6 @@ public: static void UpdateDspEffects(CSoundFile &sndFile, bool reset=false); static void UpdateAudioParameters(CSoundFile &sndFile, bool reset=false); - static void CalcStereoVuMeters(int *, unsigned long, unsigned long); // from SoundDevice::ISource void FillAudioBufferLocked(SoundDevice::IFillAudioBuffer &callback); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |