From: <sag...@us...> - 2012-09-28 19:54:14
|
Revision: 1367 http://modplug.svn.sourceforge.net/modplug/?rev=1367&view=rev Author: saga-games Date: 2012-09-28 19:54:06 +0000 (Fri, 28 Sep 2012) Log Message: ----------- [New] Pattern Editor: Can now also transpose by arbitrary amounts. Select from context menu or shortcut. [Mod] Updated various keymaps to add custom transpose command. [Mod] OpenMPT: Version is now 1.20.03.02 Modified Paths: -------------- trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/CommandSet.h trunk/OpenMPT/mptrack/KeyConfigDlg.cpp trunk/OpenMPT/mptrack/View_ins.cpp trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/View_pat.h trunk/OpenMPT/mptrack/dlg_misc.cpp trunk/OpenMPT/mptrack/dlg_misc.h trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/mptrack/resource.h trunk/OpenMPT/mptrack/version.h trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb trunk/OpenMPT/packageTemplate/extraKeymaps/FI_FT2Style_cce.mkb trunk/OpenMPT/packageTemplate/extraKeymaps/FR_FT2Style_(goor00).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_(legovitch).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_classic_(vanisherIII).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/NO_mpt_classic_(rakib).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/SE_laptop_(ganja).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/US_it2_(lpchip).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(nobuyuki).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(snu).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/US_mptit_(coda).mkb trunk/OpenMPT/packageTemplate/extraKeymaps/dvorak_(snu).mkb Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2012-09-28 19:54:06 UTC (rev 1367) @@ -633,6 +633,7 @@ DefineKeyCommand(kcChnSettingsPrev, 1878, _T("Previous Channel")); DefineKeyCommand(kcChnSettingsNext, 1879, _T("Next Channel")); DefineKeyCommand(kcChnSettingsClose, 1880, _T("Switch to Pattern Editor")); + DefineKeyCommand(kcTransposeCustom, 1881, _T("Transpose Custom")); // Add new key commands here. #ifdef _DEBUG Modified: trunk/OpenMPT/mptrack/CommandSet.h =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.h 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/mptrack/CommandSet.h 2012-09-28 19:54:06 UTC (rev 1367) @@ -267,6 +267,7 @@ kcTransposeDown, kcTransposeOctUp, kcTransposeOctDown, + kcTransposeCustom, kcPatternAmplify, kcPatternInterpolateNote, kcPatternInterpolateVol, @@ -277,11 +278,11 @@ kcPatternSetInstrument, kcPatternGrowSelection, kcPatternShrinkSelection, - // kcClearSelection, - kcClearRow, + // kcClearSelection, + kcClearRow, kcClearField, kcClearFieldITStyle, - kcClearRowStep, + kcClearRowStep, kcClearFieldStep, kcClearFieldStepITStyle, kcDeleteRows, Modified: trunk/OpenMPT/mptrack/KeyConfigDlg.cpp =================================================================== --- trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/mptrack/KeyConfigDlg.cpp 2012-09-28 19:54:06 UTC (rev 1367) @@ -276,9 +276,9 @@ for(int c = kcStartChannelKeys; c <= kcEndChannelKeys; c++) newCat.commands.Add(c); newCat.separators.Add(kcEndChannelKeys); //-------------------------------------- - for(int c = kcTransposeUp; c <= kcTransposeOctDown; c++) + for(int c = kcTransposeUp; c <= kcTransposeCustom; c++) newCat.commands.Add(c); - newCat.separators.Add(kcTransposeOctDown); //-------------------------------------- + newCat.separators.Add(kcTransposeCustom); //-------------------------------------- for(int c = kcPatternAmplify; c <= kcPatternShrinkSelection; c++) newCat.commands.Add(c); newCat.separators.Add(kcPatternShrinkSelection); //-------------------------------------- Modified: trunk/OpenMPT/mptrack/View_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_ins.cpp 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/mptrack/View_ins.cpp 2012-09-28 19:54:06 UTC (rev 1367) @@ -2311,7 +2311,7 @@ int nOffset = ((m_nEnv != ENV_VOLUME) && !GetEnvelopePtr()->dwFlags[ENV_FILTER]) ? 32 : 0; CScaleEnvPointsDlg dlg(this, GetEnvelopePtr(), nOffset); - if(dlg.DoModal()) + if(dlg.DoModal() == IDOK) { SetInstrumentModified(); pModDoc->UpdateAllViews(NULL, (m_nInstrument << HINT_SHIFT_INS) | HINT_ENVELOPE, NULL); Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2012-09-28 19:54:06 UTC (rev 1367) @@ -108,6 +108,7 @@ ON_COMMAND(ID_TRANSPOSE_DOWN, OnTransposeDown) ON_COMMAND(ID_TRANSPOSE_OCTUP, OnTransposeOctUp) ON_COMMAND(ID_TRANSPOSE_OCTDOWN, OnTransposeOctDown) + ON_COMMAND(ID_TRANSPOSE_CUSTOM, OnTransposeCustom) ON_COMMAND(ID_PATTERN_PROPERTIES, OnPatternProperties) ON_COMMAND(ID_PATTERN_INTERPOLATE_VOLUME, OnInterpolateVolume) ON_COMMAND(ID_PATTERN_INTERPOLATE_EFFECT, OnInterpolateEffect) @@ -1370,7 +1371,7 @@ if(pModDoc && pModDoc->GetSoundFile() && pModDoc->GetSoundFile()->Patterns.IsValidPat(m_nPattern)) { CPatternPropertiesDlg dlg(pModDoc, m_nPattern, this); - if (dlg.DoModal()) + if(dlg.DoModal() == IDOK) { UpdateScrollSize(); InvalidatePattern(true); @@ -2791,6 +2792,19 @@ } +void CViewPattern::OnTransposeCustom() +//------------------------------------ +{ + static int32 tranpose = 1; + CInputDlg dlg(this, "Enter transpose amount:", -(NOTE_MAX - NOTE_MIN), (NOTE_MAX - NOTE_MIN), tranpose); + if(dlg.DoModal() == IDOK) + { + tranpose = dlg.resultNumber; + TransposeSelection(dlg.resultNumber); + } +} + + bool CViewPattern::TransposeSelection(int transp) //----------------------------------------------- { @@ -3980,6 +3994,7 @@ case kcTransposeDown: OnTransposeDown(); return wParam; case kcTransposeOctUp: OnTransposeOctUp(); return wParam; case kcTransposeOctDown: OnTransposeOctDown(); return wParam; + case kcTransposeCustom: OnTransposeCustom(); return wParam; case kcSelectColumn: OnSelectCurrentColumn(); return wParam; case kcPatternAmplify: OnPatternAmplify(); return wParam; case kcPatternSetInstrument: OnSetSelInstrument(); return wParam; @@ -5747,12 +5762,13 @@ vector<CHANNELINDEX> validChans; DWORD greyed = IsColumnSelected(PatternCursor::noteColumn) ? FALSE : MF_GRAYED; - if (!greyed || !(CMainFrame::GetSettings().m_dwPatternSetup & PATTERN_OLDCTXMENUSTYLE)) + if(!greyed || !(CMainFrame::GetSettings().m_dwPatternSetup & PATTERN_OLDCTXMENUSTYLE)) { AppendMenu(transMenu, MF_STRING | greyed, ID_TRANSPOSE_UP, "Transpose +1\t" + ih->GetKeyTextFromCommand(kcTransposeUp)); AppendMenu(transMenu, MF_STRING | greyed, ID_TRANSPOSE_DOWN, "Transpose -1\t" + ih->GetKeyTextFromCommand(kcTransposeDown)); AppendMenu(transMenu, MF_STRING | greyed, ID_TRANSPOSE_OCTUP, "Transpose +12\t" + ih->GetKeyTextFromCommand(kcTransposeOctUp)); AppendMenu(transMenu, MF_STRING | greyed, ID_TRANSPOSE_OCTDOWN, "Transpose -12\t" + ih->GetKeyTextFromCommand(kcTransposeOctDown)); + AppendMenu(transMenu, MF_STRING | greyed, ID_TRANSPOSE_CUSTOM, "Custom...\t" + ih->GetKeyTextFromCommand(kcTransposeCustom)); AppendMenu(hMenu, MF_POPUP | greyed, reinterpret_cast<UINT_PTR>(transMenu), "Transpose..."); return true; } @@ -5765,7 +5781,7 @@ vector<CHANNELINDEX> validChans; DWORD greyed = IsColumnSelected(PatternCursor::volumeColumn) ? 0 : MF_GRAYED; - if (!greyed || !(CMainFrame::GetSettings().m_dwPatternSetup & PATTERN_OLDCTXMENUSTYLE)) + if(!greyed || !(CMainFrame::GetSettings().m_dwPatternSetup & PATTERN_OLDCTXMENUSTYLE)) { AppendMenu(hMenu, MF_STRING | greyed, ID_PATTERN_AMPLIFY, "Amplify\t" + ih->GetKeyTextFromCommand(kcPatternAmplify)); return true; Modified: trunk/OpenMPT/mptrack/View_pat.h =================================================================== --- trunk/OpenMPT/mptrack/View_pat.h 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/mptrack/View_pat.h 2012-09-28 19:54:06 UTC (rev 1367) @@ -383,6 +383,7 @@ afx_msg void OnTransposeDown() { TransposeSelection(-1); } afx_msg void OnTransposeOctUp() { TransposeSelection(12); } afx_msg void OnTransposeOctDown() { TransposeSelection(-12); } + afx_msg void OnTransposeCustom(); afx_msg void OnSetSelInstrument(); afx_msg void OnAddChannelFront() { AddChannelBefore(m_MenuCursor.GetChannel()); } afx_msg void OnAddChannelAfter() { AddChannelBefore(m_MenuCursor.GetChannel() + 1); }; Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp =================================================================== --- trunk/OpenMPT/mptrack/dlg_misc.cpp 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2012-09-28 19:54:06 UTC (rev 1367) @@ -1122,6 +1122,75 @@ } +///////////////////////////////////////////////////////////////////////// +// Generic input dialog + +void CInputDlg::DoDataExchange(CDataExchange* pDX) +//------------------------------------------------ +{ + CDialog::DoDataExchange(pDX); + DDX_Control(pDX, IDC_SPIN1, spin); +} + + +BOOL CInputDlg::OnInitDialog() +//---------------------------- +{ + CDialog::OnInitDialog(); + SetDlgItemText(IDC_PROMPT, description); + + // Get all current control sizes and positions + CRect windowRect, labelRect, inputRect, okRect, cancelRect; + GetWindowRect(windowRect); + GetDlgItem(IDC_PROMPT)->GetWindowRect(labelRect); + GetDlgItem(IDC_EDIT1)->GetWindowRect(inputRect); + GetDlgItem(IDOK)->GetWindowRect(okRect); + GetDlgItem(IDCANCEL)->GetWindowRect(cancelRect); + ScreenToClient(labelRect); + ScreenToClient(inputRect); + ScreenToClient(okRect); + ScreenToClient(cancelRect); + + // Find out how big our label shall be + CSize size; + GetTextExtentPoint32(GetDC()->GetSafeHdc(), description, strlen(description), &size); + if(size.cx < 320) size.cx = 320; + const int windowWidth = windowRect.Width() - labelRect.Width() + size.cx; + const int windowHeight = windowRect.Height() - labelRect.Height() + size.cy; + + // Resize and move all controls + GetDlgItem(IDC_PROMPT)->SetWindowPos(nullptr, 0, 0, size.cx, size.cy, SWP_NOMOVE | SWP_NOZORDER); + GetDlgItem(IDC_EDIT1)->SetWindowPos(nullptr, inputRect.left, labelRect.top + size.cy + (inputRect.top - labelRect.bottom), size.cx, inputRect.Height(), SWP_NOZORDER); + GetDlgItem(IDOK)->SetWindowPos(nullptr, windowWidth - (windowRect.Width() - okRect.left), windowHeight - (windowRect.Height() - okRect.top), 0, 0, SWP_NOSIZE | SWP_NOZORDER); + GetDlgItem(IDCANCEL)->SetWindowPos(nullptr, windowWidth - (windowRect.Width() - cancelRect.left), windowHeight - (windowRect.Height() - cancelRect.top), 0, 0, SWP_NOSIZE | SWP_NOZORDER); + SetWindowPos(nullptr, 0, 0, windowWidth, windowHeight, SWP_NOMOVE | SWP_NOZORDER); + + if(minValue != maxValue) + { + // Numeric + spin.SetRange(minValue, maxValue); + spin.SetBuddy(GetDlgItem(IDC_EDIT1)); + SetDlgItemInt(IDC_EDIT1, resultNumber); + } else + { + // Text + spin.ShowWindow(SW_HIDE); + SetDlgItemText(IDC_EDIT1, resultString); + } + + return TRUE; +} + + +void CInputDlg::OnOK() +//-------------------- +{ + CDialog::OnOK(); + GetDlgItemText(IDC_EDIT1, resultString); + resultNumber = static_cast<int32>(GetDlgItemInt(IDC_EDIT1)); +} + + /////////////////////////////////////////////////////////////////////////////////////// // Messagebox with 'don't show again'-option. Modified: trunk/OpenMPT/mptrack/dlg_misc.h =================================================================== --- trunk/OpenMPT/mptrack/dlg_misc.h 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/mptrack/dlg_misc.h 2012-09-28 19:54:06 UTC (rev 1367) @@ -222,6 +222,37 @@ ///////////////////////////////////////////////////////////////////////// +// Generic input dialog + +//============================= +class CInputDlg: public CDialog +//============================= +{ +protected: + CSpinButtonCtrl spin; + const char *description; + int32 minValue, maxValue; + +public: + CString resultString; + int32 resultNumber; + +public: + // Initialize text input box + CInputDlg(CWnd *parent, const char *desc, const char *defaultString) : CDialog(IDD_INPUT, parent), + description(desc), minValue(0), maxValue(0), resultString(defaultString) { } + // Initialize numeric input box + CInputDlg(CWnd *parent, const char *desc, int32 minVal, int32 maxVal, int32 defaultNumber) : CDialog(IDD_INPUT, parent), + description(desc), minValue(minVal), maxValue(maxVal), resultNumber(defaultNumber) { } + +protected: + virtual void DoDataExchange(CDataExchange* pDX); + virtual BOOL OnInitDialog(); + virtual void OnOK(); +}; + + +///////////////////////////////////////////////////////////////////////// // Messagebox with 'don't show again'-option. // Enums for message entries. See dlg_misc.cpp for the array of entries. Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/mptrack/mptrack.rc 2012-09-28 19:54:06 UTC (rev 1367) @@ -244,6 +244,19 @@ END +IDD_INPUT DIALOGEX 0, 0, 166, 66 +STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTERMOUSE | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "OpenMPT" +FONT 8, "MS Shell Dlg", 400, 0, 0x1 +BEGIN + LTEXT "",IDC_PROMPT,6,6,156,12 + EDITTEXT IDC_EDIT1,6,24,150,12,ES_AUTOHSCROLL + CONTROL "",IDC_SPIN1,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,150,24,11,11 + DEFPUSHBUTTON "OK",IDOK,54,42,50,14 + PUSHBUTTON "Cancel",IDCANCEL,108,42,50,14 +END + + ///////////////////////////////////////////////////////////////////////////// // // DESIGNINFO @@ -347,6 +360,14 @@ TOPMARGIN, 7 BOTTOMMARGIN, 70 END + + IDD_INPUT, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 159 + TOPMARGIN, 7 + BOTTOMMARGIN, 59 + END END #endif // APSTUDIO_INVOKED Modified: trunk/OpenMPT/mptrack/resource.h =================================================================== --- trunk/OpenMPT/mptrack/resource.h 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/mptrack/resource.h 2012-09-28 19:54:06 UTC (rev 1367) @@ -148,6 +148,7 @@ #define IDD_OPTIONS_UPDATE 529 #define IDD_CLOSEDOCUMENTS 530 #define IDD_AUTOTUNE 531 +#define IDD_INPUT 532 #define IDC_BUTTON1 1001 #define IDC_BUTTON2 1002 #define IDC_BUTTON3 1003 @@ -938,6 +939,7 @@ #define IDC_SAMPLE_AUTOTUNE 2437 #define IDC_FIND 2438 #define IDC_PITCHWHEELDEPTH 2439 +#define IDC_PROMPT 2440 #define ID_FILE_NEWMOD 32771 #define ID_FILE_NEWXM 32772 #define ID_FILE_NEWS3M 32773 @@ -1207,15 +1209,16 @@ #define ID_HELPSHOW 44602 #define ID_ORDERLIST_LOCKPLAYBACK 44603 #define ID_ORDERLIST_UNLOCKPLAYBACK 44604 +#define ID_TRANSPOSE_CUSTOM 44605 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 535 -#define _APS_NEXT_COMMAND_VALUE 44605 -#define _APS_NEXT_CONTROL_VALUE 2440 +#define _APS_NEXT_RESOURCE_VALUE 536 +#define _APS_NEXT_COMMAND_VALUE 44606 +#define _APS_NEXT_CONTROL_VALUE 2441 #define _APS_NEXT_SYMED_VALUE 901 #endif #endif Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/mptrack/version.h 2012-09-28 19:54:06 UTC (rev 1367) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 20 #define VER_MINOR 03 -#define VER_MINORMINOR 01 +#define VER_MINORMINOR 02 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2012-09-28 19:54:06 UTC (rev 1367) @@ -103,6 +103,7 @@ 2:1008:2:65:5 //Transpose -1: Ctrl+A (KeyDown|KeyHold) 2:1009:3:81:5 //Transpose +12: Shift+Ctrl+Q (KeyDown|KeyHold) 2:1010:3:65:5 //Transpose -12: Shift+Ctrl+A (KeyDown|KeyHold) +2:1881:2:84:1 //Transpose Custom: Ctrl+T (KeyDown) 2:1012:2:77:1 //Amplify selection: Ctrl+M (KeyDown) 2:1014:2:74:1 //Interpolate Volume: Ctrl+J (KeyDown) 2:1015:2:75:1 //Interpolate Effect: Ctrl+K (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/FI_FT2Style_cce.mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/FI_FT2Style_cce.mkb 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/FI_FT2Style_cce.mkb 2012-09-28 19:54:06 UTC (rev 1367) @@ -87,6 +87,7 @@ 2:1008:4:81:5 //Transpose -1: Alt+Q (KeyDown|KeyHold) 2:1009:5:65:5 //Transpose +12: Shift+Alt+A (KeyDown|KeyHold) 2:1010:5:81:5 //Transpose -12: Shift+Alt+Q (KeyDown|KeyHold) +2:1881:2:84:1 //Transpose Custom: Ctrl+T (KeyDown) 2:1012:4:74:1 //Amplify selection: Alt+J (KeyDown) 2:1014:4:73:1 //Interpolate volume: Alt+I (KeyDown) 2:1015:4:88:1 //Interpolate effect: Alt+X (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/FR_FT2Style_(goor00).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/FR_FT2Style_(goor00).mkb 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/FR_FT2Style_(goor00).mkb 2012-09-28 19:54:06 UTC (rev 1367) @@ -84,6 +84,7 @@ 2:1008:2:81:5 //Transpose -1: Ctrl+Q (KeyDown|KeyHold) 2:1009:6:81:5 //Transpose +12: Ctrl+Alt+Q (KeyDown|KeyHold) 2:1010:6:65:5 //Transpose -12: Ctrl+Alt+A (KeyDown|KeyHold) +2:1881:2:84:1 //Transpose Custom: Ctrl+T (KeyDown) 2:1012:4:74:1 //Amplify selection: Alt+J (KeyDown) 2:1014:4:73:1 //Interpolate volume: Alt+I (KeyDown) 2:1015:4:88:1 //Interpolate effect: Alt+X (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_(legovitch).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_(legovitch).mkb 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_(legovitch).mkb 2012-09-28 19:54:06 UTC (rev 1367) @@ -91,6 +91,7 @@ 2:1008:2:81:1 //Transpose -1: Ctrl+Q (KeyDown) 2:1009:6:65:5 //Transpose +12: Ctrl+Alt+A (KeyDown|KeyHold) 2:1010:6:81:5 //Transpose -12: Ctrl+Alt+Q (KeyDown|KeyHold) +2:1881:2:84:1 //Transpose Custom: Ctrl+T (KeyDown) 2:1012:2:77:1 //Amplify selection: Ctrl+M (KeyDown) 2:1014:2:74:1 //Interpolate volume: Ctrl+J (KeyDown) 2:1015:2:75:1 //Interpolate effect: Ctrl+K (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_classic_(vanisherIII).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_classic_(vanisherIII).mkb 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/FR_mpt_classic_(vanisherIII).mkb 2012-09-28 19:54:06 UTC (rev 1367) @@ -77,6 +77,7 @@ 2:1008:2:81:1 //Transpose -1: Ctrl+Q (KeyDown) 2:1009:6:65:5 //Transpose +12: Ctrl+Alt+A (KeyDown|KeyHold) 2:1010:6:81:5 //Transpose -12: Ctrl+Alt+Q (KeyDown|KeyHold) +2:1881:2:84:1 //Transpose Custom: Ctrl+T (KeyDown) 2:1012:2:77:1 //Amplify selection: Ctrl+M (KeyDown) 2:1014:2:74:1 //Interpolate volume: Ctrl+J (KeyDown) 2:1015:2:75:1 //Interpolate effect: Ctrl+K (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/NO_mpt_classic_(rakib).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/NO_mpt_classic_(rakib).mkb 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/NO_mpt_classic_(rakib).mkb 2012-09-28 19:54:06 UTC (rev 1367) @@ -86,6 +86,7 @@ 2:1008:2:65:5 //Transpose -1: Ctrl+A (KeyDown|KeyHold) 2:1009:3:81:5 //Transpose +12: Shift+Ctrl+Q (KeyDown|KeyHold) 2:1010:3:65:5 //Transpose -12: Shift+Ctrl+A (KeyDown|KeyHold) +2:1881:2:84:1 //Transpose Custom: Ctrl+T (KeyDown) 2:1012:2:77:1 //Amplify selection: Ctrl+M (KeyDown) 2:1014:2:74:1 //Interpolate volume: Ctrl+J (KeyDown) 2:1015:2:75:1 //Interpolate effect: Ctrl+K (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/SE_laptop_(ganja).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/SE_laptop_(ganja).mkb 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/SE_laptop_(ganja).mkb 2012-09-28 19:54:06 UTC (rev 1367) @@ -49,6 +49,7 @@ 2:1008:6:40:1 //Transpose -1: Ctrl+Alt+NEDPIL (KeyDown) 2:1009:3:38:1 //Transpose +12: Shift+Ctrl+UPPIL (KeyDown) 2:1010:3:40:1 //Transpose -12: Shift+Ctrl+NEDPIL (KeyDown) +2:1881:2:84:1 //Transpose Custom: Ctrl+T (KeyDown) 2:1014:2:74:1 //Interpolate volume: Ctrl+J (KeyDown) 2:1015:2:75:1 //Interpolate effect: Ctrl+K (KeyDown) 2:1016:0:65:1 //Open effect visualizer: A (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/UK_mpt_it2_hybrid_(rewbs).mkb 2012-09-28 19:54:06 UTC (rev 1367) @@ -89,6 +89,7 @@ 2:1008:4:65:5 //Transpose -1: Alt+A (KeyDown|KeyHold) 2:1009:6:81:5 //Transpose +12: Ctrl+Alt+Q (KeyDown|KeyHold) 2:1010:6:65:5 //Transpose -12: Ctrl+Alt+A (KeyDown|KeyHold) +2:1881:2:84:1 //Transpose Custom: Ctrl+T (KeyDown) 2:1012:4:74:1 //Amplify selection: Alt+J (KeyDown) 2:1014:4:73:1 //Interpolate volume: Alt+I (KeyDown) 2:1015:4:88:1 //Interpolate effect: Alt+X (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/US_it2_(lpchip).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/US_it2_(lpchip).mkb 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/US_it2_(lpchip).mkb 2012-09-28 19:54:06 UTC (rev 1367) @@ -81,6 +81,7 @@ 2:1008:4:65:5 //Transpose -1: Alt+A (KeyDown|KeyHold) 2:1009:6:81:5 //Transpose +12: Ctrl+Alt+Q (KeyDown|KeyHold) 2:1010:6:65:5 //Transpose -12: Ctrl+Alt+A (KeyDown|KeyHold) +2:1881:2:84:1 //Transpose Custom: Ctrl+T (KeyDown) 2:1012:4:74:1 //Amplify selection: Alt+J (KeyDown) 2:1014:4:75:1 //Interpolate volume: Alt+K (KeyDown) 2:1015:4:88:1 //Interpolate effect: Alt+X (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(nobuyuki).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(nobuyuki).mkb 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(nobuyuki).mkb 2012-09-28 19:54:06 UTC (rev 1367) @@ -74,6 +74,7 @@ 2:1008:2:65:5 //Transpose -1: Ctrl+A (KeyDown|KeyHold) 2:1009:3:81:5 //Transpose +12: Shift+Ctrl+Q (KeyDown|KeyHold) 2:1010:3:65:5 //Transpose -12: Shift+Ctrl+A (KeyDown|KeyHold) +2:1881:2:84:1 //Transpose Custom: Ctrl+T (KeyDown) 2:1012:2:77:1 //Amplify selection: Ctrl+M (KeyDown) 2:1014:2:74:1 //Interpolate volume: Ctrl+J (KeyDown) 2:1015:2:75:1 //Interpolate effect: Ctrl+K (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(snu).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(snu).mkb 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/US_mpt_classic_(snu).mkb 2012-09-28 19:54:06 UTC (rev 1367) @@ -92,6 +92,7 @@ 2:1008:2:65:5 //Transpose -1: Ctrl+A (KeyDown|KeyHold) 2:1009:3:81:5 //Transpose +12: Shift+Ctrl+Q (KeyDown|KeyHold) 2:1010:3:65:5 //Transpose -12: Shift+Ctrl+A (KeyDown|KeyHold) +2:1881:2:84:1 //Transpose Custom: Ctrl+T (KeyDown) 2:1012:2:77:1 //Amplify selection: Ctrl+M (KeyDown) 2:1014:2:74:1 //Interpolate volume: Ctrl+J (KeyDown) 2:1015:2:75:1 //Interpolate effect: Ctrl+K (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/US_mptit_(coda).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/US_mptit_(coda).mkb 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/US_mptit_(coda).mkb 2012-09-28 19:54:06 UTC (rev 1367) @@ -83,6 +83,7 @@ 2:1008:4:65:5 //Transpose -1: Alt+A (KeyDown|KeyHold) 2:1009:6:81:5 //Transpose +12: Ctrl+Alt+Q (KeyDown|KeyHold) 2:1010:6:65:5 //Transpose -12: Ctrl+Alt+A (KeyDown|KeyHold) +2:1881:2:84:1 //Transpose Custom: Ctrl+T (KeyDown) 2:1012:4:74:1 //Amplify selection: Alt+J (KeyDown) 2:1014:4:75:1 //Interpolate volume: Alt+K (KeyDown) 2:1015:4:88:1 //Interpolate effect: Alt+X (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/dvorak_(snu).mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/dvorak_(snu).mkb 2012-09-28 15:36:28 UTC (rev 1366) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/dvorak_(snu).mkb 2012-09-28 19:54:06 UTC (rev 1367) @@ -92,6 +92,7 @@ 2:1008:2:65:5 //Transpose -1: Ctrl+A (KeyDown|KeyHold) 2:1009:6:222:5 //Transpose +12: Ctrl+Alt+' (KeyDown|KeyHold) 2:1010:6:65:5 //Transpose -12: Ctrl+Alt+A (KeyDown|KeyHold) +2:1881:2:84:1 //Transpose Custom: Ctrl+T (KeyDown) 2:1012:2:77:1 //Amplify selection: Ctrl+M (KeyDown) 2:1014:2:74:1 //Interpolate volume: Ctrl+J (KeyDown) 2:1015:2:75:1 //Interpolate effect: Ctrl+K (KeyDown) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-09-29 19:59:01
|
Revision: 1368 http://modplug.svn.sourceforge.net/modplug/?rev=1368&view=rev Author: saga-games Date: 2012-09-29 19:58:54 +0000 (Sat, 29 Sep 2012) Log Message: ----------- [Fix] WAV Export file name was faulty when not exporting in instrument/channel mode [Fix] Input boxes in general tab didn't allow for vertical scrolling (broke some of them due to the recent font change) [Fix] Compatibility-exported XM files are now loaded with the correct compatible settings again. Modified Paths: -------------- trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/soundlib/Load_xm.cpp Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2012-09-28 19:54:06 UTC (rev 1367) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2012-09-29 19:58:54 UTC (rev 1368) @@ -1543,13 +1543,10 @@ // will set default dir here because there's no setup option for export dir yet (feel free to add one...) CMainFrame::GetSettings().SetDefaultDirectory(files.workingDirectory.c_str(), DIR_EXPORT, true); - CString fileName, fileExt; - { - char drive[_MAX_DRIVE], dir[_MAX_DIR], name[_MAX_FNAME], ext[_MAX_EXT]; - _splitpath(files.first_file.c_str(), drive, dir, name, ext); - fileName = CString(drive) + CString(dir) + CString(name); - fileExt = CString(ext); - } + char drive[_MAX_DRIVE], dir[_MAX_DIR], name[_MAX_FNAME], ext[_MAX_EXT]; + _splitpath(files.first_file.c_str(), drive, dir, name, ext); + const CString fileName = CString(drive) + CString(dir) + CString(name); + const CString fileExt = CString(ext); // Saving as wave file @@ -1609,7 +1606,7 @@ for(int i = 0 ; i < nRenderPasses ; i++) { CString thisName = fileName; - char fileNameAdd[_MAX_FNAME]; + char fileNameAdd[_MAX_FNAME] = ""; // Channel mode if(wsdlg.m_bChannelMode) Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2012-09-28 19:54:06 UTC (rev 1367) +++ trunk/OpenMPT/mptrack/mptrack.rc 2012-09-29 19:58:54 UTC (rev 1368) @@ -635,26 +635,26 @@ GROUPBOX "",IDC_STATIC,1,14,83,82 LTEXT "Initial tempo:",IDC_STATIC,5,20,44,8 CONTROL "",IDC_SLIDER_SONGTEMPO,"msctls_trackbar32",TBS_VERT | TBS_BOTH | TBS_NOTICKS,11,28,15,50 - EDITTEXT IDC_EDIT_TEMPO,5,78,29,12,ES_NUMBER + EDITTEXT IDC_EDIT_TEMPO,5,78,29,12,ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN_TEMPO,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,27,76,11,14 LTEXT "Ticks/row:",IDC_STATIC,44,40,35,8 - EDITTEXT IDC_EDIT_SPEED,44,51,30,12,ES_NUMBER + EDITTEXT IDC_EDIT_SPEED,44,51,30,12,ES_AUTOHSCROLL | ES_NUMBER CONTROL "Spin1",IDC_SPIN_SPEED,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,67,50,11,14 LTEXT "Restart:",IDC_STATIC,44,68,26,8 - EDITTEXT IDC_EDIT_RESTARTPOS,44,78,30,12,ES_NUMBER + EDITTEXT IDC_EDIT_RESTARTPOS,44,78,30,12,ES_AUTOHSCROLL | ES_NUMBER CONTROL "Spin1",IDC_SPIN_RESTARTPOS,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,65,77,11,14 GROUPBOX "",IDC_STATIC,83,14,175,82 LTEXT "Initial global vol:",IDC_STATIC,90,20,52,8 CONTROL "",IDC_SLIDER_GLOBALVOL,"msctls_trackbar32",TBS_VERT | TBS_BOTH | TBS_NOTICKS | TBS_TOOLTIPS,105,28,15,50 - EDITTEXT IDC_EDIT_GLOBALVOL,95,78,36,12,ES_NUMBER + EDITTEXT IDC_EDIT_GLOBALVOL,95,78,36,12,ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN_GLOBALVOL,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,124,76,11,14 LTEXT "VSTi vol:",IDC_STATIC,159,20,33,8 CONTROL "",IDC_SLIDER_VSTIVOL,"msctls_trackbar32",TBS_VERT | TBS_BOTH | TBS_NOTICKS | TBS_TOOLTIPS,164,28,15,50 - EDITTEXT IDC_EDIT_VSTIVOL,156,78,36,12,ES_NUMBER + EDITTEXT IDC_EDIT_VSTIVOL,156,78,36,12,ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN_VSTIVOL,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,184,76,11,14 LTEXT "Sample vol:",IDC_STATIC,212,20,38,8 CONTROL "Slider1",IDC_SLIDER_SAMPLEPREAMP,"msctls_trackbar32",TBS_VERT | TBS_BOTH | TBS_NOTICKS | TBS_TOOLTIPS,221,28,15,50 - EDITTEXT IDC_EDIT_SAMPLEPA,212,78,36,12,ES_NUMBER + EDITTEXT IDC_EDIT_SAMPLEPA,212,78,36,12,ES_AUTOHSCROLL | ES_NUMBER CONTROL "",IDC_SPIN_SAMPLEPA,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS | UDS_NOTHOUSANDS,238,75,11,14 PUSHBUTTON "Song Properties...",IDC_BUTTON_MODTYPE,264,18,66,12,NOT WS_TABSTOP CONTROL "Loop Song",IDC_CHECK_LOOPSONG,"Button",BS_AUTOCHECKBOX | BS_FLAT | WS_TABSTOP,263,48,67,10 Modified: trunk/OpenMPT/soundlib/Load_xm.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_xm.cpp 2012-09-28 19:54:06 UTC (rev 1367) +++ trunk/OpenMPT/soundlib/Load_xm.cpp 2012-09-29 19:58:54 UTC (rev 1368) @@ -244,7 +244,8 @@ verOldModPlug = 0x01, // Made with MPT Alpha / Beta verNewModPlug = 0x02, // Made with MPT (not Alpha / Beta) verModPlug1_09 = 0x04, // Made with MPT 1.09 or possibly other version - verConfirmed = 0x08, // We are very sure that we found the correct tracker version. + verOpenMPT = 0x08, // Made with OpenMPT + verConfirmed = 0x10, // We are very sure that we found the correct tracker version. }; @@ -328,7 +329,7 @@ m_dwLastSavedWithVersion = MAKE_VERSION_NUMERIC(1, 00, 00, A5); } else if(instrHeader.size == 263) { - // ModPlug Tracker Beta + // ModPlug Tracker Beta (Beta 1 still behaves like Alpha, but Beta 3.3 does it this way) m_dwLastSavedWithVersion = MAKE_VERSION_NUMERIC(1, 00, 00, B3); } else { @@ -511,6 +512,7 @@ m_dwLastSavedWithVersion = MAKE_VERSION_NUMERIC(1, 16, 00, 00); } } + if(!memcmp(fileHeader.trackerName, "OpenMPT ", 8)) { // Hey, I know this tracker! @@ -518,22 +520,20 @@ memcpy(mptVersion, fileHeader.trackerName + 8, 12); StringFixer::SetNullTerminator(mptVersion); m_dwLastSavedWithVersion = MptVersion::ToNum(mptVersion); + madeWith = verOpenMPT | verConfirmed; } - if(m_dwLastSavedWithVersion != 0) + if(m_dwLastSavedWithVersion != 0 && !madeWith[verOpenMPT]) { m_nMixLevels = mixLevels_original; SetModFlag(MSF_COMPATIBLE_PLAY, false); } -// -> CODE#0027 -// -> DESC="per-instrument volume ramping setup (refered as attack)" - // Leave if no extra instrument settings are available (end of file reached) if(!file.BytesLeft()) return true; bool interpretOpenMPTMade = false; // specific for OpenMPT 1.17+ (bMadeWithModPlug is also for MPT 1.16) - if(m_nInstruments) + if(GetNumInstruments()) { file.Skip(reinterpret_cast<const char *>(LoadExtendedInstrumentProperties(reinterpret_cast<LPCBYTE>(file.GetRawData()), reinterpret_cast<LPCBYTE>(file.GetRawData()) + file.BytesLeft(), &interpretOpenMPTMade)) - file.GetRawData()); } @@ -543,11 +543,13 @@ if(interpretOpenMPTMade) { UpgradeModFlags(); + + if(m_dwLastSavedWithVersion == 0) + { + m_dwLastSavedWithVersion = MAKE_VERSION_NUMERIC(1, 17, 00, 00); // early versions of OpenMPT had no version indication. + } } - if(interpretOpenMPTMade && m_dwLastSavedWithVersion == 0) - m_dwLastSavedWithVersion = MAKE_VERSION_NUMERIC(1, 17, 01, 00); // early versions of OpenMPT had no version indication. - return true; } @@ -594,7 +596,7 @@ // Writing song header xmheader.version = 0x0104; // XM Format v1.04 - xmheader.size = sizeof(XMFileHeader) - 60; // minus everything before this field + xmheader.size = sizeof(XMFileHeader) - 60; // minus everything before this field xmheader.restartPos = m_nRestartPos; xmheader.channels = (m_nChannels + 1) & 0xFFFE; // avoid odd channel count for FT2 compatibility This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-10-04 17:16:26
|
Revision: 1371 http://modplug.svn.sourceforge.net/modplug/?rev=1371&view=rev Author: saga-games Date: 2012-10-04 17:16:19 +0000 (Thu, 04 Oct 2012) Log Message: ----------- [Mod] Changed default resampling type to XMMS-ModPlug [Mod] Scrollwheel improvements in pattern/instrument editor (http://bugs.openmpt.org/view.php?id=99#c904) Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_ins.cpp trunk/OpenMPT/mptrack/Ctrl_pat.cpp trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/soundlib/Snd_defs.h Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2012-09-29 22:06:17 UTC (rev 1370) +++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2012-10-04 17:16:19 UTC (rev 1371) @@ -2389,7 +2389,7 @@ //---------------------------------------------------------------------- { CModControlDlg::OnVScroll(nCode, nPos, pSB); - if (nCode == SB_ENDSCROLL) SwitchToView(); + //if (nCode == SB_ENDSCROLL) SwitchToView(); } Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2012-09-29 22:06:17 UTC (rev 1370) +++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2012-10-04 17:16:19 UTC (rev 1371) @@ -654,10 +654,10 @@ m_CbnInstrument.SetCurSel(nins); OnInstrumentChanged(); } - if ((nSBCode == SB_ENDSCROLL) && (m_hWndView)) - { - SwitchToView(); - } +// if ((nSBCode == SB_ENDSCROLL) && (m_hWndView)) +// { +// SwitchToView(); +// } } Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2012-09-29 22:06:17 UTC (rev 1370) +++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2012-10-04 17:16:19 UTC (rev 1371) @@ -195,11 +195,11 @@ } COMBOBOXEXITEM cbi; UINT iItem = 0; - for (UINT nDevType=0; nDevType<SNDDEV_NUM_DEVTYPES; nDevType++) + for (UINT nDevType = 0; nDevType < SNDDEV_NUM_DEVTYPES; nDevType++) { UINT nDev = 0; - while (EnumerateSoundDevices(nDevType, nDev, s, sizeof(s))) + while (EnumerateSoundDevices(nDevType, nDev, s, CountOf(s))) { cbi.mask = CBEIF_IMAGE | CBEIF_LPARAM | CBEIF_TEXT | CBEIF_SELECTEDIMAGE | CBEIF_OVERLAY; cbi.iItem = iItem; @@ -602,7 +602,7 @@ char s[10] = ""; switch (dwSrcMode) { - case SRCMODE_POLYPHASE: + case SRCMODE_POLYPHASE: m_CbnWFIRType.AddString("Kaiser 8 Tap"); m_CbnWFIRType.SetCurSel(0); m_CbnWFIRType.EnableWindow(FALSE); @@ -633,16 +633,15 @@ OnSettingsChanged(); } + void COptionsPlayer::OnDefaultResampling() +//---------------------------------------- { - //CMainFrame::GetSettings().gbWFIRType = 7; //WFIR_KAISER4T - //CMainFrame::GetSettings().gdWFIRCutoff = 0.97; - //CMainFrame::GetSettings().m_nSrcMode = SRCMODE_POLYPHASE - //CMainFrame::glVolumeRampSamples = 42; - m_CbnResampling.SetCurSel(SRCMODE_POLYPHASE); + m_CbnResampling.SetCurSel(SRCMODE_FIRFILTER); OnResamplerChanged(); + m_CbnWFIRType.SetCurSel(7 /*WFIR_KAISER4T*/); m_CEditWFIRCutoff.SetWindowText("97"); - m_CEditRampUp.SetWindowText("42"); + m_CEditRampUp.SetWindowText("16"); m_CEditRampDown.SetWindowText("42"); } Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2012-09-29 22:06:17 UTC (rev 1370) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2012-10-04 17:16:19 UTC (rev 1371) @@ -63,7 +63,7 @@ m_dwSoundSetup = SOUNDSETUP_SECONDARY; m_nChannels = 2; m_dwQuality = 0; - m_nSrcMode = SRCMODE_POLYPHASE; + m_nSrcMode = SRCMODE_FIRFILTER; m_nBitsPerSample = 16; m_nPreAmp = 128; gbLoopSong = TRUE; @@ -390,7 +390,7 @@ orderlistMargins = GetPrivateProfileInt("Pattern Editor", "DefaultSequenceMargins", orderlistMargins, iniFile); gbShowHackControls = (0 != CMainFrame::GetPrivateProfileDWord("Misc", "ShowHackControls", gbShowHackControls ? 1 : 0, iniFile)); CSoundFile::s_DefaultPlugVolumeHandling = static_cast<uint8>(GetPrivateProfileInt("Misc", "DefaultPlugVolumeHandling", CSoundFile::s_DefaultPlugVolumeHandling, iniFile)); - if(CSoundFile::s_DefaultPlugVolumeHandling > 2) CSoundFile::s_DefaultPlugVolumeHandling = PLUGIN_VOLUMEHANDLING_IGNORE; + if(CSoundFile::s_DefaultPlugVolumeHandling >= PLUGIN_VOLUMEHANDLING_MAX) CSoundFile::s_DefaultPlugVolumeHandling = PLUGIN_VOLUMEHANDLING_IGNORE; m_nSampleUndoMaxBuffer = CMainFrame::GetPrivateProfileLong("Sample Editor" , "UndoBufferSize", m_nSampleUndoMaxBuffer >> 20, iniFile); m_nSampleUndoMaxBuffer = max(1, m_nSampleUndoMaxBuffer) << 20; Modified: trunk/OpenMPT/soundlib/Snd_defs.h =================================================================== --- trunk/OpenMPT/soundlib/Snd_defs.h 2012-09-29 22:06:17 UTC (rev 1370) +++ trunk/OpenMPT/soundlib/Snd_defs.h 2012-10-04 17:16:19 UTC (rev 1371) @@ -358,6 +358,7 @@ PLUGIN_VOLUMEHANDLING_DRYWET, PLUGIN_VOLUMEHANDLING_IGNORE, PLUGIN_VOLUMEHANDLING_CUSTOM, + PLUGIN_VOLUMEHANDLING_MAX, }; // filtermodes This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-10-10 18:57:08
|
Revision: 1372 http://modplug.svn.sourceforge.net/modplug/?rev=1372&view=rev Author: saga-games Date: 2012-10-10 18:57:01 +0000 (Wed, 10 Oct 2012) Log Message: ----------- [Fix] Sample Editor: Loading XI files as samples could lead to a crash due to use-after-free (tx Lucas). [Mod] OpenMPT: Version is now 1.20.03.03 Modified Paths: -------------- trunk/OpenMPT/mptrack/version.h trunk/OpenMPT/soundlib/SampleFormats.cpp Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2012-10-04 17:16:19 UTC (rev 1371) +++ trunk/OpenMPT/mptrack/version.h 2012-10-10 18:57:01 UTC (rev 1372) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 20 #define VER_MINOR 03 -#define VER_MINORMINOR 02 +#define VER_MINORMINOR 03 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of Modified: trunk/OpenMPT/soundlib/SampleFormats.cpp =================================================================== --- trunk/OpenMPT/soundlib/SampleFormats.cpp 2012-10-04 17:16:19 UTC (rev 1371) +++ trunk/OpenMPT/soundlib/SampleFormats.cpp 2012-10-10 18:57:01 UTC (rev 1372) @@ -1104,6 +1104,9 @@ // Gotta skip 'em all! file.Skip(sizeof(XMSample) * (fileHeader.numSamples - 1)); + CriticalSection cs; + DestroySample(nSample); + ModSample &mptSample = Samples[nSample]; sampleHeader.ConvertToMPT(mptSample); if(GetType() != MOD_TYPE_XM) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-10-12 18:30:27
|
Revision: 1373 http://modplug.svn.sourceforge.net/modplug/?rev=1373&view=rev Author: saga-games Date: 2012-10-12 18:30:20 +0000 (Fri, 12 Oct 2012) Log Message: ----------- [Fix] XM Compatibility: Improved XM tremor effect (ICANFLY.XM / TremorRecover.xm) [Fix] MOD Compatibility: Partly undid Set Finetune changes (fixes Wander2.mod) [Fix] ITP Files weren't saved correctly since OpenMPT 1.20.03.00 [Mod] OpenMPT: Version is now 1.20.03.04 Modified Paths: -------------- trunk/OpenMPT/mptrack/version.h trunk/OpenMPT/soundlib/Load_itp.cpp trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2012-10-10 18:57:01 UTC (rev 1372) +++ trunk/OpenMPT/mptrack/version.h 2012-10-12 18:30:20 UTC (rev 1373) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 20 #define VER_MINOR 03 -#define VER_MINORMINOR 03 +#define VER_MINORMINOR 04 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of Modified: trunk/OpenMPT/soundlib/Load_itp.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_itp.cpp 2012-10-10 18:57:01 UTC (rev 1372) +++ trunk/OpenMPT/soundlib/Load_itp.cpp 2012-10-12 18:30:20 UTC (rev 1373) @@ -302,7 +302,7 @@ // Song global config - id = m_SongFlags[SONG_FILE_FLAGS]; + id = (m_SongFlags & SONG_FILE_FLAGS); fwrite(&id, 1, sizeof(id), f); id = m_nDefaultGlobalVolume; fwrite(&id, 1, sizeof(id), f); Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2012-10-10 18:57:01 UTC (rev 1372) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2012-10-12 18:30:20 UTC (rev 1373) @@ -862,15 +862,10 @@ pChn->nC5Speed = pSmp->nC5Speed; pChn->m_CalculateFreq = true; pChn->nFineTune = 0; - } else + } else if(!bPorta || !(GetType() & (MOD_TYPE_MOD | MOD_TYPE_XM))) { - if((!bPorta && GetType() == MOD_TYPE_XM) - || (pChn->rowCommand.instr != 0 && GetType() == MOD_TYPE_MOD) - || !(GetType() & (MOD_TYPE_MOD | MOD_TYPE_XM))) - { - pChn->nC5Speed = pSmp->nC5Speed; - pChn->nFineTune = pSmp->nFineTune; - } + pChn->nC5Speed = pSmp->nC5Speed; + pChn->nFineTune = pSmp->nFineTune; } @@ -1810,6 +1805,13 @@ { // Also reload panning pChn->nPan = oldSample->nPan; + + // FT2 compatibility: Instrument number disables tremor effect + // Test case: TremorRecover.xm + if(IsCompatibleMode(TRK_FASTTRACKER2)) + { + pChn->nTremorCount &= ~0x80; + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-10-26 17:56:06
|
Revision: 1383 http://modplug.svn.sourceforge.net/modplug/?rev=1383&view=rev Author: saga-games Date: 2012-10-26 17:55:59 +0000 (Fri, 26 Oct 2012) Log Message: ----------- [New] ASIO: Added hidden INI setting ASIOBaseChannel in [Sound Settings] category to specify the first ASIO channel to use for output (as a quick&dirty solution for http://bugs.openmpt.org/view.php?id=128) Modified Paths: -------------- trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/soundlib/SNDDEV.H trunk/OpenMPT/soundlib/SNDDEVX.H trunk/OpenMPT/soundlib/Snddev.cpp Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2012-10-26 16:36:16 UTC (rev 1382) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2012-10-26 17:55:59 UTC (rev 1383) @@ -14,6 +14,7 @@ #include "Moddoc.h" #include "Mainfrm.h" #include "snddev.h" +#include "SNDDEVX.H" #include "version.h" #include "UpdateCheck.h" #include "Mpdlgs.h" @@ -308,6 +309,7 @@ { defaultDevice = SNDDEV_BUILD_ID(0, SNDDEV_ASIO); } + CASIODevice::baseChannel = GetPrivateProfileInt("Sound Settings", "ASIOBaseChannel", CASIODevice::baseChannel, iniFile); #endif // NO_ASIO m_nWaveDevice = CMainFrame::GetPrivateProfileLong("Sound Settings", "WaveDevice", defaultDevice, iniFile); m_dwSoundSetup = CMainFrame::GetPrivateProfileDWord("Sound Settings", "SoundSetup", m_dwSoundSetup, iniFile); Modified: trunk/OpenMPT/soundlib/SNDDEV.H =================================================================== --- trunk/OpenMPT/soundlib/SNDDEV.H 2012-10-26 16:36:16 UTC (rev 1382) +++ trunk/OpenMPT/soundlib/SNDDEV.H 2012-10-26 17:55:59 UTC (rev 1383) @@ -90,7 +90,7 @@ virtual VOID Reset() = 0; virtual BOOL Directcallback() { return FALSE; } virtual UINT HasFixedBitsPerSample() { return 0; } - virtual BOOL IsOpen() = 0; + virtual bool IsOpen() = 0; virtual UINT GetCurrentLatency() = 0; virtual void SilenceAudioBuffer(ISoundSource *pSource, ULONG nMaxLatency, DWORD dwUser=0) = 0; virtual UINT GetCurrentSampleRate(UINT nDevice) { UNREFERENCED_PARAMETER(nDevice); return 0; } Modified: trunk/OpenMPT/soundlib/SNDDEVX.H =================================================================== --- trunk/OpenMPT/soundlib/SNDDEVX.H 2012-10-26 16:36:16 UTC (rev 1382) +++ trunk/OpenMPT/soundlib/SNDDEVX.H 2012-10-26 17:55:59 UTC (rev 1383) @@ -55,7 +55,7 @@ BOOL FillAudioBuffer(ISoundSource *pSource, ULONG nMaxLatency, DWORD); VOID Reset(); VOID Start() {} - BOOL IsOpen() { return (m_hWaveOut != NULL) ? TRUE : FALSE; } + bool IsOpen() { return (m_hWaveOut != NULL); } UINT GetCurrentLatency() { return m_nBuffersPending * m_nWaveBufferSize; } void SilenceAudioBuffer(ISoundSource *pSource, ULONG nMaxLatency, DWORD dwBuffer); @@ -94,7 +94,7 @@ BOOL FillAudioBuffer(ISoundSource *pSource, ULONG nMaxLatency, DWORD); VOID Reset(); VOID Start() {} - BOOL IsOpen() { return (m_pMixBuffer != NULL) ? TRUE : FALSE; } + bool IsOpen() { return (m_pMixBuffer != NULL); } UINT GetCurrentLatency() { return m_dwLatency; } void SilenceAudioBuffer(ISoundSource *pSource, ULONG nMaxLatency, DWORD dwBuffer); @@ -132,6 +132,8 @@ ASIOChannelInfo m_ChannelInfo[ASIO_MAX_CHANNELS]; ASIOBufferInfo m_BufferInfo[ASIO_MAX_CHANNELS]; int m_FrameBuffer[ASIO_BLOCK_LEN]; +public: + static int baseChannel; public: CASIODevice(); @@ -144,7 +146,7 @@ BOOL FillAudioBuffer(ISoundSource *pSource, ULONG nMaxLatency, DWORD dwUser); VOID Reset(); VOID Start(); - BOOL IsOpen() { return (m_pAsioDrv != NULL) ? TRUE : FALSE; } + bool IsOpen() { return (m_pAsioDrv != NULL); } BOOL Directcallback() { return TRUE; } UINT HasFixedBitsPerSample() { return m_nBitsPerSample; } UINT GetCurrentLatency() { return m_nAsioBufferLen; } Modified: trunk/OpenMPT/soundlib/Snddev.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snddev.cpp 2012-10-26 16:36:16 UTC (rev 1382) +++ trunk/OpenMPT/soundlib/Snddev.cpp 2012-10-26 17:55:59 UTC (rev 1383) @@ -576,6 +576,7 @@ CASIODevice *CASIODevice::gpCurrentAsio = NULL; LONG CASIODevice::gnFillBuffers = 0; +int CASIODevice::baseChannel = 0; static UINT gnNumAsioDrivers = 0; static BOOL gbAsioEnumerated = FALSE; static ASIODRIVERDESC gAsioDrivers[ASIO_MAX_DRIVERS]; @@ -721,7 +722,7 @@ ich, m_ChannelInfo[ich].isActive, m_ChannelInfo[ich].channelGroup, m_ChannelInfo[ich].type, m_ChannelInfo[ich].name); #endif m_BufferInfo[ich].isInput = ASIOFalse; - m_BufferInfo[ich].channelNum = ich; // map MPT channel i to ASIO channel i + m_BufferInfo[ich].channelNum = ich + CASIODevice::baseChannel; // map MPT channel i to ASIO channel i m_BufferInfo[ich].buffers[0] = NULL; m_BufferInfo[ich].buffers[1] = NULL; if ((m_ChannelInfo[ich].type & 0x0f) == ASIOSTInt16MSB) @@ -825,9 +826,11 @@ if (IsOpen()) { m_bMixRunning = TRUE; - try { - m_pAsioDrv->start(); - } catch(...) { + try + { + m_pAsioDrv->start(); + } catch(...) + { CASIODevice::ReportASIOException("ASIO crash in start()\n"); } } @@ -842,15 +845,19 @@ if (m_bMixRunning) { m_bMixRunning = FALSE; - try { + try + { m_pAsioDrv->stop(); - } catch(...) { + } catch(...) + { CASIODevice::ReportASIOException("ASIO crash in stop()\n"); } } - try { + try + { m_pAsioDrv->disposeBuffers(); - } catch(...) { + } catch(...) + { CASIODevice::ReportASIOException("ASIO crash in disposeBuffers()\n"); } CloseDevice(); @@ -869,9 +876,11 @@ if (IsOpen()) { m_bMixRunning = FALSE; - try { + try + { m_pAsioDrv->stop(); - } catch(...) { + } catch(...) + { CASIODevice::ReportASIOException("ASIO crash in stop()\n"); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-10-27 13:01:36
|
Revision: 1388 http://modplug.svn.sourceforge.net/modplug/?rev=1388&view=rev Author: saga-games Date: 2012-10-27 13:01:27 +0000 (Sat, 27 Oct 2012) Log Message: ----------- Merged revision(s) 1378-1382 from branches/manx/project-files-cleanups: branch project-files-cleanups ........ [Var] Remove old VC6 project files. ........ [Var] Remove ReleaseWithoutAsm target and x64 platform from VS2010 solution file, they had probably sneaked in from zlib some time ago. ........ [Var] Remove 'SuppressStartupBanner' setting from VS2010 project files because this setting is deprecated and causes a warning. ........ [Var] Use multiprocessor compilation (/MP) in release builds with VS2010 to reduce build times. "/MP" is disabled for stdafx.cpp compiles as it does not work when generating a PCH and would cause a warning. ........ Modified Paths: -------------- trunk/OpenMPT/mptrack/MPTRACK_10.sln trunk/OpenMPT/mptrack/mptrack_10.vcxproj trunk/OpenMPT/soundtouch/soundtouch_10.vcxproj trunk/OpenMPT/ungzip/ungzip_10.vcxproj trunk/OpenMPT/unlha/unlha_10.vcxproj trunk/OpenMPT/unrar/unrar_10.vcxproj trunk/OpenMPT/unzip/unzip_10.vcxproj trunk/OpenMPT/xsoundlib/xsoundlib_10.vcxproj trunk/OpenMPT/zlib/contrib/vstudio/vc10/zlibstat.vcxproj Removed Paths: ------------- trunk/OpenMPT/mptrack/MPTRACK.DSW trunk/OpenMPT/mptrack/mptrack.dsp Property Changed: ---------------- trunk/OpenMPT/ Property changes on: trunk/OpenMPT ___________________________________________________________________ Added: svn:mergeinfo + /branches/manx/project-files-cleanups:1378-1382 Deleted: trunk/OpenMPT/mptrack/MPTRACK.DSW =================================================================== --- trunk/OpenMPT/mptrack/MPTRACK.DSW 2012-10-27 12:21:51 UTC (rev 1387) +++ trunk/OpenMPT/mptrack/MPTRACK.DSW 2012-10-27 13:01:27 UTC (rev 1388) @@ -1,74 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "mptrack"=.\mptrack.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name unlha - End Project Dependency - Begin Project Dependency - Project_Dep_Name unrar - End Project Dependency - Begin Project Dependency - Project_Dep_Name unzip - End Project Dependency -}}} - -############################################################################### - -Project: "unlha"=..\unlha\unlha.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "unrar"=..\UNRAR\UNRAR.DSP - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "unzip"=..\UNZIP\unzip.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - Modified: trunk/OpenMPT/mptrack/MPTRACK_10.sln =================================================================== --- trunk/OpenMPT/mptrack/MPTRACK_10.sln 2012-10-27 12:21:51 UTC (rev 1387) +++ trunk/OpenMPT/mptrack/MPTRACK_10.sln 2012-10-27 13:01:27 UTC (rev 1388) @@ -19,88 +19,41 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - ReleaseWithoutAsm|Win32 = ReleaseWithoutAsm|Win32 - ReleaseWithoutAsm|x64 = ReleaseWithoutAsm|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Debug|Win32.ActiveCfg = Debug|Win32 {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Debug|Win32.Build.0 = Debug|Win32 - {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Debug|x64.ActiveCfg = Debug|Win32 {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Release|Win32.ActiveCfg = Release|Win32 {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Release|Win32.Build.0 = Release|Win32 - {21D95071-FB97-4E69-B3B1-050D0D4A5021}.Release|x64.ActiveCfg = Release|Win32 - {21D95071-FB97-4E69-B3B1-050D0D4A5021}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {21D95071-FB97-4E69-B3B1-050D0D4A5021}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 - {21D95071-FB97-4E69-B3B1-050D0D4A5021}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 {FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}.Debug|Win32.ActiveCfg = Debug|Win32 {FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}.Debug|Win32.Build.0 = Debug|Win32 - {FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}.Debug|x64.ActiveCfg = Debug|Win32 {FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}.Release|Win32.ActiveCfg = Release|Win32 {FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}.Release|Win32.Build.0 = Release|Win32 - {FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}.Release|x64.ActiveCfg = Release|Win32 - {FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 - {FAE39936-1DC7-40BB-AD3F-3B5B9E9AB0E8}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 {FF541CE2-DAA1-4F84-9883-0A0F111BAA0B}.Debug|Win32.ActiveCfg = Debug|Win32 {FF541CE2-DAA1-4F84-9883-0A0F111BAA0B}.Debug|Win32.Build.0 = Debug|Win32 - {FF541CE2-DAA1-4F84-9883-0A0F111BAA0B}.Debug|x64.ActiveCfg = Debug|Win32 {FF541CE2-DAA1-4F84-9883-0A0F111BAA0B}.Release|Win32.ActiveCfg = Release|Win32 {FF541CE2-DAA1-4F84-9883-0A0F111BAA0B}.Release|Win32.Build.0 = Release|Win32 - {FF541CE2-DAA1-4F84-9883-0A0F111BAA0B}.Release|x64.ActiveCfg = Release|Win32 - {FF541CE2-DAA1-4F84-9883-0A0F111BAA0B}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {FF541CE2-DAA1-4F84-9883-0A0F111BAA0B}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 - {FF541CE2-DAA1-4F84-9883-0A0F111BAA0B}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 {44316F22-904E-48AA-B841-5A3A6AC77319}.Debug|Win32.ActiveCfg = Debug|Win32 {44316F22-904E-48AA-B841-5A3A6AC77319}.Debug|Win32.Build.0 = Debug|Win32 - {44316F22-904E-48AA-B841-5A3A6AC77319}.Debug|x64.ActiveCfg = Debug|Win32 {44316F22-904E-48AA-B841-5A3A6AC77319}.Release|Win32.ActiveCfg = Release|Win32 {44316F22-904E-48AA-B841-5A3A6AC77319}.Release|Win32.Build.0 = Release|Win32 - {44316F22-904E-48AA-B841-5A3A6AC77319}.Release|x64.ActiveCfg = Release|Win32 - {44316F22-904E-48AA-B841-5A3A6AC77319}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {44316F22-904E-48AA-B841-5A3A6AC77319}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 - {44316F22-904E-48AA-B841-5A3A6AC77319}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 {DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8}.Debug|Win32.ActiveCfg = Debug|Win32 {DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8}.Debug|Win32.Build.0 = Debug|Win32 - {DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8}.Debug|x64.ActiveCfg = Debug|Win32 {DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8}.Release|Win32.ActiveCfg = Release|Win32 {DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8}.Release|Win32.Build.0 = Release|Win32 - {DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8}.Release|x64.ActiveCfg = Release|Win32 - {DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 - {DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 {CF3C2CA5-5D45-4635-BBA4-C1F435E10896}.Debug|Win32.ActiveCfg = Debug|Win32 {CF3C2CA5-5D45-4635-BBA4-C1F435E10896}.Debug|Win32.Build.0 = Debug|Win32 - {CF3C2CA5-5D45-4635-BBA4-C1F435E10896}.Debug|x64.ActiveCfg = Debug|Win32 {CF3C2CA5-5D45-4635-BBA4-C1F435E10896}.Release|Win32.ActiveCfg = Release|Win32 {CF3C2CA5-5D45-4635-BBA4-C1F435E10896}.Release|Win32.Build.0 = Release|Win32 - {CF3C2CA5-5D45-4635-BBA4-C1F435E10896}.Release|x64.ActiveCfg = Release|Win32 - {CF3C2CA5-5D45-4635-BBA4-C1F435E10896}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {CF3C2CA5-5D45-4635-BBA4-C1F435E10896}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 - {CF3C2CA5-5D45-4635-BBA4-C1F435E10896}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 {94CD7910-649A-4075-9F33-7EBEE614FD45}.Debug|Win32.ActiveCfg = Debug|Win32 {94CD7910-649A-4075-9F33-7EBEE614FD45}.Debug|Win32.Build.0 = Debug|Win32 - {94CD7910-649A-4075-9F33-7EBEE614FD45}.Debug|x64.ActiveCfg = Debug|Win32 {94CD7910-649A-4075-9F33-7EBEE614FD45}.Release|Win32.ActiveCfg = Release|Win32 {94CD7910-649A-4075-9F33-7EBEE614FD45}.Release|Win32.Build.0 = Release|Win32 - {94CD7910-649A-4075-9F33-7EBEE614FD45}.Release|x64.ActiveCfg = Release|Win32 - {94CD7910-649A-4075-9F33-7EBEE614FD45}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 - {94CD7910-649A-4075-9F33-7EBEE614FD45}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 - {94CD7910-649A-4075-9F33-7EBEE614FD45}.ReleaseWithoutAsm|x64.ActiveCfg = Release|Win32 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.ActiveCfg = Debug|Win32 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|Win32.Build.0 = Debug|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.ActiveCfg = Debug|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Debug|x64.Build.0 = Debug|x64 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.ActiveCfg = Release|Win32 {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|Win32.Build.0 = Release|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.ActiveCfg = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.Release|x64.Build.0 = Release|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.ActiveCfg = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|Win32.Build.0 = ReleaseWithoutAsm|Win32 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.ActiveCfg = ReleaseWithoutAsm|x64 - {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}.ReleaseWithoutAsm|x64.Build.0 = ReleaseWithoutAsm|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Deleted: trunk/OpenMPT/mptrack/mptrack.dsp =================================================================== --- trunk/OpenMPT/mptrack/mptrack.dsp 2012-10-27 12:21:51 UTC (rev 1387) +++ trunk/OpenMPT/mptrack/mptrack.dsp 2012-10-27 13:01:27 UTC (rev 1388) @@ -1,584 +0,0 @@ -# Microsoft Developer Studio Project File - Name="mptrack" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Application" 0x0101 - -CFG=mptrack - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "mptrack.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "mptrack.mak" CFG="mptrack - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "mptrack - Win32 Release" (based on "Win32 (x86) Application") -!MESSAGE "mptrack - Win32 Debug" (based on "Win32 (x86) Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "mptrack - Win32 Release" - -# PROP BASE Use_MFC 5 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 5 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Bin" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /MT /W3 /O2 /I "..\unlha" /I "..\unzip" /I "..\unrar" /I "..\soundlib" /I "..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "ENABLE_MMX" /D "ENABLE_EQ" /D "MODPLUG_TRACKER" /D "NO_PACKING" /Yu"stdafx.h" /FD /c -# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /d "NDEBUG" -# ADD RSC /l 0x409 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386 -# ADD LINK32 winmm.lib strmiids.lib dmoguids.lib /nologo /version:5.0 /pdb:none /map /machine:I386 /subsystem:windows,4.0 -# SUBTRACT LINK32 /profile - -!ELSEIF "$(CFG)" == "mptrack - Win32 Debug" - -# PROP BASE Use_MFC 5 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 5 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Yu"stdafx.h" /FD /c -# ADD CPP /nologo /G5 /MTd /W4 /GX /Zi /Od /Gf /Gy /I "..\unzip" /I "..\unrar" /I "..\unlha" /I "..\soundlib" /I "..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "ENABLE_EQ" /D "MODPLUG_TRACKER" /D "NO_PACKING" /FR /Yu"stdafx.h" /FD /c -# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32 -# ADD BASE RSC /l 0x409 /d "_DEBUG" -# ADD RSC /l 0x409 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept -# ADD LINK32 winmm.lib strmiids.lib dmoguids.lib /nologo /version:5.0 /subsystem:windows /incremental:no /map /debug /machine:I386 /libpath:"..\unzip\bin" /libpath:"..\unrar\bin" /libpath:"..\unlha\bin" -# SUBTRACT LINK32 /profile - -!ENDIF - -# Begin Target - -# Name "mptrack - Win32 Release" -# Name "mptrack - Win32 Debug" -# Begin Group "Source Files" - -# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" -# Begin Source File - -SOURCE=.\ChildFrm.cpp -# End Source File -# Begin Source File - -SOURCE=.\ctrl_com.cpp -# End Source File -# Begin Source File - -SOURCE=.\ctrl_gen.cpp -# End Source File -# Begin Source File - -SOURCE=.\ctrl_ins.cpp -# End Source File -# Begin Source File - -SOURCE=.\ctrl_pat.cpp -# End Source File -# Begin Source File - -SOURCE=.\ctrl_seq.cpp -# End Source File -# Begin Source File - -SOURCE=.\ctrl_smp.cpp -# End Source File -# Begin Source File - -SOURCE=.\dlg_misc.cpp - -!IF "$(CFG)" == "mptrack - Win32 Release" - -# ADD CPP /O2 - -!ELSEIF "$(CFG)" == "mptrack - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\soundlib\dlsbank.cpp -# End Source File -# Begin Source File - -SOURCE=.\draw_pat.cpp -# End Source File -# Begin Source File - -SOURCE=.\EffectVis.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Fastmix.cpp -# End Source File -# Begin Source File - -SOURCE=.\globals.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Load_669.cpp -# End Source File -# Begin Source File - -SOURCE=..\Soundlib\load_amf.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Load_ams.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\load_dbm.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\load_dmf.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Load_dsm.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Load_far.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Load_it.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Load_mdl.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Load_med.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\load_mid.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Load_mod.cpp -# End Source File -# Begin Source File - -SOURCE=..\Soundlib\load_mt2.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Load_mtm.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Load_okt.cpp -# End Source File -# Begin Source File - -SOURCE=..\Soundlib\load_psm.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\load_ptm.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Load_s3m.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Load_stm.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Load_ult.cpp -# End Source File -# Begin Source File - -SOURCE=..\Soundlib\Load_umx.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Load_wav.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Load_xm.cpp -# End Source File -# Begin Source File - -SOURCE=.\mainbar.cpp -# End Source File -# Begin Source File - -SOURCE=.\MainFrm.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\mmcmp.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Mmx_mix.cpp -# End Source File -# Begin Source File - -SOURCE=.\mod2midi.cpp -# End Source File -# Begin Source File - -SOURCE=.\mod2wave.cpp -# End Source File -# Begin Source File - -SOURCE=.\moddoc.cpp -# End Source File -# Begin Source File - -SOURCE=.\modedit.cpp -# End Source File -# Begin Source File - -SOURCE=.\Moptions.cpp -# End Source File -# Begin Source File - -SOURCE=.\Mpdlgs.cpp -# End Source File -# Begin Source File - -SOURCE=.\mpt_midi.cpp -# End Source File -# Begin Source File - -SOURCE=.\mptrack.cpp -# End Source File -# Begin Source File - -SOURCE=.\mptrack.rc -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Sampleio.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\snd_dsp.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\snd_eq.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\snd_flt.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Snd_fx.cpp -# End Source File -# Begin Source File - -SOURCE=..\Soundlib\Snd_rvb.cpp - -!IF "$(CFG)" == "mptrack - Win32 Release" - -# ADD CPP /FAs - -!ELSEIF "$(CFG)" == "mptrack - Win32 Debug" - -!ENDIF - -# End Source File -# Begin Source File - -SOURCE=..\Soundlib\snddev.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Sndfile.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Sndmix.cpp -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.cpp -# ADD CPP /Yc"stdafx.h" -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Tables.cpp -# End Source File -# Begin Source File - -SOURCE=.\view_com.cpp -# End Source File -# Begin Source File - -SOURCE=.\view_gen.cpp -# End Source File -# Begin Source File - -SOURCE=.\view_ins.cpp -# End Source File -# Begin Source File - -SOURCE=.\view_pat.cpp -# End Source File -# Begin Source File - -SOURCE=.\view_smp.cpp -# End Source File -# Begin Source File - -SOURCE=.\view_tre.cpp -# End Source File -# Begin Source File - -SOURCE=.\vstplug.cpp -# End Source File -# Begin Source File - -SOURCE=..\soundlib\Waveform.cpp -# End Source File -# End Group -# Begin Group "Header Files" - -# PROP Default_Filter "h;hpp;hxx;hm;inl" -# Begin Source File - -SOURCE=.\ChildFrm.h -# End Source File -# Begin Source File - -SOURCE=.\ctrl_com.h -# End Source File -# Begin Source File - -SOURCE=.\ctrl_gen.h -# End Source File -# Begin Source File - -SOURCE=.\ctrl_ins.h -# End Source File -# Begin Source File - -SOURCE=.\ctrl_pat.h -# End Source File -# Begin Source File - -SOURCE=.\ctrl_smp.h -# End Source File -# Begin Source File - -SOURCE=.\dlg_misc.h -# End Source File -# Begin Source File - -SOURCE=..\Soundlib\Dlsbank.h -# End Source File -# Begin Source File - -SOURCE=.\EffectVis.h -# End Source File -# Begin Source File - -SOURCE=.\globals.h -# End Source File -# Begin Source File - -SOURCE=.\mainbar.h -# End Source File -# Begin Source File - -SOURCE=.\MainFrm.h -# End Source File -# Begin Source File - -SOURCE=.\mod2midi.h -# End Source File -# Begin Source File - -SOURCE=.\mod2wave.h -# End Source File -# Begin Source File - -SOURCE=.\moddoc.h -# End Source File -# Begin Source File - -SOURCE=.\Moptions.h -# End Source File -# Begin Source File - -SOURCE=.\Mpdlgs.h -# End Source File -# Begin Source File - -SOURCE=.\mptrack.h -# End Source File -# Begin Source File - -SOURCE=.\Resource.h -# End Source File -# Begin Source File - -SOURCE=..\Soundlib\snddev.h -# End Source File -# Begin Source File - -SOURCE=..\Soundlib\snddevx.h -# End Source File -# Begin Source File - -SOURCE=..\Soundlib\Sndfile.h -# End Source File -# Begin Source File - -SOURCE=.\StdAfx.h -# End Source File -# Begin Source File - -SOURCE=.\view_com.h -# End Source File -# Begin Source File - -SOURCE=.\view_gen.h -# End Source File -# Begin Source File - -SOURCE=.\view_ins.h -# End Source File -# Begin Source File - -SOURCE=.\view_pat.h -# End Source File -# Begin Source File - -SOURCE=.\view_smp.h -# End Source File -# Begin Source File - -SOURCE=.\view_tre.h -# End Source File -# Begin Source File - -SOURCE=.\vstplug.h -# End Source File -# End Group -# Begin Group "Resource Files" - -# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" -# Begin Source File - -SOURCE=.\res\colors.bmp -# End Source File -# Begin Source File - -SOURCE=.\res\dragging.cur -# End Source File -# Begin Source File - -SOURCE=.\Res\envbar.bmp -# End Source File -# Begin Source File - -SOURCE=.\res\img_list.bmp -# End Source File -# Begin Source File - -SOURCE=.\res\mainbar.bmp -# End Source File -# Begin Source File - -SOURCE=.\res\moddoc.ico -# End Source File -# Begin Source File - -SOURCE=.\res\MPTRACK.bmp -# End Source File -# Begin Source File - -SOURCE=.\res\mptrack.ico -# End Source File -# Begin Source File - -SOURCE=.\res\mptrack.rc2 -# End Source File -# Begin Source File - -SOURCE=.\Res\nodrag.cur -# End Source File -# Begin Source File - -SOURCE=.\res\nodrop.cur -# End Source File -# Begin Source File - -SOURCE=.\res\patterns.bmp -# End Source File -# Begin Source File - -SOURCE=.\Res\smptoolb.bmp -# End Source File -# Begin Source File - -SOURCE=.\Res\splash.bmp -# End Source File -# Begin Source File - -SOURCE=.\res\view_pat.bmp -# End Source File -# Begin Source File - -SOURCE=.\res\vumeters.bmp -# End Source File -# End Group -# Begin Source File - -SOURCE=.\mptrack.reg -# End Source File -# End Target -# End Project Modified: trunk/OpenMPT/mptrack/mptrack_10.vcxproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack_10.vcxproj 2012-10-27 12:21:51 UTC (rev 1387) +++ trunk/OpenMPT/mptrack/mptrack_10.vcxproj 2012-10-27 13:01:27 UTC (rev 1388) @@ -78,7 +78,6 @@ <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName> <BrowseInformation>true</BrowseInformation> <WarningLevel>Level4</WarningLevel> - <SuppressStartupBanner>false</SuppressStartupBanner> <DebugInformationFormat>EditAndContinue</DebugInformationFormat> <CompileAs>Default</CompileAs> </ClCompile> @@ -133,13 +132,13 @@ <ObjectFileName>.\Release/</ObjectFileName> <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName> <WarningLevel>Level3</WarningLevel> - <SuppressStartupBanner>false</SuppressStartupBanner> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>Default</CompileAs> <ExceptionHandling>Async</ExceptionHandling> <AdditionalOptions>/O2 %(AdditionalOptions)</AdditionalOptions> <IntrinsicFunctions>true</IntrinsicFunctions> <FloatingPointModel>Fast</FloatingPointModel> + <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> @@ -261,6 +260,7 @@ <ClCompile Include="StdAfx.cpp"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> + <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</MultiProcessorCompilation> </ClCompile> <ClCompile Include="..\soundlib\Tables.cpp" /> <ClCompile Include="tagging.cpp" /> Modified: trunk/OpenMPT/soundtouch/soundtouch_10.vcxproj =================================================================== --- trunk/OpenMPT/soundtouch/soundtouch_10.vcxproj 2012-10-27 12:21:51 UTC (rev 1387) +++ trunk/OpenMPT/soundtouch/soundtouch_10.vcxproj 2012-10-27 13:01:27 UTC (rev 1388) @@ -84,6 +84,7 @@ </PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> <Link> <OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile> Modified: trunk/OpenMPT/ungzip/ungzip_10.vcxproj =================================================================== --- trunk/OpenMPT/ungzip/ungzip_10.vcxproj 2012-10-27 12:21:51 UTC (rev 1387) +++ trunk/OpenMPT/ungzip/ungzip_10.vcxproj 2012-10-27 13:01:27 UTC (rev 1388) @@ -62,10 +62,10 @@ <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <FunctionLevelLinking>true</FunctionLevelLinking> <WarningLevel>Level3</WarningLevel> - <SuppressStartupBanner>false</SuppressStartupBanner> <DebugInformationFormat> </DebugInformationFormat> <OmitDefaultLibName>true</OmitDefaultLibName> + <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> </ItemDefinitionGroup> <ItemGroup> Modified: trunk/OpenMPT/unlha/unlha_10.vcxproj =================================================================== --- trunk/OpenMPT/unlha/unlha_10.vcxproj 2012-10-27 12:21:51 UTC (rev 1387) +++ trunk/OpenMPT/unlha/unlha_10.vcxproj 2012-10-27 13:01:27 UTC (rev 1388) @@ -58,7 +58,6 @@ <ObjectFileName>.\Debug/</ObjectFileName> <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName> <WarningLevel>Level4</WarningLevel> - <SuppressStartupBanner>true</SuppressStartupBanner> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <ResourceCompile> @@ -85,7 +84,7 @@ <ObjectFileName>.\Release/</ObjectFileName> <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName> <WarningLevel>Level3</WarningLevel> - <SuppressStartupBanner>false</SuppressStartupBanner> + <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> Modified: trunk/OpenMPT/unrar/unrar_10.vcxproj =================================================================== --- trunk/OpenMPT/unrar/unrar_10.vcxproj 2012-10-27 12:21:51 UTC (rev 1387) +++ trunk/OpenMPT/unrar/unrar_10.vcxproj 2012-10-27 13:01:27 UTC (rev 1388) @@ -55,7 +55,6 @@ <ObjectFileName>.\Debug/</ObjectFileName> <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName> <WarningLevel>Level4</WarningLevel> - <SuppressStartupBanner>true</SuppressStartupBanner> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <ResourceCompile> @@ -81,7 +80,7 @@ <ObjectFileName>.\Release/</ObjectFileName> <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName> <WarningLevel>Level3</WarningLevel> - <SuppressStartupBanner>false</SuppressStartupBanner> + <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> <ResourceCompile> <Culture>0x0409</Culture> Modified: trunk/OpenMPT/unzip/unzip_10.vcxproj =================================================================== --- trunk/OpenMPT/unzip/unzip_10.vcxproj 2012-10-27 12:21:51 UTC (rev 1387) +++ trunk/OpenMPT/unzip/unzip_10.vcxproj 2012-10-27 13:01:27 UTC (rev 1388) @@ -55,7 +55,6 @@ <ObjectFileName>.\Debug/</ObjectFileName> <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName> <WarningLevel>Level4</WarningLevel> - <SuppressStartupBanner>true</SuppressStartupBanner> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <ResourceCompile> @@ -81,7 +80,7 @@ <ObjectFileName>.\Release/</ObjectFileName> <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName> <WarningLevel>Level3</WarningLevel> - <SuppressStartupBanner>false</SuppressStartupBanner> + <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> <ResourceCompile> <Culture>0x0409</Culture> Modified: trunk/OpenMPT/xsoundlib/xsoundlib_10.vcxproj =================================================================== --- trunk/OpenMPT/xsoundlib/xsoundlib_10.vcxproj 2012-10-27 12:21:51 UTC (rev 1387) +++ trunk/OpenMPT/xsoundlib/xsoundlib_10.vcxproj 2012-10-27 13:01:27 UTC (rev 1388) @@ -67,8 +67,8 @@ <BufferSecurityCheck>true</BufferSecurityCheck> <PrecompiledHeader>Use</PrecompiledHeader> <WarningLevel>Level3</WarningLevel> - <SuppressStartupBanner>false</SuppressStartupBanner> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> + <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> <Lib> <OutputFile>$(OutDir)xsoundlib.lib</OutputFile> @@ -85,6 +85,7 @@ <ClCompile Include="stdafx.cpp"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> + <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</MultiProcessorCompilation> </ClCompile> </ItemGroup> <ItemGroup> Modified: trunk/OpenMPT/zlib/contrib/vstudio/vc10/zlibstat.vcxproj =================================================================== --- trunk/OpenMPT/zlib/contrib/vstudio/vc10/zlibstat.vcxproj 2012-10-27 12:21:51 UTC (rev 1387) +++ trunk/OpenMPT/zlib/contrib/vstudio/vc10/zlibstat.vcxproj 2012-10-27 13:01:27 UTC (rev 1388) @@ -171,7 +171,6 @@ <ObjectFileName>$(IntDir)</ObjectFileName> <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName> <WarningLevel>Level3</WarningLevel> - <SuppressStartupBanner>true</SuppressStartupBanner> <DebugInformationFormat>OldStyle</DebugInformationFormat> </ClCompile> <ResourceCompile> @@ -199,7 +198,7 @@ <ObjectFileName>$(IntDir)</ObjectFileName> <ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName> <WarningLevel>Level3</WarningLevel> - <SuppressStartupBanner>true</SuppressStartupBanner> + <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> <ResourceCompile> <Culture>0x040c</Culture> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-10-27 19:04:52
|
Revision: 1398 http://modplug.svn.sourceforge.net/modplug/?rev=1398&view=rev Author: saga-games Date: 2012-10-27 19:04:43 +0000 (Sat, 27 Oct 2012) Log Message: ----------- [Var] Updated release note documents [Mod] OpenMPT: Version is now 1.20.04.00 Modified Paths: -------------- trunk/OpenMPT/mptrack/res/MPTRACK.RC2 trunk/OpenMPT/mptrack/version.h trunk/OpenMPT/packageTemplate/History.txt trunk/OpenMPT/packageTemplate/OMPT_1.20_ReleaseNotes.html Modified: trunk/OpenMPT/mptrack/res/MPTRACK.RC2 =================================================================== --- trunk/OpenMPT/mptrack/res/MPTRACK.RC2 2012-10-27 15:06:19 UTC (rev 1397) +++ trunk/OpenMPT/mptrack/res/MPTRACK.RC2 2012-10-27 19:04:43 UTC (rev 1398) @@ -43,7 +43,7 @@ VALUE "FileDescription", "OpenMPT / ModPlug Tracker" VALUE "FileVersion", VER_FILEVERSION_STR VALUE "InternalName", "ModPlug Tracker" - VALUE "LegalCopyright", "Copyright \xA91997-2003 Olivier Lapicque; \xA92004-2011 contributors." + VALUE "LegalCopyright", "Copyright \xA91997-2003 Olivier Lapicque; \xA92004-2012 contributors." VALUE "LegalTrademarks", "M.O.D.P.L.U.G" VALUE "OriginalFilename", "mptrack.exe" VALUE "PrivateBuild", "" Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2012-10-27 15:06:19 UTC (rev 1397) +++ trunk/OpenMPT/mptrack/version.h 2012-10-27 19:04:43 UTC (rev 1398) @@ -18,8 +18,8 @@ //Version definitions. The only thing that needs to be changed when changing version number. #define VER_MAJORMAJOR 1 #define VER_MAJOR 20 -#define VER_MINOR 03 -#define VER_MINORMINOR 05 +#define VER_MINOR 04 +#define VER_MINORMINOR 00 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of Modified: trunk/OpenMPT/packageTemplate/History.txt =================================================================== --- trunk/OpenMPT/packageTemplate/History.txt 2012-10-27 15:06:19 UTC (rev 1397) +++ trunk/OpenMPT/packageTemplate/History.txt 2012-10-27 19:04:43 UTC (rev 1398) @@ -24,6 +24,48 @@ <ks> coda / Ken Snyder +v1.20.04.00 (October 2012, revision 1398) +----------------------------------------- +General tab + [Fix] <js> Input boxes in general tab didn't allow for horizontal scrolling. + +Pattern tab + [New] <js> Can now also transpose by arbitrary amounts. Select from context menu or shortcut. + +Sample tab + [Fix] <js> Unsupported types of WAV files (e.g. MP3-compressed WAV) won't crash the program anymore. + [Fix] <js> Loading XI files as samples could lead to a crash (tx Lucas). + [Fix] <js> Mass sample export file names were sometimes not sanitized correctly (http://bugs.openmpt.org/view.php?id=300). + +VST / DMO Plugins + [Fix] <js> Plugin Selection Dialog: Adding new plugins didn't focus them as intended. + [Fix] <js> Plugin Editor: Bypassing a plugin from its editor didn't mark the module as modified. + +VST::Specific Plugin Fixes + [Fix] <js> EZDrummer didn't load its samples until playback was started since OpenMPT 1.20.01.00, for the same reason as the Korg plugins which stopped working (tx coda). + +XM::Compatible Playback Mode + [Fix] <js> Improved XM tremor effect compatibility. + +XM::Loading and Saving + [Imp] <js> Full tempo range (32 - 512) is now also supported for the default tempo in compatibility export, as Fasttracker 2 actually "supports" this (not through the GUI, but it won't sanitize such values in files) and XMPlay also does. + [Imp] <js> Improved detection of files made with MPT. + +MOD + [Fix] <js> Partly undid Set Finetune changes from OpenMPT 1.20.02.00 (fixes The Wanderer II by Jogeir) + +Other formats + [Fix] <js> ITP Saver: ITP files saved with OpenMPT 1.20.03.00 were corrupted. Files saved with this version can be fixed by writing the byte sequence 10 00 02 (hex) at position $2B (instead of 01 00 00). + +Misc + [New] <js> Tree View: It is now possible to rearrange (drag and drop), insert and duplicate (through the context menu) samples and instruments. + [New] <js> Added hidden INI setting ASIOBaseChannel in [Sound Settings] category to specify the first ASIO channel to use for sound output (as a quick and dirty semi-solution for http://bugs.openmpt.org/view.php?id=128). + [Imp] <js> Using the mouse wheel to scroll edit controls with spin buttons works on all such controls now (http://bugs.openmpt.org/view.php?id=99). + [Mod] <js> Changed default resampling type to XMMS-ModPlug. + [Fix] <js> Wave Export file names were sometimes not sanitized correctly (http://bugs.openmpt.org/view.php?id=300). + [Fix] <js> Installer shouldn't overwrite key settings files anymore. + + v1.20.03.00 (22 September 2012, revision 1359) ---------------------------------------------- Pattern tab @@ -80,7 +122,7 @@ Other formats [Imp] <js> 669 Loader: Effects are now imported more accurately. [Imp] <js> DMF Loader: Improved effect import to fit more effects into a pattern cell. - [Fix] <js> AMF (DSMI) Loader: Fixed pattern effects (normal volume slides were always loaded as volume slide + vibrato) and some other bugs; More AMF format revision (8-14) are supported now. + [Fix] <js> AMF (DSMI) Loader: Fixed pattern effects (normal volume slides were always loaded as volume slide + vibrato) and some other bugs; More AMF format revisions (8-14) are supported now. [Fix] <js> AMF (ASYLUM) Loader: Transposed samples will now play correctly, default speed / tempo are not ignored anymore. Misc @@ -121,7 +163,7 @@ [Imp] <js> The current playback position is now also reported correctly to plugins when jumping around in the order list (Previously, it was always reset to the song start). VST::Specific Plugin Fixes - [Fix] <js> The Korg Wavestation GUI did not work until song was played for the first time since OpenMPT 1.20. This may also fix the GUI of older versions of the Korg M1 plugin. + [Fix] <js> The Korg Wavestation GUI did not work until song was played for the first time since OpenMPT 1.20. This also fixes the GUI of older versions of the Korg M1 plugin. Playback [Fix] <js> Fixed frequency slide inaccuracies (tx BeRo). Modified: trunk/OpenMPT/packageTemplate/OMPT_1.20_ReleaseNotes.html =================================================================== --- trunk/OpenMPT/packageTemplate/OMPT_1.20_ReleaseNotes.html 2012-10-27 15:06:19 UTC (rev 1397) +++ trunk/OpenMPT/packageTemplate/OMPT_1.20_ReleaseNotes.html 2012-10-27 19:04:43 UTC (rev 1398) @@ -5,7 +5,7 @@ <head> <title>OpenMPT 1.20 Release Notes</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <meta name="language" content="en" /> + <meta name="language" content="en" /> <style type="text/css"> * { font-family: Calibri, sans-serif; } body @@ -16,12 +16,12 @@ margin: 0 0 1em 0; padding: 0; border: none; - } + } a { color: #b30; text-decoration: none; } a:visited { color: #910; text-decoration: none; } a:hover { text-decoration: underline; } - + .screenshots { float:right; @@ -55,7 +55,7 @@ border-width: 0 0 1px 0; } - h1 img { vertical-align: middle; margin-right: 1em; } + h1 img { vertical-align: middle; margin-right: 1em; } h2, h3, h4 { @@ -67,15 +67,15 @@ color: #333; text-shadow: 1px 1px #fff; } - + h3 { border-left-width: 2em; } h4 { border-left-width: 1em; } - + li {list-style-type: none; padding: 0 0 0.5em 0; } li:before { content: "» "; } - + li li { padding: 0; } - + /* use this for pattern data */ pre { @@ -83,7 +83,7 @@ display: inline; color: #006; } - + tt { font-family: monospace; @@ -97,29 +97,29 @@ <img src="ReleaseNotesImages/general/modplug.png" width="81" height="80" alt="OpenMPT Logo" /> OpenMPT 1.20 - Release Notes </h1> - + <p> OpenMPT has introduced a number of noteworthy new features since the last official release (version 1.19.04.00). - This document should give a rough overview about the greatest changes in OpenMPT 1.20. + This document should give a rough overview about the greatest changes in OpenMPT 1.20. </p> - + <h2>What's new?</h2> - + <h3>General</h3> <div class="screenshots"> <a href="ReleaseNotesImages/1.20/modified_files.png"><img src="ReleaseNotesImages/1.20/modified_files.png" width="240" height="148" alt="Modified files dialog" title="Modified files dialog (click to view big screenshot)" /></a> </div> <ul> - <li>OpenMPT 1.20 introduces a <strong>template system</strong> that can be used to quickly access often used plugin, pattern, sample and instrument combinations.</li> + <li>OpenMPT 1.20 introduces a <strong>template system</strong> that can be used to quickly access often used plugin, pattern, sample and instrument combinations.</li> <li>When closing OpenMPT, a single dialog with a <strong>list of unsaved files</strong> is now shown instead of one message box for each modified file.</li> <li>In the <strong>Wave Export</strong> dialog, you can now specifiy how often the exported tune should be looped.</li> <li><strong>Crash recovery</strong>: When a crash is encountered, OpenMPT will try to save modified documents to a temporary location and close the audio device. The latter can especially help with ASIO drivers that become unusable after a program crash.</li> <li><strong>MIDI CCs</strong> that are being received from an external MIDI device can now be mapped to pattern / sample / instrument editor shortcuts.</li> - <li>The <strong>treeview</strong> can now handle more than 32 open modules.</li> + <li>The <strong>treeview</strong> can now handle more than 32 open modules and can now be used to rearrange (drag and drop), insert and duplicate (through the context menu) samples and instruments.</li> <li>The keyboard settings dialog can now be used to <strong>search for shortcuts</strong> by name and by key combination.</li> <li>At last, OpenMPT comes with a <strong>manual</strong> again!</li> </ul> - + <h3>Pattern Editor</h3> <div class="screenshots"> <a href="ReleaseNotesImages/1.20/quick_channel_settings.png"><img src="ReleaseNotesImages/1.20/quick_channel_settings.png" width="240" height="84" alt="Quick Channel Settings dialog" title="Quick Channel Settings dialog (click to view big screenshot)" /></a> @@ -130,20 +130,21 @@ <li>Like in Impulse Tracker, it is now possible to show the <strong>default sample volume</strong> if there is no volume command next to a note.</li> <li>OpenMPT can now record incoming <strong>aftertouch MIDI messages</strong> to patterns as either volume commands or MIDI macros.</li> <li>Middle-clicking or Ctrl-right-clicking a channel header opens the new <strong>quick channel settings</strong> dialog, which can be used to quickly adjust volume, panning and channel names.</li> + <li>It is now possible to <strong>transpose</strong> pattern selections by an arbitrary amount of semitones.</li> </ul> - + <h3>Sample Editor</h3> <ul> <li>The new <strong>sample tuner</strong> can be used to tune samples to a given note.</li> <li>Improved support for <strong>AIFF samples</strong> (up to 32-Bit PCM and floating point audio as well as little-endian PCM samples) and WAV samples with arbitrary bit resolutions up to 32-Bit (e.g. 20-Bit). <li>Editing large samples will not crash the tracker anymore.</li> </ul> - + <h3>Macro System</h3> <ul> <li>The MIDI macro system has been rewritten completely and is now (hopefully) 99% compatible with IT's MIDI macros. Some macro letters have been changed / added, see the "macro help" button in the macro settings or the manual for more information.</li> </ul> - + <h3>VST Plugins</h3> <div class="screenshots"> <a href="ReleaseNotesImages/1.20/instrument_settings.png"><img src="ReleaseNotesImages/1.20/instrument_settings.png" width="240" height="93" alt="Instrument Pitch Wheel Depth" title="Instrument Pitch Wheel Depth (click to view big screenshot)" /></a> @@ -152,18 +153,18 @@ <li>Plugins can now <strong>route MIDI events</strong> to follow-up plugins. This can be useful for LFO, arpeggiator or groove plugins.</li> <li>Searching for multiple <strong>unknown plugins</strong> will now open only one browser window.</li> <li>Some <strong>multi-output plugins</strong> like Kontakt (64 channels version) won't crash anymore.</li> - <li>Built-in support for <strong>jBridge</strong> to provide support for 64-Bit plugins and other plugins that won't load in OpenMPT.</li> + <li>Built-in support for <strong>jBridge</strong> to provide support for 64-Bit plugins and other plugins that won't load in OpenMPT.</li> <li>Exception handling for crashed plugins does finally work again, so the <strong>overall stability</strong> of OpenMPT as a VST host has increased. Note that a few plugins don't seem to like exception handling and might crash now.</li> - <li>The current <strong>playback position</strong> is now also reported correctly to plugins when jumping around in the order list. Previously, it was always reset to the song start. This enhances support for sequencer plugins like Maschine.</li> + <li>The current <strong>playback position</strong> is now also reported correctly to plugins when jumping around in the order list. Previously, it was always reset to the song start. This enhances support for sequencer plugins like Maschine.</li> <li>Effect plugins are now sorted into <strong>plugin categories</strong> (as reported by the plugins) in the plugin selection dialog. Delete the <tt>plugin.cache</tt> file in OpenMPT's settings directory to rebuild the plugin cache with categories. Loading a plugin into a module will also update the cache.</li> <li><strong>Vibrato effects</strong> are now also sent to instrument plugins! In fact, the whole MIDI portamento system has been overhauled and behaves exactly like sample portamentos and vibratos now - given that you set up the correct Pitch Wheel Depth of the plugin in the instrument settings tab.</li> </ul> - + <h3>There's more...</h3> <p> For a detailed description of what has changed, check <a href="History.txt">History.txt</a>. If you are new to OpenMPT, be sure to read the manual as well. </p> - + <h2>Known Issues</h2> <p> <i>This list has mostly been copied over from the old OpenMPT 1.17 RC2 release notes, so this not very comprehensive... :-)</i> @@ -177,13 +178,13 @@ <li>In Windows 98, the graphical parameter editor and instrument envelope editor grid display are messed up.</li> <li>There is no really <em>convenient</em> way to find out what features of the tracker are supported by the original trackers (Impulse Tracker, Fasttracker 2, etc...) when working with those file formats...</li> </ul> - + <h2>Contact</h2> <p> Helpful bug reports, new ideas and brave volunteers to test early development builds or contribute to the code are more than welcome!<br /> Our issue tracker is located at <a href="http://bugs.openmpt.org/">http://bugs.openmpt.org/</a> and can be used to report bugs and feature requests.<br /> You can also meet us at the ModPlug Central forums: <a href="http://forum.openmpt.org/">http://forum.openmpt.org/</a>. </p> - + </body> </html> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-10-28 23:16:19
|
Revision: 1411 http://modplug.svn.sourceforge.net/modplug/?rev=1411&view=rev Author: saga-games Date: 2012-10-28 23:16:13 +0000 (Sun, 28 Oct 2012) Log Message: ----------- [Fix] Importing DLS/SF2 samples into the sample editor does now properly remove sample attributes not supported by the current format. [Mod] OpenMPT: Version is now 1.20.04.01 Modified Paths: -------------- trunk/OpenMPT/mptrack/version.h trunk/OpenMPT/soundlib/Dlsbank.cpp trunk/OpenMPT/soundlib/ModSample.cpp Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2012-10-28 22:57:35 UTC (rev 1410) +++ trunk/OpenMPT/mptrack/version.h 2012-10-28 23:16:13 UTC (rev 1411) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 20 #define VER_MINOR 04 -#define VER_MINORMINOR 00 +#define VER_MINORMINOR 01 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of Modified: trunk/OpenMPT/soundlib/Dlsbank.cpp =================================================================== --- trunk/OpenMPT/soundlib/Dlsbank.cpp 2012-10-28 22:57:35 UTC (rev 1410) +++ trunk/OpenMPT/soundlib/Dlsbank.cpp 2012-10-28 23:16:13 UTC (rev 1411) @@ -1503,6 +1503,7 @@ sample.nC5Speed = p->dwSampleRate; sample.RelativeTone = p->byOriginalPitch; sample.nFineTune = p->chPitchCorrection; + sample.Convert(MOD_TYPE_IT, pSndFile->GetType()); SampleIO( SampleIO::_16bit, @@ -1604,6 +1605,7 @@ } } if (pDlsIns->szName[0]) memcpy(pSndFile->m_szNames[nSample], pDlsIns->szName, MAX_SAMPLENAME - 1); + sample.Convert(MOD_TYPE_IT, pSndFile->GetType()); bOk = TRUE; } FreeWaveForm(pWaveForm); Modified: trunk/OpenMPT/soundlib/ModSample.cpp =================================================================== --- trunk/OpenMPT/soundlib/ModSample.cpp 2012-10-28 22:57:35 UTC (rev 1410) +++ trunk/OpenMPT/soundlib/ModSample.cpp 2012-10-28 23:16:13 UTC (rev 1411) @@ -18,7 +18,7 @@ //------------------------------------------------------- { // Convert between frequency and transpose values if necessary. - if ((!(toType & (MOD_TYPE_MOD | MOD_TYPE_XM))) && (fromType & (MOD_TYPE_MOD | MOD_TYPE_XM))) + if((!(toType & (MOD_TYPE_MOD | MOD_TYPE_XM))) && (fromType & (MOD_TYPE_MOD | MOD_TYPE_XM))) { TransposeToFrequency(); RelativeTone = 0; @@ -43,9 +43,10 @@ nVibType = VIB_SINE; } - // No sustain loops for MOD/S3M/XM + // No global volume sustain loops for MOD/S3M/XM if(toType & (MOD_TYPE_MOD | MOD_TYPE_XM | MOD_TYPE_S3M)) { + nGlobalVol = 64; // Sustain loops - convert to normal loops if((uFlags & CHN_SUSTAINLOOP) != 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2012-11-02 14:39:44
|
Revision: 1413 http://modplug.svn.sourceforge.net/modplug/?rev=1413&view=rev Author: manxorist Date: 2012-11-02 14:39:37 +0000 (Fri, 02 Nov 2012) Log Message: ----------- [Ref] Remove ISoundDevice::SilenceAudioBuffer which hab been completely unused since at least r150 6 years ago. Revision Links: -------------- http://modplug.svn.sourceforge.net/modplug/?rev=150&view=rev Modified Paths: -------------- trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/soundlib/SNDDEV.H trunk/OpenMPT/soundlib/SNDDEVX.H trunk/OpenMPT/soundlib/Snddev.cpp Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2012-10-30 10:56:17 UTC (rev 1412) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2012-11-02 14:39:37 UTC (rev 1413) @@ -688,10 +688,7 @@ if ((pMainFrm) && (pMainFrm->IsPlaying()) && (CMainFrame::gpSoundDevice)) { bOk = CMainFrame::gpSoundDevice->FillAudioBuffer(&gMPTSoundSource, gdwPlayLatency, dwUser); - }/* else - { - CMainFrame::gpSoundDevice->SilenceAudioBuffer(&gMPTSoundSource, gdwPlayLatency, dwUser); - }*/ + } if (!bOk) { gbStopSent = TRUE; @@ -761,7 +758,6 @@ if (nSleep > 40) nSleep = 40; } else { - //CMainFrame::gpSoundDevice->SilenceAudioBuffer(&gMPTSoundSource, gdwPlayLatency); gbStopSent = TRUE; pMainFrm->PostMessage(WM_COMMAND, ID_PLAYER_STOP); } @@ -986,7 +982,7 @@ gpSoundDevice->Reset(); gpSoundDevice->Close(); - } + } } Modified: trunk/OpenMPT/soundlib/SNDDEV.H =================================================================== --- trunk/OpenMPT/soundlib/SNDDEV.H 2012-10-30 10:56:17 UTC (rev 1412) +++ trunk/OpenMPT/soundlib/SNDDEV.H 2012-11-02 14:39:37 UTC (rev 1413) @@ -92,7 +92,6 @@ virtual UINT HasFixedBitsPerSample() { return 0; } virtual bool IsOpen() = 0; virtual UINT GetCurrentLatency() = 0; - virtual void SilenceAudioBuffer(ISoundSource *pSource, ULONG nMaxLatency, DWORD dwUser=0) = 0; virtual UINT GetCurrentSampleRate(UINT nDevice) { UNREFERENCED_PARAMETER(nDevice); return 0; } // Return which samplerates are actually supported by the device. Currently only implemented properly for ASIO. virtual bool CanSampleRate(UINT nDevice, vector<UINT> &samplerates, vector<bool> &result) { UNREFERENCED_PARAMETER(nDevice); result.assign(samplerates.size(), true); return true; } ; Modified: trunk/OpenMPT/soundlib/SNDDEVX.H =================================================================== --- trunk/OpenMPT/soundlib/SNDDEVX.H 2012-10-30 10:56:17 UTC (rev 1412) +++ trunk/OpenMPT/soundlib/SNDDEVX.H 2012-11-02 14:39:37 UTC (rev 1413) @@ -57,7 +57,6 @@ VOID Start() {} bool IsOpen() { return (m_hWaveOut != NULL); } UINT GetCurrentLatency() { return m_nBuffersPending * m_nWaveBufferSize; } - void SilenceAudioBuffer(ISoundSource *pSource, ULONG nMaxLatency, DWORD dwBuffer); public: static VOID CALLBACK WaveOutCallBack(HWAVEOUT, UINT uMsg, DWORD, DWORD dw1, DWORD dw2); @@ -96,7 +95,6 @@ VOID Start() {} bool IsOpen() { return (m_pMixBuffer != NULL); } UINT GetCurrentLatency() { return m_dwLatency; } - void SilenceAudioBuffer(ISoundSource *pSource, ULONG nMaxLatency, DWORD dwBuffer); protected: DWORD LockBuffer(DWORD dwBytes, LPVOID *lpBuf1, LPDWORD lpSize1, LPVOID *lpBuf2, LPDWORD lpSize2); @@ -150,7 +148,6 @@ BOOL Directcallback() { return TRUE; } UINT HasFixedBitsPerSample() { return m_nBitsPerSample; } UINT GetCurrentLatency() { return m_nAsioBufferLen; } - void SilenceAudioBuffer(ISoundSource *pSource, ULONG nMaxLatency, DWORD dwBuffer); bool CanSampleRate(UINT nDevice, vector<UINT> &samplerates, vector<bool> &result); UINT GetCurrentSampleRate(UINT nDevice); Modified: trunk/OpenMPT/soundlib/Snddev.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snddev.cpp 2012-10-30 10:56:17 UTC (rev 1412) +++ trunk/OpenMPT/soundlib/Snddev.cpp 2012-11-02 14:39:37 UTC (rev 1413) @@ -185,14 +185,7 @@ } } -void CWaveDevice::SilenceAudioBuffer(ISoundSource *pSource, ULONG nMaxLatency, DWORD dwBuffer) -{ - UNREFERENCED_PARAMETER(pSource); - UNREFERENCED_PARAMETER(nMaxLatency); - UNREFERENCED_PARAMETER(dwBuffer); -} - BOOL CWaveDevice::FillAudioBuffer(ISoundSource *pSource, ULONG nMaxLatency, DWORD) //-------------------------------------------------------------------------------- { @@ -520,13 +513,6 @@ } -void CDSoundDevice::SilenceAudioBuffer(ISoundSource *pSource, ULONG nMaxLatency, DWORD dwBuffer) -{ - UNREFERENCED_PARAMETER(pSource); - UNREFERENCED_PARAMETER(nMaxLatency); - UNREFERENCED_PARAMETER(dwBuffer); -} - BOOL CDSoundDevice::FillAudioBuffer(ISoundSource *pSource, ULONG nMaxLatency, DWORD) //---------------------------------------------------------------------------------- { @@ -926,17 +912,6 @@ } -void CASIODevice::SilenceAudioBuffer(ISoundSource *pSource, ULONG nMaxLatency, DWORD dwBuffer) -//-------------------------------------------------------------------------------------------- -{ - UNREFERENCED_PARAMETER(pSource); - UNREFERENCED_PARAMETER(nMaxLatency); - for (UINT ich=0; ich<m_nChannels; ich++){ - memset(m_BufferInfo[ich].buffers[dwBuffer], 0, m_nAsioBufferLen); - } - -} - BOOL CASIODevice::FillAudioBuffer(ISoundSource *pSource, ULONG nMaxLatency, DWORD dwBuffer) //----------------------------------------------------------------------------------------- { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-11-04 18:10:37
|
Revision: 1417 http://modplug.svn.sourceforge.net/modplug/?rev=1417&view=rev Author: saga-games Date: 2012-11-04 18:10:29 +0000 (Sun, 04 Nov 2012) Log Message: ----------- [Fix] XM Loader: Importing patterns >= 240 didn't work (http://bugs.openmpt.org/view.php?id=308) [Mod] OpenMPT: Version is now 1.20.04.02 Modified Paths: -------------- trunk/OpenMPT/mptrack/version.h trunk/OpenMPT/soundlib/Load_xm.cpp trunk/OpenMPT/soundlib/Sndfile.cpp Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2012-11-04 18:07:54 UTC (rev 1416) +++ trunk/OpenMPT/mptrack/version.h 2012-11-04 18:10:29 UTC (rev 1417) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 20 #define VER_MINOR 04 -#define VER_MINORMINOR 01 +#define VER_MINORMINOR 02 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of Modified: trunk/OpenMPT/soundlib/Load_xm.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_xm.cpp 2012-11-04 18:07:54 UTC (rev 1416) +++ trunk/OpenMPT/soundlib/Load_xm.cpp 2012-11-04 18:10:29 UTC (rev 1417) @@ -121,6 +121,7 @@ //---------------------------------------------------------------------------------------- { // Reading patterns + sndFile.Patterns.ResizeArray(fileHeader.patterns); for(PATTERNINDEX pat = 0; pat < fileHeader.patterns; pat++) { size_t curPos = file.GetPosition(); @@ -277,7 +278,7 @@ StringFixer::ReadString<StringFixer::spacePadded>(m_szNames[0], fileHeader.songName); - m_nType = MOD_TYPE_XM; + ChangeModTypeTo(MOD_TYPE_XM); m_nMinPeriod = 27; m_nMaxPeriod = 54784; Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2012-11-04 18:07:54 UTC (rev 1416) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2012-11-04 18:10:29 UTC (rev 1417) @@ -1749,11 +1749,13 @@ void CSoundFile::ChangeModTypeTo(const MODTYPE& newType) //------------------------------------------------------ { - const MODTYPE oldtype = m_nType; - if (oldtype == newType) - return; + const MODTYPE oldtype = GetType(); m_nType = newType; SetModSpecsPointer(m_pModSpecs, m_nType); + + if(oldtype == newType) + return; + SetupMODPanning(); // Setup LRRL panning scheme if needed SetupITBidiMode(); // Setup IT bidi mode This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-11-05 23:24:53
|
Revision: 1419 http://modplug.svn.sourceforge.net/modplug/?rev=1419&view=rev Author: saga-games Date: 2012-11-05 23:24:41 +0000 (Mon, 05 Nov 2012) Log Message: ----------- [Ref] Rewrote IT/ITS/ITI loaders to use FileReader classes. Rewrite a lot of related stuff as well, so many things might be broken now (despite of unit tests)! Modified Paths: -------------- trunk/OpenMPT/mptrack/MIDIMapping.cpp trunk/OpenMPT/mptrack/MIDIMapping.h trunk/OpenMPT/mptrack/View_gen.cpp trunk/OpenMPT/mptrack/test/test.cpp trunk/OpenMPT/mptrack/test/test.mptm trunk/OpenMPT/soundlib/FileReader.h trunk/OpenMPT/soundlib/ITTools.cpp trunk/OpenMPT/soundlib/ITTools.h trunk/OpenMPT/soundlib/LOAD_AMF.CPP trunk/OpenMPT/soundlib/Load_it.cpp trunk/OpenMPT/soundlib/Load_itp.cpp trunk/OpenMPT/soundlib/Load_mo3.cpp trunk/OpenMPT/soundlib/Load_umx.cpp trunk/OpenMPT/soundlib/Load_xm.cpp trunk/OpenMPT/soundlib/ModInstrument.cpp trunk/OpenMPT/soundlib/ModSample.cpp trunk/OpenMPT/soundlib/ModSequence.cpp trunk/OpenMPT/soundlib/ModSequence.h trunk/OpenMPT/soundlib/SampleFormats.cpp trunk/OpenMPT/soundlib/SampleIO.cpp trunk/OpenMPT/soundlib/SampleIO.h trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/Sndfile.h Modified: trunk/OpenMPT/mptrack/MIDIMapping.cpp =================================================================== --- trunk/OpenMPT/mptrack/MIDIMapping.cpp 2012-11-05 15:09:20 UTC (rev 1418) +++ trunk/OpenMPT/mptrack/MIDIMapping.cpp 2012-11-05 23:24:41 UTC (rev 1419) @@ -76,11 +76,11 @@ } -bool CMIDIMapper::Deserialize(const BYTE* ptr, const size_t size) +bool CMIDIMapper::Deserialize(const char *ptr, const size_t size) //--------------------------------------------------------------- { m_Directives.clear(); - const BYTE* endptr = ptr + size; + const char* endptr = ptr + size; while(ptr + 5 <= endptr) { uint8 i8 = 0; Modified: trunk/OpenMPT/mptrack/MIDIMapping.h =================================================================== --- trunk/OpenMPT/mptrack/MIDIMapping.h 2012-11-05 15:09:20 UTC (rev 1418) +++ trunk/OpenMPT/mptrack/MIDIMapping.h 2012-11-05 23:24:41 UTC (rev 1419) @@ -112,7 +112,7 @@ size_t GetSerializationSize() const; void Serialize(FILE* f) const; - bool Deserialize(const BYTE* ptr, const size_t size); //Return false if succesful, true otherwise. + bool Deserialize(const char *ptr, const size_t size); //Return false if succesful, true otherwise. bool AreOrderEqual(const size_t a, const size_t b) {return !(m_Directives[a] < m_Directives[b] || m_Directives[b] < m_Directives[a]);} Modified: trunk/OpenMPT/mptrack/View_gen.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_gen.cpp 2012-11-05 15:09:20 UTC (rev 1418) +++ trunk/OpenMPT/mptrack/View_gen.cpp 2012-11-05 23:24:41 UTC (rev 1419) @@ -1416,31 +1416,48 @@ CModDoc *pModDoc = GetDocument(); CSoundFile* pSndFile = pModDoc->GetSoundFile(); prompt.Format("Insert empty slot before slot FX%d?", m_nCurrentPlugin + 1); - if (pSndFile->m_MixPlugins[MAX_MIXPLUGINS-1].pMixPlugin) + + // If last plugin slot is occupied, move it so that the plugin is not lost. + // This could certainly be improved... + bool moveLastPlug = false; + + if(pSndFile->m_MixPlugins[MAX_MIXPLUGINS - 1].pMixPlugin) { - prompt.Append("\nWarning: plugin data in last slot will be lost."); + if(pSndFile->m_MixPlugins[MAX_MIXPLUGINS - 2].pMixPlugin == nullptr) + { + moveLastPlug = true; + } else + { + prompt.Append("\nWarning: plugin data in last slot will be lost."); + } } - if (Reporting::Confirm(prompt) == cnfYes) + if(Reporting::Confirm(prompt) == cnfYes) { - //Delete last plug... - if (pSndFile->m_MixPlugins[MAX_MIXPLUGINS-1].pMixPlugin) + // Delete last plug... + if(pSndFile->m_MixPlugins[MAX_MIXPLUGINS - 1].pMixPlugin) { - pSndFile->m_MixPlugins[MAX_MIXPLUGINS-1].pMixPlugin->Release(); - memset(&(pSndFile->m_MixPlugins[MAX_MIXPLUGINS-1]), 0, sizeof(SNDMIXPLUGIN)); - //possible mem leak here... + if(moveLastPlug) + { + MovePlug(MAX_MIXPLUGINS - 1, MAX_MIXPLUGINS - 2, true); + } else + { + pSndFile->m_MixPlugins[MAX_MIXPLUGINS - 1].pMixPlugin->Release(); + memset(&(pSndFile->m_MixPlugins[MAX_MIXPLUGINS - 1]), 0, sizeof(SNDMIXPLUGIN)); + //possible mem leak here... + } } // Update MODCOMMANDs so that they won't be referring to old indexes (e.g. with NOTE_PC). - if (pSndFile->GetType() == MOD_TYPE_MPT) + if(pSndFile->GetType() == MOD_TYPE_MPT) pSndFile->Patterns.ForEachModCommand(PlugIndexModifier(m_nCurrentPlugin + 1, MAX_MIXPLUGINS - 1, 1)); - for (PLUGINDEX nSlot = MAX_MIXPLUGINS-1; nSlot > m_nCurrentPlugin; nSlot--) + for(PLUGINDEX nSlot = MAX_MIXPLUGINS - 1; nSlot > m_nCurrentPlugin; nSlot--) { - if (pSndFile->m_MixPlugins[nSlot-1].pMixPlugin) + if(pSndFile->m_MixPlugins[nSlot-1].pMixPlugin) { - MovePlug(nSlot-1, nSlot, NoPatternAdjust); + MovePlug(nSlot - 1, nSlot, NoPatternAdjust); } } Modified: trunk/OpenMPT/mptrack/test/test.cpp =================================================================== --- trunk/OpenMPT/mptrack/test/test.cpp 2012-11-05 15:09:20 UTC (rev 1418) +++ trunk/OpenMPT/mptrack/test/test.cpp 2012-11-05 23:24:41 UTC (rev 1419) @@ -519,7 +519,7 @@ const CSoundFile *pSndFile = pModDoc->GetSoundFile(); // Global Variables - VERIFY_EQUAL_NONCONT(strcmp(pSndFile->m_szNames[0], "Test Module"), 0); + VERIFY_EQUAL_NONCONT(strcmp(pSndFile->m_szNames[0], "Test Module_____________X"), 0); VERIFY_EQUAL_NONCONT(pSndFile->m_lpszSongComments[0], 'O'); VERIFY_EQUAL_NONCONT(pSndFile->m_nDefaultTempo, 139); VERIFY_EQUAL_NONCONT(pSndFile->m_nDefaultSpeed, 5); @@ -555,7 +555,7 @@ VERIFY_EQUAL_NONCONT(pSndFile->m_MidiCfg.GetFixedMacroType(), zxx_resomode); // Channels - VERIFY_EQUAL_NONCONT(pSndFile->GetNumChannels(), 2); + VERIFY_EQUAL_NONCONT(pSndFile->GetNumChannels(), 70); VERIFY_EQUAL_NONCONT(strcmp(pSndFile->ChnSettings[0].szName, "First Channel"), 0); VERIFY_EQUAL_NONCONT(pSndFile->ChnSettings[0].nPan, 32); VERIFY_EQUAL_NONCONT(pSndFile->ChnSettings[0].nVolume, 32); @@ -568,6 +568,11 @@ VERIFY_EQUAL_NONCONT(pSndFile->ChnSettings[1].dwFlags, CHN_SURROUND); VERIFY_EQUAL_NONCONT(pSndFile->ChnSettings[1].nMixPlugin, 1); + VERIFY_EQUAL_NONCONT(strcmp(pSndFile->ChnSettings[69].szName, "Last Channel______X"), 0); + VERIFY_EQUAL_NONCONT(pSndFile->ChnSettings[69].nPan, 256); + VERIFY_EQUAL_NONCONT(pSndFile->ChnSettings[69].nVolume, 7); + VERIFY_EQUAL_NONCONT(pSndFile->ChnSettings[69].dwFlags, 0); + VERIFY_EQUAL_NONCONT(pSndFile->ChnSettings[69].nMixPlugin, 1); // Samples VERIFY_EQUAL_NONCONT(pSndFile->GetNumSamples(), 3); { @@ -621,73 +626,75 @@ } // Instruments - VERIFY_EQUAL_NONCONT(pSndFile->GetNumInstruments(), 1); - const ModInstrument *pIns = pSndFile->Instruments[1]; - VERIFY_EQUAL_NONCONT(pIns->nGlobalVol, 32); - VERIFY_EQUAL_NONCONT(pIns->nFadeOut, 1024); - VERIFY_EQUAL_NONCONT(pIns->nPan, 64); - VERIFY_EQUAL_NONCONT(pIns->dwFlags, INS_SETPANNING); + VERIFY_EQUAL_NONCONT(pSndFile->GetNumInstruments(), 2); + for(INSTRUMENTINDEX ins = 1; ins <= 2; ins++) + { + const ModInstrument *pIns = pSndFile->Instruments[ins]; + VERIFY_EQUAL_NONCONT(pIns->nGlobalVol, 32); + VERIFY_EQUAL_NONCONT(pIns->nFadeOut, 1024); + VERIFY_EQUAL_NONCONT(pIns->nPan, 64); + VERIFY_EQUAL_NONCONT(pIns->dwFlags, INS_SETPANNING); - VERIFY_EQUAL_NONCONT(pIns->nPPS, 16); - VERIFY_EQUAL_NONCONT(pIns->nPPC, (NOTE_MIDDLEC - NOTE_MIN) + 6); // F#5 + VERIFY_EQUAL_NONCONT(pIns->nPPS, 16); + VERIFY_EQUAL_NONCONT(pIns->nPPC, (NOTE_MIDDLEC - NOTE_MIN) + 6); // F#5 - VERIFY_EQUAL_NONCONT(pIns->nVolRampUp, 1200); - VERIFY_EQUAL_NONCONT(pIns->nResampling, SRCMODE_POLYPHASE); + VERIFY_EQUAL_NONCONT(pIns->nVolRampUp, 1200); + VERIFY_EQUAL_NONCONT(pIns->nResampling, SRCMODE_POLYPHASE); - VERIFY_EQUAL_NONCONT(pIns->IsCutoffEnabled(), true); - VERIFY_EQUAL_NONCONT(pIns->GetCutoff(), 0x32); - VERIFY_EQUAL_NONCONT(pIns->IsResonanceEnabled(), true); - VERIFY_EQUAL_NONCONT(pIns->GetResonance(), 0x64); - VERIFY_EQUAL_NONCONT(pIns->nFilterMode, FLTMODE_HIGHPASS); + VERIFY_EQUAL_NONCONT(pIns->IsCutoffEnabled(), true); + VERIFY_EQUAL_NONCONT(pIns->GetCutoff(), 0x32); + VERIFY_EQUAL_NONCONT(pIns->IsResonanceEnabled(), true); + VERIFY_EQUAL_NONCONT(pIns->GetResonance(), 0x64); + VERIFY_EQUAL_NONCONT(pIns->nFilterMode, FLTMODE_HIGHPASS); - VERIFY_EQUAL_NONCONT(pIns->nVolSwing, 0x30); - VERIFY_EQUAL_NONCONT(pIns->nPanSwing, 0x18); - VERIFY_EQUAL_NONCONT(pIns->nCutSwing, 0x0C); - VERIFY_EQUAL_NONCONT(pIns->nResSwing, 0x3C); + VERIFY_EQUAL_NONCONT(pIns->nVolSwing, 0x30); + VERIFY_EQUAL_NONCONT(pIns->nPanSwing, 0x18); + VERIFY_EQUAL_NONCONT(pIns->nCutSwing, 0x0C); + VERIFY_EQUAL_NONCONT(pIns->nResSwing, 0x3C); - VERIFY_EQUAL_NONCONT(pIns->nNNA, NNA_CONTINUE); - VERIFY_EQUAL_NONCONT(pIns->nDCT, DCT_NOTE); - VERIFY_EQUAL_NONCONT(pIns->nDNA, DNA_NOTEFADE); + VERIFY_EQUAL_NONCONT(pIns->nNNA, NNA_CONTINUE); + VERIFY_EQUAL_NONCONT(pIns->nDCT, DCT_NOTE); + VERIFY_EQUAL_NONCONT(pIns->nDNA, DNA_NOTEFADE); - VERIFY_EQUAL_NONCONT(pIns->nMixPlug, 1); - VERIFY_EQUAL_NONCONT(pIns->nMidiChannel, 16); - VERIFY_EQUAL_NONCONT(pIns->nMidiProgram, 64); - VERIFY_EQUAL_NONCONT(pIns->wMidiBank, 2); + VERIFY_EQUAL_NONCONT(pIns->nMixPlug, 1); + VERIFY_EQUAL_NONCONT(pIns->nMidiChannel, 16); + VERIFY_EQUAL_NONCONT(pIns->nMidiProgram, 64); + VERIFY_EQUAL_NONCONT(pIns->wMidiBank, 2); - VERIFY_EQUAL_NONCONT(pIns->pTuning, pIns->s_DefaultTuning); + VERIFY_EQUAL_NONCONT(pIns->pTuning, pIns->s_DefaultTuning); - VERIFY_EQUAL_NONCONT(pIns->wPitchToTempoLock, 130); + VERIFY_EQUAL_NONCONT(pIns->wPitchToTempoLock, 130); - VERIFY_EQUAL_NONCONT(pIns->nPluginVelocityHandling, PLUGIN_VELOCITYHANDLING_VOLUME); - VERIFY_EQUAL_NONCONT(pIns->nPluginVolumeHandling, PLUGIN_VOLUMEHANDLING_MIDI); + VERIFY_EQUAL_NONCONT(pIns->nPluginVelocityHandling, PLUGIN_VELOCITYHANDLING_VOLUME); + VERIFY_EQUAL_NONCONT(pIns->nPluginVolumeHandling, PLUGIN_VOLUMEHANDLING_MIDI); - for(size_t i = 0; i < NOTE_MAX; i++) - { - VERIFY_EQUAL_NONCONT(pIns->Keyboard[i], (i == NOTE_MIDDLEC - 1) ? 99 : 1); - VERIFY_EQUAL_NONCONT(pIns->NoteMap[i], (i == NOTE_MIDDLEC - 1) ? (i + 13) : (i + 1)); - } + for(size_t i = 0; i < NOTE_MAX; i++) + { + VERIFY_EQUAL_NONCONT(pIns->Keyboard[i], (i == NOTE_MIDDLEC - 1) ? 99 : 1); + VERIFY_EQUAL_NONCONT(pIns->NoteMap[i], (i == NOTE_MIDDLEC - 1) ? (i + 13) : (i + 1)); + } - VERIFY_EQUAL_NONCONT(pIns->VolEnv.dwFlags, ENV_ENABLED | ENV_CARRY); - VERIFY_EQUAL_NONCONT(pIns->VolEnv.nNodes, 3); - VERIFY_EQUAL_NONCONT(pIns->VolEnv.nReleaseNode, 1); - VERIFY_EQUAL_NONCONT(pIns->VolEnv.Ticks[2], 96); - VERIFY_EQUAL_NONCONT(pIns->VolEnv.Values[2], 0); + VERIFY_EQUAL_NONCONT(pIns->VolEnv.dwFlags, ENV_ENABLED | ENV_CARRY); + VERIFY_EQUAL_NONCONT(pIns->VolEnv.nNodes, 3); + VERIFY_EQUAL_NONCONT(pIns->VolEnv.nReleaseNode, 1); + VERIFY_EQUAL_NONCONT(pIns->VolEnv.Ticks[2], 96); + VERIFY_EQUAL_NONCONT(pIns->VolEnv.Values[2], 0); - VERIFY_EQUAL_NONCONT(pIns->PanEnv.dwFlags, ENV_LOOP); - VERIFY_EQUAL_NONCONT(pIns->PanEnv.nNodes, 76); - VERIFY_EQUAL_NONCONT(pIns->PanEnv.nLoopStart, 22); - VERIFY_EQUAL_NONCONT(pIns->PanEnv.nLoopEnd, 29); - VERIFY_EQUAL_NONCONT(pIns->PanEnv.nReleaseNode, ENV_RELEASE_NODE_UNSET); - VERIFY_EQUAL_NONCONT(pIns->PanEnv.Ticks[75], 427); - VERIFY_EQUAL_NONCONT(pIns->PanEnv.Values[75], 27); + VERIFY_EQUAL_NONCONT(pIns->PanEnv.dwFlags, ENV_LOOP); + VERIFY_EQUAL_NONCONT(pIns->PanEnv.nNodes, 76); + VERIFY_EQUAL_NONCONT(pIns->PanEnv.nLoopStart, 22); + VERIFY_EQUAL_NONCONT(pIns->PanEnv.nLoopEnd, 29); + VERIFY_EQUAL_NONCONT(pIns->PanEnv.nReleaseNode, ENV_RELEASE_NODE_UNSET); + VERIFY_EQUAL_NONCONT(pIns->PanEnv.Ticks[75], 427); + VERIFY_EQUAL_NONCONT(pIns->PanEnv.Values[75], 27); - VERIFY_EQUAL_NONCONT(pIns->PitchEnv.dwFlags, ENV_ENABLED | ENV_CARRY | ENV_SUSTAIN | ENV_FILTER); - VERIFY_EQUAL_NONCONT(pIns->PitchEnv.nNodes, 3); - VERIFY_EQUAL_NONCONT(pIns->PitchEnv.nSustainStart, 1); - VERIFY_EQUAL_NONCONT(pIns->PitchEnv.nSustainEnd, 2); - VERIFY_EQUAL_NONCONT(pIns->PitchEnv.Ticks[1], 96); - VERIFY_EQUAL_NONCONT(pIns->PitchEnv.Values[1], 64); - + VERIFY_EQUAL_NONCONT(pIns->PitchEnv.dwFlags, ENV_ENABLED | ENV_CARRY | ENV_SUSTAIN | ENV_FILTER); + VERIFY_EQUAL_NONCONT(pIns->PitchEnv.nNodes, 3); + VERIFY_EQUAL_NONCONT(pIns->PitchEnv.nSustainStart, 1); + VERIFY_EQUAL_NONCONT(pIns->PitchEnv.nSustainEnd, 2); + VERIFY_EQUAL_NONCONT(pIns->PitchEnv.Ticks[1], 96); + VERIFY_EQUAL_NONCONT(pIns->PitchEnv.Values[1], 64); + } // Sequences VERIFY_EQUAL_NONCONT(pSndFile->Order.GetNumSequences(), 2); @@ -707,7 +714,7 @@ VERIFY_EQUAL_NONCONT(pSndFile->Patterns[0].GetName(), "First Pattern"); VERIFY_EQUAL_NONCONT(pSndFile->Patterns[0].GetNumRows(), 70); - VERIFY_EQUAL_NONCONT(pSndFile->Patterns[0].GetNumChannels(), 2); + VERIFY_EQUAL_NONCONT(pSndFile->Patterns[0].GetNumChannels(), 70); VERIFY_EQUAL_NONCONT(pSndFile->Patterns[0].GetOverrideSignature(), true); VERIFY_EQUAL_NONCONT(pSndFile->Patterns[0].GetRowsPerBeat(), 5); VERIFY_EQUAL_NONCONT(pSndFile->Patterns[0].GetRowsPerMeasure(), 10); @@ -715,7 +722,7 @@ VERIFY_EQUAL_NONCONT(pSndFile->Patterns[1].GetName(), "Second Pattern"); VERIFY_EQUAL_NONCONT(pSndFile->Patterns[1].GetNumRows(), 32); - VERIFY_EQUAL_NONCONT(pSndFile->Patterns[1].GetNumChannels(), 2); + VERIFY_EQUAL_NONCONT(pSndFile->Patterns[1].GetNumChannels(), 70); VERIFY_EQUAL_NONCONT(pSndFile->Patterns[1].GetOverrideSignature(), false); VERIFY_EQUAL_NONCONT(pSndFile->Patterns[1].GetRowsPerBeat(), 0); VERIFY_EQUAL_NONCONT(pSndFile->Patterns[1].GetRowsPerMeasure(), 0); Modified: trunk/OpenMPT/mptrack/test/test.mptm =================================================================== (Binary files differ) Modified: trunk/OpenMPT/soundlib/FileReader.h =================================================================== --- trunk/OpenMPT/soundlib/FileReader.h 2012-11-05 15:09:20 UTC (rev 1418) +++ trunk/OpenMPT/soundlib/FileReader.h 2012-11-05 23:24:41 UTC (rev 1419) @@ -21,16 +21,19 @@ class FileReader //============== { +public: + typedef size_t off_t; // Type for file offsets and sizes + private: - const char *streamData; // Pointer to memory-mapped file - size_t streamLength; // Size of memory-mapped file in bytes - size_t streamPos; // Cursor location in the file + const char *streamData; // Pointer to memory-mapped file + off_t streamLength; // Size of memory-mapped file in bytes + off_t streamPos; // Cursor location in the file public: // Initialize invalid file reader object. FileReader() : streamData(nullptr), streamLength(0), streamPos(0) { } // Initialize file reader object with pointer to data and data length. - FileReader(const char *data, size_t length) : streamData(data), streamLength(length), streamPos(0) { } + FileReader(const char *data, off_t length) : streamData(data), streamLength(length), streamPos(0) { } // Initialize file reader object based on an existing file reader object. The other object's stream position is copied. FileReader(const FileReader &other) : streamData(other.streamData), streamLength(other.streamLength), streamPos(other.streamPos) { } @@ -48,7 +51,7 @@ // Seek to a position in the mapped file. // Returns false if position is invalid. - bool Seek(size_t position) + bool Seek(off_t position) { if(position <= streamLength) { @@ -62,7 +65,7 @@ // Increases position by skipBytes. // Returns true if skipBytes could be skipped or false if the file end was reached earlier. - bool Skip(size_t skipBytes) + bool Skip(off_t skipBytes) { if(BytesLeft() >= skipBytes) { @@ -77,7 +80,7 @@ // Decreases position by skipBytes. // Returns true if skipBytes could be skipped or false if the file start was reached earlier. - bool SkipBack(size_t skipBytes) + bool SkipBack(off_t skipBytes) { if(streamPos >= skipBytes) { @@ -91,33 +94,33 @@ } // Returns cursor position in the mapped file. - size_t GetPosition() const + off_t GetPosition() const { return streamPos; } // Returns size of the mapped file in bytes. - size_t GetLength() const + off_t GetLength() const { return streamLength; } // Return byte count between cursor position and end of file, i.e. how many bytes can still be read. - size_t BytesLeft() const + off_t BytesLeft() const { ASSERT(streamPos <= streamLength); return streamLength - streamPos; } // Check if "amount" bytes can be read from the current position in the stream. - bool CanRead(size_t amount) const + bool CanRead(off_t amount) const { return (amount <= BytesLeft()); } // Create a new FileReader object for parsing a sub chunk at a given position with a given length. // The file cursor is not modified. - FileReader GetChunk(size_t position, size_t length) const + FileReader GetChunk(off_t position, off_t length) const { if(position < streamLength) { @@ -130,9 +133,9 @@ // Create a new FileReader object for parsing a sub chunk at the current position with a given length. // The file cursor is advanced by "length" bytes. - FileReader GetChunk(size_t length) + FileReader GetChunk(off_t length) { - size_t position = streamPos; + off_t position = streamPos; Skip(length); return GetChunk(position, length); } @@ -328,9 +331,9 @@ // Allow to read a struct partially (if there's less memory available than the struct's size, fill it up with zeros). // The file cursor is advanced by "partialSize" bytes. template <typename T> - bool ReadStructPartial(T &target, size_t partialSize = sizeof(T)) + bool ReadStructPartial(T &target, off_t partialSize = sizeof(T)) { - const size_t copyBytes = Util::Min(partialSize, sizeof(target), BytesLeft()); + const off_t copyBytes = Util::Min(partialSize, sizeof(target), BytesLeft()); memcpy(&target, streamData + streamPos, copyBytes); memset(reinterpret_cast<char *>(&target) + copyBytes, 0, sizeof(target) - copyBytes); @@ -357,8 +360,8 @@ // Read a string of length srcSize into fixed-length char array destBuffer using a given read mode. // The file cursor is advanced by "srcSize" bytes. - template<StringFixer::ReadWriteMode mode, size_t destSize> - bool ReadString(char (&destBuffer)[destSize], const size_t srcSize) + template<StringFixer::ReadWriteMode mode, off_t destSize> + bool ReadString(char (&destBuffer)[destSize], const off_t srcSize) { if(CanRead(srcSize)) { @@ -374,7 +377,7 @@ // Read an array. // If successful, the file cursor is advanced by the size of the array. // Otherwise, the target is zeroed. - template<typename T, size_t destSize> + template<typename T, off_t destSize> bool ReadArray(T (&destArray)[destSize]) { if(CanRead(sizeof(destArray))) @@ -395,12 +398,15 @@ template<typename T> bool ReadVector(std::vector<T> &destVector, size_t destSize) { - const size_t readSize = sizeof(T) * destSize; + const off_t readSize = sizeof(T) * destSize; if(CanRead(readSize)) { destVector.resize(destSize); - memcpy(&destVector[0], streamData + streamPos, readSize); - streamPos += readSize; + if(readSize) + { + memcpy(&destVector[0], streamData + streamPos, readSize); + streamPos += readSize; + } return true; } else { @@ -414,7 +420,7 @@ // Returns false if the string could not be found. The file cursor is not advanced in this case. bool ReadMagic(const char *const magic) { - const size_t magicLength = strlen(magic); + const off_t magicLength = strlen(magic); if(CanRead(magicLength) && !memcmp(streamData + streamPos, magic, magicLength)) { streamPos += magicLength; @@ -442,12 +448,12 @@ return false; } - size_t writtenBits = 0; + off_t writtenBits = 0; uint8 b = ReadUint8(); target = (b & 0x7F); // Count actual bits used in most significant byte (i.e. this one) - for(size_t bit = 0; bit < 7; bit++) + for(off_t bit = 0; bit < 7; bit++) { if((b & (1 << bit)) != 0) { Modified: trunk/OpenMPT/soundlib/ITTools.cpp =================================================================== --- trunk/OpenMPT/soundlib/ITTools.cpp 2012-11-05 15:09:20 UTC (rev 1418) +++ trunk/OpenMPT/soundlib/ITTools.cpp 2012-11-05 23:24:41 UTC (rev 1419) @@ -114,12 +114,22 @@ } +// Convert all multi-byte numeric values to current platform's endianness or vice versa. +void ITOldInstrument::ConvertEndianness() +//--------------------------------------- +{ + SwapBytesLE(id); + SwapBytesLE(fadeout); + SwapBytesLE(trkvers); +} + + // Convert an ITOldInstrument to OpenMPT's internal instrument representation. void ITOldInstrument::ConvertToMPT(ModInstrument &mptIns) const //------------------------------------------------------------- { // Header - if(id != LittleEndian(ITOldInstrument::magic)) + if(id != ITOldInstrument::magic) { return; } @@ -128,7 +138,7 @@ StringFixer::ReadString<StringFixer::nullTerminated>(mptIns.filename, filename); // Volume / Panning - mptIns.nFadeOut = LittleEndianW(fadeout) << 6; + mptIns.nFadeOut = fadeout << 6; mptIns.nGlobalVol = 64; mptIns.nPan = 128; @@ -182,6 +192,18 @@ } +// Convert all multi-byte numeric values to current platform's endianness or vice versa. +void ITInstrument::ConvertEndianness() +//------------------------------------ +{ + SwapBytesLE(id); + SwapBytesLE(fadeout); + SwapBytesLE(trkvers); + SwapBytesLE(mbank); + SwapBytesLE(dummy); +} + + // Convert OpenMPT's internal instrument representation to an ITInstrument. size_t ITInstrument::ConvertToIT(const ModInstrument &mptIns, bool compatExport, const CSoundFile &sndFile) //--------------------------------------------------------------------------------------------------------- @@ -189,14 +211,14 @@ MemsetZero(*this); // Header - id = LittleEndian(ITInstrument::magic); - trkvers = LittleEndianW(0x0214); + id = ITInstrument::magic; + trkvers = 0x0214; StringFixer::WriteString<StringFixer::nullTerminated>(filename, mptIns.filename); StringFixer::WriteString<StringFixer::nullTerminated>(name, mptIns.name); // Volume / Panning - fadeout = LittleEndianW(static_cast<uint16>(min(mptIns.nFadeOut >> 5, 256))); + fadeout = static_cast<uint16>(min(mptIns.nFadeOut >> 5, 256)); gbv = static_cast<uint8>(min(mptIns.nGlobalVol * 2, 128)); dfp = static_cast<uint8>(min(mptIns.nPan / 4, 64)); if(!mptIns.dwFlags[INS_SETPANNING]) dfp |= ITInstrument::ignorePanning; @@ -268,7 +290,7 @@ size_t ITInstrument::ConvertToMPT(ModInstrument &mptIns, MODTYPE modFormat) const //------------------------------------------------------------------------------- { - if(id != LittleEndian(ITInstrument::magic)) + if(id != ITInstrument::magic) { return 0; } @@ -277,7 +299,7 @@ StringFixer::ReadString<StringFixer::nullTerminated>(mptIns.filename, filename); // Volume / Panning - mptIns.nFadeOut = LittleEndianW(fadeout) << 5; + mptIns.nFadeOut = fadeout << 5; mptIns.nGlobalVol = gbv / 2; LimitMax(mptIns.nGlobalVol, 64u); mptIns.nPan = (dfp & 0x7F) * 4; @@ -315,7 +337,7 @@ } if(mbank <= 128) { - mptIns.wMidiBank = LittleEndianW(mbank); + mptIns.wMidiBank = mbank; } // Envelope point count. Limited to 25 in IT format. @@ -351,6 +373,14 @@ } +// Convert all multi-byte numeric values to current platform's endianness or vice versa. +void ITInstrumentEx::ConvertEndianness() +//-------------------------------------- +{ + iti.ConvertEndianness(); +} + + // Convert OpenMPT's internal instrument representation to an ITInstrumentEx. Returns amount of bytes that need to be written to file. size_t ITInstrumentEx::ConvertToIT(const ModInstrument &mptIns, bool compatExport, const CSoundFile &sndFile) //----------------------------------------------------------------------------------------------------------- @@ -391,7 +421,7 @@ if(usedExtension) { // If we actually had to extend the sample map, update the magic bytes and instrument size. - iti.dummy = LittleEndian(ITInstrumentEx::mptx); + iti.dummy = ITInstrumentEx::mptx; instSize = sizeof(ITInstrumentEx); } @@ -406,7 +436,7 @@ size_t insSize = iti.ConvertToMPT(mptIns, fromType); // Is this actually an extended instrument? - if(insSize == 0 || iti.dummy != LittleEndian(ITInstrumentEx::mptx)) + if(insSize == 0 || iti.dummy != ITInstrumentEx::mptx) { return insSize; } @@ -421,6 +451,21 @@ } +// Convert all multi-byte numeric values to current platform's endianness or vice versa. +void ITSample::ConvertEndianness() +//-------------------------------- +{ + SwapBytesLE(id); + SwapBytesLE(length); + SwapBytesLE(loopbegin); + SwapBytesLE(loopend); + SwapBytesLE(C5Speed); + SwapBytesLE(susloopbegin); + SwapBytesLE(susloopend); + SwapBytesLE(samplepointer); +} + + // Convert OpenMPT's internal sample representation to an ITSample. void ITSample::ConvertToIT(const ModSample &mptSmp, MODTYPE fromType) //------------------------------------------------------------------- @@ -428,7 +473,7 @@ MemsetZero(*this); // Header - id = LittleEndian(ITSample::magic); + id = ITSample::magic; StringFixer::WriteString<StringFixer::nullTerminated>(filename, mptSmp.filename); //StringFixer::WriteString<StringFixer::nullTerminated>(name, m_szNames[nsmp]); @@ -463,14 +508,14 @@ } // Frequency - C5Speed = LittleEndian(mptSmp.nC5Speed ? mptSmp.nC5Speed : 8363); + C5Speed = mptSmp.nC5Speed ? mptSmp.nC5Speed : 8363; // Size and loops - length = LittleEndian(mptSmp.nLength); - loopbegin = LittleEndian(mptSmp.nLoopStart); - loopend = LittleEndian(mptSmp.nLoopEnd); - susloopbegin = LittleEndian(mptSmp.nSustainStart); - susloopend = LittleEndian(mptSmp.nSustainEnd); + length = mptSmp.nLength; + loopbegin = mptSmp.nLoopStart; + loopend = mptSmp.nLoopEnd; + susloopbegin = mptSmp.nSustainStart; + susloopend = mptSmp.nSustainEnd; // Auto Vibrato settings static const uint8 autovibxm2it[8] = { 0, 2, 4, 1, 3, 0, 0, 0 }; // OpenMPT VibratoType -> IT Vibrato @@ -491,7 +536,7 @@ size_t ITSample::ConvertToMPT(ModSample &mptSmp) const //---------------------------------------------------- { - if(id != LittleEndian(ITSample::magic)) + if(id != ITSample::magic) { return 0; } @@ -515,16 +560,16 @@ if(flags & ITSample::sampleBidiSustain) mptSmp.uFlags |= CHN_PINGPONGSUSTAIN; // Frequency - mptSmp.nC5Speed = LittleEndian(C5Speed); + mptSmp.nC5Speed = C5Speed; if(!mptSmp.nC5Speed) mptSmp.nC5Speed = 8363; if(mptSmp.nC5Speed < 256) mptSmp.nC5Speed = 256; // Size and loops - mptSmp.nLength = LittleEndian(length); - mptSmp.nLoopStart = LittleEndian(loopbegin); - mptSmp.nLoopEnd = LittleEndian(loopend); - mptSmp.nSustainStart = LittleEndian(susloopbegin); - mptSmp.nSustainEnd = LittleEndian(susloopend); + mptSmp.nLength = length; + mptSmp.nLoopStart = loopbegin; + mptSmp.nLoopEnd = loopend; + mptSmp.nSustainStart = susloopbegin; + mptSmp.nSustainEnd = susloopend; // Auto Vibrato settings static const uint8 autovibit2xm[8] = { VIB_SINE, VIB_RAMP_DOWN, VIB_SQUARE, VIB_RANDOM, VIB_RAMP_UP, 0, 0, 0 }; // IT Vibrato -> OpenMPT VibratoType @@ -533,7 +578,7 @@ mptSmp.nVibDepth = vid & 0x7F; mptSmp.nVibSweep = vir; - return LittleEndian(samplepointer); + return samplepointer; } @@ -587,23 +632,29 @@ #ifdef MODPLUG_TRACKER +// Convert all multi-byte numeric values to current platform's endianness or vice versa. +void ITHistoryStruct::ConvertEndianness() +//--------------------------------------- +{ + SwapBytesLE(fatdate); + SwapBytesLE(fattime); + SwapBytesLE(runtime); +} + + // Convert an ITHistoryStruct to OpenMPT's internal edit history representation void ITHistoryStruct::ConvertToMPT(FileHistory &mptHistory) const //--------------------------------------------------------------- { - uint16 date = LittleEndianW(fatdate); - uint16 time = LittleEndianW(fattime); - uint32 run = LittleEndian(runtime); - // Decode FAT date and time MemsetZero(mptHistory.loadDate); - mptHistory.loadDate.tm_year = ((date >> 9) & 0x7F) + 80; - mptHistory.loadDate.tm_mon = Clamp((date >> 5) & 0x0F, 1, 12) - 1; - mptHistory.loadDate.tm_mday = Clamp(date & 0x1F, 1, 31); - mptHistory.loadDate.tm_hour = Clamp((time >> 11) & 0x1F, 0, 23); - mptHistory.loadDate.tm_min = Clamp((time >> 5) & 0x3F, 0, 59); - mptHistory.loadDate.tm_sec = Clamp((time & 0x1F) * 2, 0, 59); - mptHistory.openTime = static_cast<uint32>(run * (HISTORY_TIMER_PRECISION / 18.2f)); + mptHistory.loadDate.tm_year = ((fatdate >> 9) & 0x7F) + 80; + mptHistory.loadDate.tm_mon = Clamp((fatdate >> 5) & 0x0F, 1, 12) - 1; + mptHistory.loadDate.tm_mday = Clamp(fatdate & 0x1F, 1, 31); + mptHistory.loadDate.tm_hour = Clamp((fattime >> 11) & 0x1F, 0, 23); + mptHistory.loadDate.tm_min = Clamp((fattime >> 5) & 0x3F, 0, 59); + mptHistory.loadDate.tm_sec = Clamp((fattime & 0x1F) * 2, 0, 59); + mptHistory.openTime = static_cast<uint32>(runtime * (HISTORY_TIMER_PRECISION / 18.2f)); } @@ -615,10 +666,6 @@ fatdate = static_cast<uint16>(mptHistory.loadDate.tm_mday | ((mptHistory.loadDate.tm_mon + 1) << 5) | ((mptHistory.loadDate.tm_year - 80) << 9)); fattime = static_cast<uint16>((mptHistory.loadDate.tm_sec / 2) | (mptHistory.loadDate.tm_min << 5) | (mptHistory.loadDate.tm_hour << 11)); runtime = static_cast<uint32>(mptHistory.openTime * (18.2f / HISTORY_TIMER_PRECISION)); - - SwapBytesLE(fatdate); - SwapBytesLE(fattime); - SwapBytesLE(runtime); } #endif // MODPLUG_TRACKER \ No newline at end of file Modified: trunk/OpenMPT/soundlib/ITTools.h =================================================================== --- trunk/OpenMPT/soundlib/ITTools.h 2012-11-05 15:09:20 UTC (rev 1418) +++ trunk/OpenMPT/soundlib/ITTools.h 2012-11-05 23:24:41 UTC (rev 1419) @@ -143,6 +143,9 @@ uint8 volenv[200]; // This appears to be a pre-computed (interpolated) version of the volume envelope data found below. uint8 nodes[25 * 2]; // Volume Envelope Node Positions / Values + // Convert all multi-byte numeric values to current platform's endianness or vice versa. + void ConvertEndianness(); + // Convert an ITOldInstrument to OpenMPT's internal instrument representation. void ConvertToMPT(ModInstrument &mptIns) const; }; @@ -193,6 +196,9 @@ ITEnvelope pitchenv; // Pitch / Filter Envelope uint32 dummy; // IT saves some additional padding bytes to match the size of the old instrument format for simplified loading. We use them for some hacks. + // Convert all multi-byte numeric values to current platform's endianness or vice versa. + void ConvertEndianness(); + // Convert OpenMPT's internal instrument representation to an ITInstrument. Returns amount of bytes that need to be written. size_t ConvertToIT(const ModInstrument &mptIns, bool compatExport, const CSoundFile &sndFile); // Convert an ITInstrument to OpenMPT's internal instrument representation. Returns size of the instrument data that has been read. @@ -213,6 +219,9 @@ ITInstrument iti; // Normal IT Instrument uint8 keyboardhi[120]; // High Byte of Sample map + // Convert all multi-byte numeric values to current platform's endianness or vice versa. + void ConvertEndianness(); + // Convert OpenMPT's internal instrument representation to an ITInstrumentEx. Returns amount of bytes that need to be written. size_t ConvertToIT(const ModInstrument &mptIns, bool compatExport, const CSoundFile &sndFile); // Convert an ITInstrumentEx to OpenMPT's internal instrument representation. Returns size of the instrument data that has been read. @@ -274,6 +283,9 @@ uint8 vir; // Auto-Vibrato Sweep (called Rate in IT) uint8 vit; // Auto-Vibrato Type + // Convert all multi-byte numeric values to current platform's endianness or vice versa. + void ConvertEndianness(); + // Convert OpenMPT's internal sample representation to an ITSample. void ConvertToIT(const ModSample &mptSmp, MODTYPE fromType); // Convert an ITSample to OpenMPT's internal sample representation. @@ -301,6 +313,9 @@ #ifdef MODPLUG_TRACKER + // Convert all multi-byte numeric values to current platform's endianness or vice versa. + void ConvertEndianness(); + // Convert an ITHistoryStruct to OpenMPT's internal edit history representation void ConvertToMPT(FileHistory &mptHistory) const; // Convert OpenMPT's internal edit history representation to an ITHistoryStruct Modified: trunk/OpenMPT/soundlib/LOAD_AMF.CPP =================================================================== --- trunk/OpenMPT/soundlib/LOAD_AMF.CPP 2012-11-05 15:09:20 UTC (rev 1418) +++ trunk/OpenMPT/soundlib/LOAD_AMF.CPP 2012-11-05 23:24:41 UTC (rev 1419) @@ -430,7 +430,7 @@ // Setup Order List Order.resize(fileHeader.numOrders); vector<ROWINDEX> patternLength(fileHeader.numOrders, 64); - const size_t trackStartPos = file.GetPosition() + (fileHeader.version >= 14 ? 2 : 0); + const FileReader::off_t trackStartPos = file.GetPosition() + (fileHeader.version >= 14 ? 2 : 0); for(ORDERINDEX ord = 0; ord < fileHeader.numOrders; ord++) { Modified: trunk/OpenMPT/soundlib/Load_it.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_it.cpp 2012-11-05 15:09:20 UTC (rev 1418) +++ trunk/OpenMPT/soundlib/Load_it.cpp 2012-11-05 23:24:41 UTC (rev 1419) @@ -234,112 +234,107 @@ } -size_t CSoundFile::ITInstrToMPT(const void *p, ModInstrument *pIns, UINT trkvers, size_t memLength) -//------------------------------------------------------------------------------------------------- +size_t CSoundFile::ITInstrToMPT(FileReader &file, ModInstrument &ins, uint16 trkvers) +//----------------------------------------------------------------------------------- { if(trkvers < 0x0200) { // Load old format (IT 1.xx) instrument - const ITOldInstrument *itIns = reinterpret_cast<const ITOldInstrument *>(p); - itIns->ConvertToMPT(*pIns); - return sizeof(ITOldInstrument); - } else - { - size_t instSize = 0; - if(memLength >= sizeof(ITInstrumentEx)) + ITOldInstrument instrumentHeader; + if(!file.ReadConvertEndianness(instrumentHeader)) { - // Try loading extended instrument - const ITInstrumentEx *itIns = reinterpret_cast<const ITInstrumentEx *>(p); - instSize = itIns->ConvertToMPT(*pIns, GetType()); + return 0; } else { - // Load normal instrument - const ITInstrument *itIns = reinterpret_cast<const ITInstrument *>(p); - instSize = itIns->ConvertToMPT(*pIns, GetType()); + instrumentHeader.ConvertToMPT(ins); + return sizeof(ITOldInstrument); } + } else + { + const FileReader::off_t offset = file.GetPosition(); + // Try loading extended instrument... instSize will differ between normal and extended instruments. + ITInstrumentEx instrumentHeader; + file.ReadStructPartial(instrumentHeader); + instrumentHeader.ConvertEndianness(); + size_t instSize = instrumentHeader.ConvertToMPT(ins, GetType()); + file.Seek(offset + instSize); + // Try reading modular instrument data - instSize += LoadModularInstrumentData(LPCBYTE(p) + instSize, memLength - instSize, pIns); + instSize += LoadModularInstrumentData(file, ins); return instSize; } } -void CopyPatternName(CPattern &pattern, const char **patNames, UINT &patNamesLen) -//------------------------------------------------------------------------------- +void CopyPatternName(CPattern &pattern, FileReader &file) +//------------------------------------------------------- { - if(*patNames != nullptr && patNamesLen > 0) - { - pattern.SetName(*patNames, min(MAX_PATTERNNAME, patNamesLen)); - *patNames += MAX_PATTERNNAME; - patNamesLen -= min(MAX_PATTERNNAME, patNamesLen); - } + char name[MAX_PATTERNNAME] = ""; + file.ReadString<StringFixer::maybeNullTerminated>(name, MAX_PATTERNNAME); + pattern.SetName(name); } -bool CSoundFile::ReadIT(const LPCBYTE lpStream, const DWORD dwMemLength) -//---------------------------------------------------------------------- +bool CSoundFile::ReadIT(FileReader &file) +//--------------------------------------- { - if(!lpStream || dwMemLength < sizeof(ITFileHeader)) return false; + file.Rewind(); - ITFileHeader itHeader = *reinterpret_cast<const ITFileHeader *>(lpStream); - itHeader.ConvertEndianness(); + ITFileHeader fileHeader; + if(!file.ReadConvertEndianness(fileHeader) + || (fileHeader.id != ITFileHeader::itMagic && fileHeader.id != ITFileHeader::mptmMagic) + || fileHeader.insnum > 0xFF + || fileHeader.smpnum >= MAX_SAMPLES + || !file.CanRead(fileHeader.ordnum + (fileHeader.insnum + fileHeader.smpnum + fileHeader.patnum) * 4)) + { + return false; + } - DWORD dwMemPos = sizeof(ITFileHeader); - vector<DWORD> inspos; - vector<DWORD> smppos; - vector<DWORD> patpos; - bool interpretModPlugMade = false; - bool hasModPlugExtensions = false; - if((itHeader.id != ITFileHeader::itMagic && itHeader.id != ITFileHeader::mptmMagic) || itHeader.insnum > 0xFF - || itHeader.smpnum >= MAX_SAMPLES) return false; - // Check if we can actually read all parapointers - if(dwMemPos + itHeader.ordnum + itHeader.insnum * 4 - + itHeader.smpnum * 4 + itHeader.patnum * 4 > dwMemLength) return false; + // OpenMPT crap at the end of file + file.Seek(file.GetLength() - 4); + size_t mptStartPos = file.ReadUint32LE(); + if(mptStartPos >= file.GetLength() || mptStartPos < 0x100) + { + mptStartPos = file.GetLength(); + } - DWORD mptStartPos = dwMemLength; - memcpy(&mptStartPos, lpStream + (dwMemLength - sizeof(DWORD)), sizeof(DWORD)); - if(mptStartPos >= dwMemLength || mptStartPos < 0x100) - mptStartPos = dwMemLength; - - if(itHeader.id == ITFileHeader::mptmMagic) + if(fileHeader.id == ITFileHeader::mptmMagic) { ChangeModTypeTo(MOD_TYPE_MPT); - } - else + } else { - if(mptStartPos <= dwMemLength - 3 && itHeader.cwtv > 0x888) + if(mptStartPos <= file.GetLength() - 3 && fileHeader.cwtv > 0x888) { - char temp[3]; - const char ID[3] = {'2','2','8'}; - memcpy(temp, lpStream + mptStartPos, 3); - if(!memcmp(temp, ID, 3)) ChangeModTypeTo(MOD_TYPE_MPT); - else ChangeModTypeTo(MOD_TYPE_IT); + file.Seek(mptStartPos); + ChangeModTypeTo(file.ReadMagic("228") ? MOD_TYPE_MPT : MOD_TYPE_IT); + } else + { + ChangeModTypeTo(MOD_TYPE_IT); } - else ChangeModTypeTo(MOD_TYPE_IT); if(GetType() == MOD_TYPE_IT) { // Which tracker was used to made this? - if((itHeader.cwtv & 0xF000) == 0x5000) + if((fileHeader.cwtv & 0xF000) == 0x5000) { // OpenMPT Version number (Major.Minor) // This will only be interpreted as "made with ModPlug" (i.e. disable compatible playback etc) if the "reserved" field is set to "OMPT" - else, compatibility was used. - m_dwLastSavedWithVersion = (itHeader.cwtv & 0x0FFF) << 16; - if(itHeader.reserved == ITFileHeader::omptMagic) + m_dwLastSavedWithVersion = (fileHeader.cwtv & 0x0FFF) << 16; + if(fileHeader.reserved == ITFileHeader::omptMagic) interpretModPlugMade = true; - } else if(itHeader.cmwt == 0x888 || itHeader.cwtv == 0x888) + } else if(fileHeader.cmwt == 0x888 || fileHeader.cwtv == 0x888) { // OpenMPT 1.17 and 1.18 (raped IT format) // Exact version number will be determined later. interpretModPlugMade = true; m_dwLastSavedWithVersion = MAKE_VERSION_NUMERIC(1, 17, 00, 00); - } else if(itHeader.cwtv == 0x0217 && itHeader.cmwt == 0x0200 && itHeader.reserved == 0) + } else if(fileHeader.cwtv == 0x0217 && fileHeader.cmwt == 0x0200 && fileHeader.reserved == 0) { - if(memchr(itHeader.chnpan, 0xFF, sizeof(itHeader.chnpan)) != NULL) + if(memchr(fileHeader.chnpan, 0xFF, sizeof(fileHeader.chnpan)) != NULL) { // ModPlug Tracker 1.16 (semi-raped IT format) m_dwLastSavedWithVersion = MAKE_VERSION_NUMERIC(1, 16, 00, 00); @@ -350,206 +345,163 @@ m_dwLastSavedWithVersion = MAKE_VERSION_NUMERIC(1, 17, 00, 00); } interpretModPlugMade = true; - } else if(itHeader.cwtv == 0x0214 && itHeader.cmwt == 0x0202 && itHeader.reserved == 0) + } else if(fileHeader.cwtv == 0x0214 && fileHeader.cmwt == 0x0202 && fileHeader.reserved == 0) { // ModPlug Tracker b3.3 - 1.09, instruments 557 bytes apart m_dwLastSavedWithVersion = MAKE_VERSION_NUMERIC(1, 09, 00, 00); interpretModPlugMade = true; } - else if(itHeader.cwtv == 0x0214 && itHeader.cmwt == 0x0200 && itHeader.reserved == 0) + else if(fileHeader.cwtv == 0x0214 && fileHeader.cmwt == 0x0200 && fileHeader.reserved == 0) { // ModPlug Tracker 1.00a5, instruments 560 bytes apart m_dwLastSavedWithVersion = MAKE_VERSION_NUMERIC(1, 00, 00, A5); interpretModPlugMade = true; } - } - else // case: type == MOD_TYPE_MPT + } else // case: type == MOD_TYPE_MPT { - if (itHeader.cwtv >= verMptFileVerLoadLimit) + if (fileHeader.cwtv >= verMptFileVerLoadLimit) { - if (GetpModDoc()) + if(GetpModDoc()) GetpModDoc()->AddToLog(str_LoadingIncompatibleVersion); return false; } - else if (itHeader.cwtv > verMptFileVer) + else if (fileHeader.cwtv > verMptFileVer) { - if (GetpModDoc()) + if(GetpModDoc()) GetpModDoc()->AddToLog(str_LoadingMoreRecentVersion); } } } - if(GetType() == MOD_TYPE_IT) mptStartPos = dwMemLength; + if(GetType() == MOD_TYPE_IT) mptStartPos = file.GetLength(); // Read row highlights - if((itHeader.special & ITFileHeader::embedPatternHighlights)) + if((fileHeader.special & ITFileHeader::embedPatternHighlights)) { // MPT 1.09, 1.07 and most likely other old MPT versions leave this blank (0/0), but have the "special" flag set. // Newer versions of MPT and OpenMPT 1.17 *always* write 4/16 here. // Thus, we will just ignore those old versions. if(m_dwLastSavedWithVersion == 0 || m_dwLastSavedWithVersion >= MAKE_VERSION_NUMERIC(1, 17, 03, 02)) { - m_nDefaultRowsPerBeat = itHeader.highlight_minor; - m_nDefaultRowsPerMeasure = itHeader.highlight_major; + m_nDefaultRowsPerBeat = fileHeader.highlight_minor; + m_nDefaultRowsPerMeasure = fileHeader.highlight_major; } -#ifdef DEBUG - if((itHeader.highlight_minor | itHeader.highlight_major) == 0) +#ifdef _DEBUG + if((fileHeader.highlight_minor | fileHeader.highlight_major) == 0) { Log("IT Header: Row highlight is 0"); } #endif } - m_SongFlags.set(SONG_LINEARSLIDES, (itHeader.flags & ITFileHeader::linearSlides) != 0); - m_SongFlags.set(SONG_ITOLDEFFECTS, (itHeader.flags & ITFileHeader::itOldEffects) != 0); - m_SongFlags.set(SONG_ITCOMPATGXX, (itHeader.flags & ITFileHeader::itCompatGxx) != 0); - m_SongFlags.set(SONG_EMBEDMIDICFG, (itHeader.flags & ITFileHeader::reqEmbeddedMIDIConfig) || (itHeader.special & ITFileHeader::embedMIDIConfiguration)); - m_SongFlags.set(SONG_EXFILTERRANGE, (itHeader.flags & ITFileHeader::extendedFilterRange) != 0); + m_SongFlags.set(SONG_LINEARSLIDES, (fileHeader.flags & ITFileHeader::linearSlides) != 0); + m_SongFlags.set(SONG_ITOLDEFFECTS, (fileHeader.flags & ITFileHeader::itOldEffects) != 0); + m_SongFlags.set(SONG_ITCOMPATGXX, (fileHeader.flags & ITFileHeader::itCompatGxx) != 0); + m_SongFlags.set(SONG_EMBEDMIDICFG, (fileHeader.flags & ITFileHeader::reqEmbeddedMIDIConfig) || (fileHeader.special & ITFileHeader::embedMIDIConfiguration)); + m_SongFlags.set(SONG_EXFILTERRANGE, (fileHeader.flags & ITFileHeader::extendedFilterRange) != 0); - StringFixer::ReadString<StringFixer::spacePadded>(m_szNames[0], itHeader.songname); + StringFixer::ReadString<StringFixer::spacePadded>(m_szNames[0], fileHeader.songname); // Global Volume - m_nDefaultGlobalVolume = itHeader.globalvol << 1; - if (m_nDefaultGlobalVolume > MAX_GLOBAL_VOLUME) m_nDefaultGlobalVolume = MAX_GLOBAL_VOLUME; - if (itHeader.speed) m_nDefaultSpeed = itHeader.speed; - m_nDefaultTempo = max(32, itHeader.tempo); // tempo 31 is possible. due to conflicts with the rest of the engine, let's just clamp it to 32. - m_nSamplePreAmp = min(itHeader.mv, 128); + m_nDefaultGlobalVolume = fileHeader.globalvol << 1; + if(m_nDefaultGlobalVolume > MAX_GLOBAL_VOLUME) m_nDefaultGlobalVolume = MAX_GLOBAL_VOLUME; + if(fileHeader.speed) m_nDefaultSpeed = fileHeader.speed; + m_nDefaultTempo = Util::Max(uint8(32), fileHeader.tempo); // Tempo 31 is possible. due to conflicts with the rest of the engine, let's just clamp it to 32. + m_nSamplePreAmp = Util::Min(fileHeader.mv, uint8(128)); // Reading Channels Pan Positions - for (int ipan=0; ipan< 64; ipan++) if (itHeader.chnpan[ipan] != 0xFF) + for(CHANNELINDEX i = 0; i < 64; i++) if(fileHeader.chnpan[i] != 0xFF) { - ChnSettings[ipan].nVolume = itHeader.chnvol[ipan]; - ChnSettings[ipan].nPan = 128; - ChnSettings[ipan].dwFlags.reset(); - if(itHeader.chnpan[ipan] & 0x80) ChnSettings[ipan].dwFlags.set(CHN_MUTE); - UINT n = itHeader.chnpan[ipan] & 0x7F; - if (n <= 64) ChnSettings[ipan].nPan = n << 2; - if (n == 100) ChnSettings[ipan].dwFlags.set(CHN_SURROUND); + ChnSettings[i].nVolume = fileHeader.chnvol[i]; + ChnSettings[i].nPan = 128; + ChnSettings[i].dwFlags.reset(); + if(fileHeader.chnpan[i] & 0x80) ChnSettings[i].dwFlags.set(CHN_MUTE); + uint8 n = fileHeader.chnpan[i] & 0x7F; + if(n <= 64) ChnSettings[i].nPan = n * 4; + if(n == 100) ChnSettings[i].dwFlags.set(CHN_SURROUND); } - if (m_nChannels < GetModSpecifications().channelsMin) m_nChannels = GetModSpecifications().channelsMin; // Reading orders - UINT nordsize = itHeader.ordnum; + file.Seek(sizeof(ITFileHeader)); if(GetType() == MOD_TYPE_IT) { - if(nordsize > MAX_ORDERS) nordsize = MAX_ORDERS; - Order.ReadAsByte(lpStream + dwMemPos, nordsize, dwMemLength-dwMemPos); - dwMemPos += itHeader.ordnum; - } - else + Order.ReadAsByte(file, fileHeader.ordnum); + } else { - if(nordsize > GetModSpecifications().ordersMax) + ORDERINDEX ordSize = fileHeader.ordnum; + if(fileHeader.ordnum > GetModSpecifications().ordersMax) { #ifdef MODPLUG_TRACKER CString str; - str.Format(str_SequenceTruncationNote, nordsize, GetModSpecifications().ordersMax); + str.Format(str_SequenceTruncationNote, fileHeader.ordnum, GetModSpecifications().ordersMax); if(GetpModDoc() != nullptr) GetpModDoc()->AddToLog(str); #endif // MODPLUG_TRACKER - nordsize = GetModSpecifications().ordersMax; + ordSize = GetModSpecifications().ordersMax; } - if(itHeader.cwtv > 0x88A && itHeader.cwtv <= 0x88D) - dwMemPos += Order.Deserialize(lpStream+dwMemPos, dwMemLength-dwMemPos); - else + if(fileHeader.cwtv > 0x88A && fileHeader.cwtv <= 0x88D) { - Order.ReadAsByte(lpStream + dwMemPos, nordsize, dwMemLength - dwMemPos); - dwMemPos += itHeader.ordnum; - //Replacing 0xFF and 0xFE with new corresponding indexes + Order.Deserialize(file); + } else + { + Order.ReadAsByte(file, fileHeader.ordnum); + // Replacing 0xFF and 0xFE with new corresponding indexes Order.Replace(0xFE, Order.GetIgnoreIndex()); Order.Replace(0xFF, Order.GetInvalidPatIndex()); } } + // Reading instrument, sample and pattern offsets + vector<uint32> insPos, smpPos, patPos; + file.ReadVector(insPos, fileHeader.insnum); + file.ReadVector(smpPos, fileHeader.smpnum); + file.ReadVector(patPos, fileHeader.patnum); + // Find the first parapointer. // This is used for finding out whether the edit history is actually stored in the file or not, // as some early versions of Schism Tracker set the history flag, but didn't save anything. // We will consider the history invalid if it ends after the first parapointer. - DWORD minptr = dwMemLength; - - // Reading Instrument Offsets - inspos.resize(itHeader.insnum); - for(size_t n = 0; n < itHeader.insnum; n++) + uint32 minPtr = Util::MaxValueOfType(minPtr); + for(uint16 n = 0; n < fileHeader.insnum; n++) { - if(4 > dwMemLength - dwMemPos) - return false; - DWORD insptr = LittleEndian(*(DWORD *)(lpStream + dwMemPos)); - inspos[n] = insptr; - if(insptr > 0) + if(insPos[n] > 0) { - minptr = min(minptr, insptr); + minPtr = Util::Min(minPtr, insPos[n]); } - dwMemPos += 4; } - // Reading Sample Offsets - smppos.resize(itHeader.smpnum); - for(size_t n = 0; n < itHeader.smpnum; n++) + for(uint16 n = 0; n < fileHeader.smpnum; n++) { - if(4 > dwMemLength - dwMemPos) - return false; - DWORD smpptr = LittleEndian(*(DWORD *)(lpStream + dwMemPos)); - smppos[n] = smpptr; - if(smpptr > 0) + if(smpPos[n] > 0) { - minptr = min(minptr, smpptr); + minPtr = Util::Min(minPtr, smpPos[n]); } - dwMemPos += 4; } - // Reading Pattern Offsets - patpos.resize(itHeader.patnum); - for(size_t n = 0; n < itHeader.patnum; n++) + for(uint16 n = 0; n < fileHeader.patnum; n++) { - if(4 > dwMemLength - dwMemPos) - return false; - DWORD patptr = LittleEndian(*(DWORD *)(lpStream + dwMemPos)); - patpos[n] = patptr; - if(patptr > 0) + if(patPos[n] > 0) { - minptr = min(minptr, patptr); + minPtr = Util::Min(minPtr, patPos[n]); } - dwMemPos += 4; } - // Reading Patterns Offsets - if(patpos.size() > GetModSpecifications().patternsMax) + if(fileHeader.special & ITFileHeader::embedSongMessage) { - // Hack: Note user here if file contains more patterns than what can be read. -#ifdef MODPLUG_TRACKER - if(GetpModDoc() != nullptr) - { - CString str; - str.Format(str_PatternSetTruncationNote, patpos.size(), GetModSpecifications().patternsMax); - GetpModDoc()->AddToLog(str); - } -#endif // MODPLUG_TRACKER + minPtr = Util::Min(minPtr, fileHeader.msgoffset); } - // Reading Song Message - if(itHeader.special & ITFileHeader::embedSongMessage) - { - if(itHeader.msglength > 0 && itHeader.msglength <= dwMemLength && itHeader.msgoffset < (dwMemLength - itHeader.msglength)) - { - // Generally, IT files should use CR for line endings. However, ChibiTracker uses LF. One could do... - // if(itHeader.cwtv == 0x0214 && itHeader.cmwt == 0x0214 && itHeader.reserved == ITFileHeader::chibiMagic) --> Chibi detected. - // But we'll just use autodetection here: - ReadMessage(lpStream + itHeader.msgoffset, itHeader.msglength, leAutodetect); - } - minptr = min(minptr, itHeader.msgoffset); - } - // Reading IT Edit History Info // This is only supposed to be present if bit 1 of the special flags is set. // However, old versions of Schism and probably other trackers always set this bit // even if they don't write the edit history count. So we have to filter this out... // This is done by looking at the parapointers. If the history data end after // the first parapointer, we assume that it's actually no history data. - if(dwMemPos + 2 < dwMemLength && (itHeader.special & ITFileHeader::embedEditHistory)) + if(fileHeader.special & ITFileHeader::embedEditHistory) { - const size_t nflt = LittleEndianW(*((uint16*)(lpStream + dwMemPos))); - dwMemPos += 2; + const uint16 nflt = file.ReadUint16LE(); - if(nflt * sizeof(ITHistoryStruct) <= dwMemLength - dwMemPos && dwMemPos + nflt * 8 <= minptr) + if(file.CanRead(nflt * sizeof(ITHistoryStruct)) && file.GetPosition() + nflt * sizeof(ITHistoryStruct) <= minPtr) { #ifdef MODPLUG_TRACKER if(GetpModDoc() != nullptr) @@ -558,46 +510,40 @@ for(size_t n = 0; n < nflt; n++) { FileHistory mptHistory; - const ITHistoryStruct *itHistory = reinterpret_cast<const ITHistoryStruct *>(lpStream + dwMemPos); - itHistory->ConvertToMPT(mptHistory); + ITHistoryStruct itHistory; + file.Read(itHistory); + itHistory.ConvertToMPT(mptHistory); GetpModDoc()->GetFileHistory().push_back(mptHistory); - - dwMemPos += sizeof(ITHistoryStruct); } } else #endif // MODPLUG_TRACKER { - dwMemPos += nflt * sizeof(ITHistoryStruct); + file.Skip(nflt * sizeof(ITHistoryStruct)); } } else { // Oops, we were not supposed to read this. - dwMemPos -= 2; + file.SkipBack(2); } - } - // Another non-conforming application is unmo3 < v2.4.0.1, which doesn't set the special bit - // at all, but still writes the two edit history length bytes (zeroes)... - else if(dwMemPos + 2 < dwMemLength && itHeader.highlight_major == 0 && itHeader.highlight_minor == 0 && itHeader.cmwt == 0x0214 && itHeader.cwtv == 0x0214 && itHeader.reserved == 0 && (itHeader.special & (ITFileHeader::embedEditHistory | ITFileHeader::embedPatternHighlights)) == 0) + } else if(fileHeader.highlight_major == 0 && fileHeader.highlight_minor == 0 && fileHeader.cmwt == 0x0214 && fileHeader.cwtv == 0x0214 && fileHeader.reserved == 0 && (fileHeader.special & (ITFileHeader::embedEditHistory | ITFileHeader::embedPatternHighlights)) == 0) { - const size_t nflt = LittleEndianW(*((uint16*)(lpStream + dwMemPos))); - if(nflt == 0) + // Another non-conforming application is unmo3 < v2.4.0.1, which doesn't set the special bit + // at all, but still writes the two edit history length bytes (zeroes)... + if(file.ReadUint16LE() != 0) { - dwMemPos += 2; + // These were not zero bytes -> We're in the wrong place! + file.SkipBack(2); } } // Reading MIDI Output & Macros - if (m_SongFlags[SONG_EMBEDMIDICFG]) + if(m_SongFlags[SONG_EMBEDMIDICFG] && file.Read(m_MidiCfg)) { - if (dwMemPos + sizeof(MIDIMacroConfig) < dwMemLength) - { - memcpy(&m_MidiCfg, lpStream + dwMemPos, sizeof(MIDIMacroConfig)); m_MidiCfg.Sanitize(); - dwMemPos += sizeof(MIDIMacroConfig); - } } + // Ignore MIDI data. Fixes some files like denonde.it that were made with old versions of Impulse Tracker (which didn't support Zxx filters) and have Zxx effects in the patterns. - if (itHeader.cwtv < 0x0214) + if(fileHeader.cwtv < 0x0214) { MemsetZero(m_MidiCfg.szMidiSFXExt); MemsetZero(m_MidiCfg.szMidiZXXExt); @@ -605,333 +551,331 @@ } // Read pattern names: "PNAM" - const char *patNames = nullptr; - UINT patNamesLen = 0; - if ((dwMemPos + 8 < dwMemLength) && (*((DWORD *)(lpStream+dwMemPos)) == LittleEndian(magicPatternNames))) + FileReader patNames; + if(file.ReadMagic("PNAM")) { - patNamesLen = *((DWORD *)(lpStream + dwMemPos + 4)); - dwMemPos += 8; - if ((dwMemPos + patNamesLen <= dwMemLength) && (patNamesLen > 0)) - { - patNames = (char *)(lpStream + dwMemPos); - dwMemPos += patNamesLen; - } + patNames = file.GetChunk(file.ReadUint32LE()); } m_nChannels = GetModSpecifications().channelsMin; // Read channel names: "CNAM" - if ((dwMemPos + 8 < dwMemLength) && (*((DWORD *)(lpStream+dwMemPos)) == LittleEndian(magicChannelNames))) + if(file.ReadMagic("CNAM")) { - UINT len = *((DWORD *)(lpStream + dwMemPos + 4)); - dwMemPos += 8; - if ((dwMemPos + len <= dwMemLength) && (len <= MAX_BASECHANNELS * MAX_CHANNELNAME)) + FileReader chnNames = file.GetChunk(file.ReadUint32LE()); + const CHANNELINDEX readChns = Util::Min(MAX_BASECHANNELS, static_cast<CHANNELINDEX>(chnNames.GetLength() / MAX_CHANNELNAME)); + m_nChannels = readChns; + + for(CHANNELINDEX i = 0; i < readChns; i++) { - UINT n = len / MAX_CHANNELNAME; - if (n > m_nChannels) m_nChannels = n; - for (UINT i=0; i<n; i++) - { - memcpy(ChnSettings[i].szName, (lpStream + dwMemPos + i * MAX_CHANNELNAME), MAX_CHANNELNAME); - ChnSettings[i].szName[MAX_CHANNELNAME - 1] = 0; - } - dwMemPos += len; + chnNames.ReadString<StringFixer::maybeNullTerminated>(ChnSettings[i].szName, MAX_CHANNELNAME); } } + // Read mix plugins information - if (dwMemPos + 8 < dwMemLength) + if(file.BytesLeft() > 8) { - dwMemPos += LoadMixPlugins(lpStream+dwMemPos, dwMemLength-dwMemPos); + file.Skip(LoadMixPlugins(file.GetRawData(), file.BytesLeft())); } - //UINT npatterns = pifh->patnum; - UINT npatterns = patpos.size(); - - if (npatterns > GetModSpecifications().patternsMax) - npatterns = GetModSpecifications().patternsMax; - - // Checking for unused channels - for (UINT patchk=0; patchk<npatterns; patchk++) + // Read Song Message + if(fileHeader.special & ITFileHeader::embedSongMessage) { - if ((!patpos[patchk]) || ((DWORD)patpos[patchk] >= dwMemLength - 4)) - continue; - - UINT len = *((WORD *)(lpStream+patpos[patchk])); - UINT rows = *((WORD *)(lpStream+patpos[patchk]+2)); - - if(rows <= ModSpecs::itEx.patternRowsMax && rows > ModSpecs::it.patternRowsMax) + if(fileHeader.msglength > 0 && file.Seek(fileHeader.msgoffset)) { - //interpretModPlugMade = true; // Chibi also does this. - hasModPlugExtensions = true; + // Generally, IT files should use CR for line endings. However, ChibiTracker uses LF. One could do... + // if(itHeader.cwtv == 0x0214 && itHeader.cmwt == 0x0214 && itHeader.reserved == ITFileHeader::chibiMagic) --> Chibi detected. + // But we'll just use autodetection here: + ReadMessage(file, fileHeader.msglength, leAutodetect); } - - if ((rows < GetModSpecifications().patternRowsMin) || (rows > GetModSpecifications().patternRowsMax)) - continue; - - if (patpos[patchk]+8+len > dwMemLength) - continue; - - UINT i = 0; - const BYTE *p = lpStream+patpos[patchk]+8; - UINT nrow = 0; - - vector<BYTE> chnmask; - - while (nrow<rows) - { - if (i >= len) break; - BYTE b = p[i++]; // p is the bytestream offset at current pattern_position - if (!b) - { - nrow++; - continue; - } - - UINT ch = b & IT_bitmask_patternChanField_c; // 0x7f We have some data grab a byte keeping only 7 bits - if (ch) - ch = (ch - 1);// & IT_bitmask_patternChanMask_c; // 0x3f mask of the byte again, keeping only 6 bits - - if(ch >= chnmask.size()) - { - chnmask.resize(ch + 1, 0); - } - - if (b & IT_bitmask_patternChanEnabled_c) // 0x80 check if the upper bit is enabled. - { - if (i >= len) - break; - chnmask[ch] = p[i++]; // set the channel mask for this channel. - } - // Channel used - if (chnmask[ch] & 0x0F) // if this channel is used set m_nChannels - { -// -> CODE#0006 -// -> DESC="misc quantity changes" -// if ((ch >= m_nChannels) && (ch < 64)) m_nChannels = ch+1; - if ((ch >= m_nChannels) && (ch < MAX_BASECHANNELS)) m_nChannels = ch+1; -// -! BEHAVIOUR_CHANGE#0006 - } - // Now we actually update the pattern-row entry the note,instrument etc. - // Note - if (chnmask[ch] & 1) i++; - // Instrument - if (chnmask[ch] & 2) i++; - // Volume - if (chnmask[ch] & 4) i++; - // Effect - if (chnmask[ch] & 8) i += 2; - if (i >= len) break; - } } - // Reading Instruments m_nInstruments = 0; - if (itHeader.flags & ITFileHeader::instrumentMode) m_nInstruments = itHeader.insnum; - if (m_nInstruments >= MAX_INSTRUMENTS) m_nInstruments = MAX_INSTRUMENTS-1; - for (UINT nins=0; nins<m_nInstruments; nins++) + if(fileHeader.flags & ITFileHeader::instrumentMode) { - if ((inspos[nins] > 0) && (inspos[nins] <= dwMemLength - (itHeader.cmwt < 0x200 ? sizeof(ITOldInstrument) : sizeof(ITInstrument)))) + m_nInstruments = Util::Min(fileHeader.insnum, INSTRUMENTINDEX(MAX_INSTRUMENTS - 1)); + } + for(INSTRUMENTINDEX i = 0; i < GetNumInstruments(); i++) + { + if(insPos[i] > 0 && file.Seek(insPos[i]) && file.CanRead(fileHeader.cmwt < 0x200 ? sizeof(ITOldInstrument) : sizeof(ITInstrument))) { - ModInstrument *instrument = AllocateInstrument(nins + 1); + ModInstrument *instrument = AllocateInstrument(i + 1); if(instrument != nullptr) { - ITInstrToMPT(lpStream + inspos[nins], instrument, itHeader.cmwt, dwMemLength - inspos[nins]); - instrument->midiPWD = itHeader.pwd; + ITInstrToMPT(file, *instrument, fileHeader.cmwt); + // MIDI Pitch Wheel Depth is a global setting in IT. Apply it to all instruments. + instrument->midiPWD = fileHeader.pwd; } } } -// -> CODE#0027 -// -> DESC="per-instrument volume ramping setup (refered as attack)" // In order to properly compute the position, in file, of eventual extended settings // such as "attack" we need to keep the "real" size of the last sample as those extra // setting will follow this sample in the file - UINT lastSampleOffset = 0; - if(itHeader.smpnum > 0) + FileReader::off_t lastSampleOffset = 0; + if(fileHeader.smpnum > 0) { - lastSampleOffset = smppos[itHeader.smpnum - 1] + sizeof(ITSample); + lastSampleOffset = smpPos[fileHeader.smpnum - 1] + sizeof(ITSample); } -// -! NEW_FEATURE#0027 // Reading Samples - m_nSamples = min(itHeader.smpnum, MAX_SAMPLES - 1); - for (UINT nsmp = 0; nsmp < m_nSamples; nsmp++) if ((smppos[nsmp]) && (smppos[nsmp] <= dwMemLength - sizeof(ITSample))) + m_nSamples = Util::Min(fileHeader.smpnum, SAMPLEINDEX(MAX_SAMPLES - 1)); + for(SAMPLEINDEX i = 0; i < GetNumSamples(); i++) { - ITSample *pis = (ITSample *)(lpStream+smppos[nsmp]); - if(pis->id == LittleEndian(ITSample::magic)) + ITSample sampleHeader; + if(smpPos[i] > 0 && file.Seek(smpPos[i]) && file.ReadConvertEndianness(sampleHeader)) { - size_t sampleOffset = pis->ConvertToMPT(Samples[nsmp + 1]); + if(sample... [truncated message content] |
From: <sag...@us...> - 2012-11-14 23:42:19
|
Revision: 1425 http://modplug.svn.sourceforge.net/modplug/?rev=1425&view=rev Author: saga-games Date: 2012-11-14 23:42:12 +0000 (Wed, 14 Nov 2012) Log Message: ----------- [Imp] Added "Zoom into Selection" shortcut for sample editor (http://forum.openmpt.org/index.php?topic=4877.0). [Imp] Added "Zoom into Selection" to default keymap and DE_jojo.mkb, also added Quick Channel Settings shortcuts to the default keymap. Modified Paths: -------------- trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/CommandSet.h trunk/OpenMPT/mptrack/View_smp.cpp trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2012-11-11 23:19:24 UTC (rev 1424) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2012-11-14 23:42:12 UTC (rev 1425) @@ -634,6 +634,7 @@ DefineKeyCommand(kcChnSettingsNext, 1879, _T("Next Channel")); DefineKeyCommand(kcChnSettingsClose, 1880, _T("Switch to Pattern Editor")); DefineKeyCommand(kcTransposeCustom, 1881, _T("Transpose Custom")); + DefineKeyCommand(kcSampleZoomSelection, 1882, _T("Zoom into Selection")); // Add new key commands here. #ifdef _DEBUG Modified: trunk/OpenMPT/mptrack/CommandSet.h =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.h 2012-11-11 23:19:24 UTC (rev 1424) +++ trunk/OpenMPT/mptrack/CommandSet.h 2012-11-14 23:42:12 UTC (rev 1425) @@ -268,6 +268,8 @@ kcTransposeOctUp, kcTransposeOctDown, kcTransposeCustom, + kcDataEntryUp, + kcDataEntryDown, kcPatternAmplify, kcPatternInterpolateNote, kcPatternInterpolateVol, @@ -640,8 +642,9 @@ kcSampleAmplify, kcSampleReverse, kcSampleDelete, - kcSampleZoomUp, - kcSampleZoomDown, + kcSampleZoomUp, + kcSampleZoomDown, + kcSampleZoomSelection, kcSampleInvert, kcSampleSignUnsign, kcSampleRemoveDCOffset, Modified: trunk/OpenMPT/mptrack/View_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_smp.cpp 2012-11-11 23:19:24 UTC (rev 1424) +++ trunk/OpenMPT/mptrack/View_smp.cpp 2012-11-14 23:42:12 UTC (rev 1425) @@ -1490,7 +1490,7 @@ { if (m_dwEndSel >= m_dwBeginSel + 4) { - ::AppendMenu(hMenu, MF_STRING | (CanZoomSelection() ? 0 : MF_GRAYED), ID_SAMPLE_ZOOMONSEL, "Zoom"); + ::AppendMenu(hMenu, MF_STRING | (CanZoomSelection() ? 0 : MF_GRAYED), ID_SAMPLE_ZOOMONSEL, "Zoom\t" + ih->GetKeyTextFromCommand(kcSampleZoomSelection)); ::AppendMenu(hMenu, MF_STRING, ID_SAMPLE_SETLOOP, "Set As Loop"); if (pSndFile->GetType() & (MOD_TYPE_IT|MOD_TYPE_MPT)) ::AppendMenu(hMenu, MF_STRING, ID_SAMPLE_SETSUSTAINLOOP, "Set As Sustain Loop"); @@ -1503,10 +1503,10 @@ { //Set loop points wsprintf(s, "Set Loop Start to:\t%d", dwPos); - ::AppendMenu(hMenu, MF_STRING | (dwPos + 4 <= sample.nLoopEnd ? 0 : MF_GRAYED), + ::AppendMenu(hMenu, MF_STRING | (dwPos + 4 <= sample.nLoopEnd ? 0 : MF_GRAYED), ID_SAMPLE_SETLOOPSTART, s); wsprintf(s, "Set Loop End to:\t%d", dwPos); - ::AppendMenu(hMenu, MF_STRING | (dwPos >= sample.nLoopStart + 4 ? 0 : MF_GRAYED), + ::AppendMenu(hMenu, MF_STRING | (dwPos >= sample.nLoopStart + 4 ? 0 : MF_GRAYED), ID_SAMPLE_SETLOOPEND, s); if (pSndFile->GetType() & (MOD_TYPE_IT|MOD_TYPE_MPT)) @@ -1514,10 +1514,10 @@ //Set sustain loop points ::AppendMenu(hMenu, MF_SEPARATOR, 0, ""); wsprintf(s, "Set Sustain Start to:\t%d", dwPos); - ::AppendMenu(hMenu, MF_STRING | (dwPos + 4 <= sample.nSustainEnd ? 0 : MF_GRAYED), - ID_SAMPLE_SETSUSTAINSTART, s); + ::AppendMenu(hMenu, MF_STRING | (dwPos + 4 <= sample.nSustainEnd ? 0 : MF_GRAYED), + ID_SAMPLE_SETSUSTAINSTART, s); wsprintf(s, "Set Sustain End to:\t%d", dwPos); - ::AppendMenu(hMenu, MF_STRING | (dwPos >= sample.nSustainStart + 4 ? 0 : MF_GRAYED), + ::AppendMenu(hMenu, MF_STRING | (dwPos >= sample.nSustainStart + 4 ? 0 : MF_GRAYED), ID_SAMPLE_SETSUSTAINEND, s); } ::AppendMenu(hMenu, MF_SEPARATOR, 0, ""); @@ -2678,6 +2678,7 @@ case kcSampleTrim: OnSampleTrim() ; return wParam; case kcSampleZoomUp: OnZoomUp(); return wParam; case kcSampleZoomDown: OnZoomDown(); return wParam; + case kcSampleZoomSelection: OnZoomOnSel(); return wParam; case kcPrevInstrument: OnPrevInstrument(); return wParam; case kcNextInstrument: OnNextInstrument(); return wParam; case kcEditSelectAll: OnEditSelectAll(); return wParam; Modified: trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb =================================================================== --- trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb 2012-11-11 23:19:24 UTC (rev 1424) +++ trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb 2012-11-14 23:42:12 UTC (rev 1425) @@ -13,14 +13,14 @@ 0:1350:3:83:1 //File/Save As: Shift+Ctrl+S (KeyDown) 0:1693:0:166:1 //Previous Document: (KeyDown) 0:1694:0:167:1 //Next Document: (KeyDown) -0:1030:0:116:1 //Play song/Pause song: F5 (KeyDown) -0:1031:0:119:1 //Pause song: F8 (KeyDown) +0:1030:0:116:1 //Play Song / Pause song: F5 (KeyDown) +0:1031:0:119:1 //Pause Song: F8 (KeyDown) 0:1375:0:27:1 //Stop Song: ESC (KeyDown) -0:1029:0:117:1 //Play song from start: F6 (KeyDown) -0:1028:2:117:1 //Play song from cursor: Ctrl+F6 (KeyDown) +0:1029:0:117:1 //Play Song from Start: F6 (KeyDown) +0:1028:2:117:1 //Play Song from Cursor: Ctrl+F6 (KeyDown) 0:1027:0:118:1 //Play pattern from start: F7 (KeyDown) 0:1026:2:118:1 //Play pattern from cursor: Ctrl+F7 (KeyDown) -0:1376:0:120:1 //Toggle Midi Record: F9 (KeyDown) +0:1376:0:120:1 //Toggle MIDI Record: F9 (KeyDown) 0:1359:2:90:1 //Undo: Ctrl+Z (KeyDown) 0:1360:2:88:1 //Cut: Ctrl+X (KeyDown) 0:1361:2:67:1 //Copy: Ctrl+C (KeyDown) @@ -28,7 +28,7 @@ 0:1362:1:45:1 //Paste: Shift+INSERT (KeyDown) 0:1363:3:86:1 //Mix Paste: Shift+Ctrl+V (KeyDown) 0:1793:1:86:5 //Paste Flood: Shift+V (KeyDown|KeyHold) -0:1820:6:86:1 //Push Forward Paste: Ctrl+Alt+V (KeyDown) +0:1820:6:86:1 //Push Forward Paste (Insert): Ctrl+Alt+V (KeyDown) 0:1364:2:53:1 //Select All: Ctrl+5 (KeyDown) 0:1365:2:70:1 //Find / Replace: Ctrl+F (KeyDown) 0:1366:0:114:1 //Find Next: F3 (KeyDown) @@ -40,8 +40,8 @@ 0:1025:4:67:1 //View Comments: Alt+C (KeyDown) 0:1368:2:113:1 //Toggle Tree View: Ctrl+F2 (KeyDown) 0:1369:2:112:1 //View Options: Ctrl+F1 (KeyDown) -0:1781:2:114:1 //View MIDI mapping: Ctrl+F3 (KeyDown) -0:1370:0:112:1 //Help (to do): F1 (KeyDown) +0:1781:2:114:1 //View MIDI Mapping: Ctrl+F3 (KeyDown) +0:1370:0:112:1 //Help: F1 (KeyDown) 0:1032:2:111:5 //Previous instrument: Ctrl+NUM DIVIDE (KeyDown|KeyHold) 0:1032:2:38:5 //Previous instrument: Ctrl+UP (KeyDown|KeyHold) 0:1033:2:106:5 //Next instrument: Ctrl+NUMMULT (KeyDown|KeyHold) @@ -88,22 +88,22 @@ 2:1836:2:191:1 //Edit plugin assigned to PC note: Ctrl+/ (KeyDown) 2:1662:6:80:1 //Toggle channel's plugin editor: Ctrl+Alt+P (KeyDown) 2:1062:0:93:1 //Show note properties: Application (KeyDown) -2:1772:5:80:1 //Show pattern properties window: Shift+Alt+P (KeyDown) +2:1772:5:80:1 //Show Pattern Properties: Shift+Alt+P (KeyDown) 2:1819:2:69:1 //Split Keyboard Settings dialog: Ctrl+E (KeyDown) -2:1776:1:122:1 //Toggle loop pattern: Shift+F11 (KeyDown) +2:1776:1:122:1 //Toggle Loop Pattern: Shift+F11 (KeyDown) 2:1780:2:84:1 //Show playback time at current row: Ctrl+T (KeyDown) -2:1005:0:121:1 //Mute current channel: F10 (KeyDown) -2:1006:2:121:1 //Solo current channel: Ctrl+F10 (KeyDown) +2:1005:0:121:1 //Mute current Channel: F10 (KeyDown) +2:1006:2:121:1 //Solo current Channel: Ctrl+F10 (KeyDown) 2:1771:6:121:1 //Unmute all channels: Ctrl+Alt+F10 (KeyDown) -2:1786:2:82:1 //Reset channel: Ctrl+R (KeyDown) +2:1786:2:82:1 //Reset Channel: Ctrl+R (KeyDown) 2:1007:2:81:5 //Transpose +1: Ctrl+Q (KeyDown|KeyHold) 2:1008:2:65:5 //Transpose -1: Ctrl+A (KeyDown|KeyHold) 2:1009:3:81:5 //Transpose +12: Shift+Ctrl+Q (KeyDown|KeyHold) 2:1010:3:65:5 //Transpose -12: Shift+Ctrl+A (KeyDown|KeyHold) 2:1012:2:77:1 //Amplify selection: Ctrl+M (KeyDown) -2:1014:2:74:1 //Interpolate volume: Ctrl+J (KeyDown) -2:1015:2:75:1 //Interpolate effect: Ctrl+K (KeyDown) -2:1016:4:66:1 //Open effect visualizer: Alt+B (KeyDown) +2:1014:2:74:1 //Interpolate Volume: Ctrl+J (KeyDown) +2:1015:2:75:1 //Interpolate Effect: Ctrl+K (KeyDown) +2:1016:4:66:1 //Open Effect Visualizer: Alt+B (KeyDown) 2:1766:2:71:1 //Go to row/channel/...: Ctrl+G (KeyDown) 2:1013:2:73:1 //Apply current instrument: Ctrl+I (KeyDown) 2:1660:4:69:5 //Grow selection: Alt+E (KeyDown|KeyHold) @@ -224,20 +224,20 @@ 5:1230:0:104:1 //Set volume digit 8: NUM 8 (KeyDown) 5:1231:0:57:1 //Set volume digit 9: 9 (KeyDown) 5:1231:0:105:1 //Set volume digit 9: NUM 9 (KeyDown) -5:1232:0:86:1 //Vol command - volume: V (KeyDown) -5:1233:0:80:1 //Vol command - pan: P (KeyDown) -5:1234:0:67:1 //Vol command - vol slide up: C (KeyDown) -5:1235:0:68:1 //Vol command - vol slide down: D (KeyDown) -5:1236:0:65:1 //Vol command - vol fine slide up: A (KeyDown) -5:1237:0:66:1 //Vol command - vol fine slide down: B (KeyDown) -5:1238:0:85:1 //Vol command - vibrato speed: U (KeyDown) -5:1239:0:72:1 //Vol command - vibrato: H (KeyDown) -5:1240:0:76:1 //Vol command - XM pan left: L (KeyDown) -5:1241:0:82:1 //Vol command - XM pan right: R (KeyDown) -5:1242:0:71:1 //Vol command - Portamento: G (KeyDown) -5:1243:0:70:1 //Vol command - Portamento Up: F (KeyDown) -5:1244:0:69:1 //Vol command - Portamento Down: E (KeyDown) -5:1246:0:79:1 //Vol command - Offset: O (KeyDown) +5:1232:0:86:1 //Volume Command - Volume: V (KeyDown) +5:1233:0:80:1 //Volume Command - Panning: P (KeyDown) +5:1234:0:67:1 //Volume Command - Volume Slide Up: C (KeyDown) +5:1235:0:68:1 //Volume Command - Volume Slide Down: D (KeyDown) +5:1236:0:65:1 //Volume Command - Fine Volume Slide Up: A (KeyDown) +5:1237:0:66:1 //Volume Command - Fine Volume Slide Down: B (KeyDown) +5:1238:0:85:1 //Volume Command - Vibrato Speed: U (KeyDown) +5:1239:0:72:1 //Volume Command - Vibrato Depth: H (KeyDown) +5:1240:0:76:1 //Volume Command - XM Pan Slide Left: L (KeyDown) +5:1241:0:82:1 //Volume Command - XM Pan Slide Right: R (KeyDown) +5:1242:0:71:1 //Volume Command - Portamento: G (KeyDown) +5:1243:0:70:1 //Volume Command - Portamento Up: F (KeyDown) +5:1244:0:69:1 //Volume Command - Portamento Down: E (KeyDown) +5:1246:0:79:1 //Volume Command - Offset: O (KeyDown) //----( Pattern Context [bottom] - FX Col (6) )------------ 6:1294:0:220:1 //FX midi macro slide: \ (KeyDown) @@ -279,15 +279,16 @@ 8:1384:1:78:1 //Normalise Sample: Shift+N (KeyDown) 8:1385:3:65:1 //Amplify Sample: Shift+Ctrl+A (KeyDown) 8:1385:2:77:1 //Amplify Sample: Ctrl+M (KeyDown) -8:1381:3:82:1 //Reverse sample: Shift+Ctrl+R (KeyDown) +8:1381:3:82:1 //Reverse Sample: Shift+Ctrl+R (KeyDown) 8:1382:0:46:1 //Delete sample selection: DELETE (KeyDown) 8:1386:0:107:1 //Zoom Out: NUM PLUS (KeyDown) 8:1387:0:109:1 //Zoom In: NUM SUB (KeyDown) -8:1784:2:73:1 //Invert sample phase: Ctrl+I (KeyDown) -8:1785:2:85:1 //Signed/Unsigned conversion: Ctrl+U (KeyDown) +8:1882:0:32:1 //Zoom into Selection: Space (KeyDown) +8:1784:2:73:1 //Invert Sample Phase: Ctrl+I (KeyDown) +8:1785:2:85:1 //Signed / Unsigned Conversion: Ctrl+U (KeyDown) 8:1790:2:69:1 //Remove DC Offset: Ctrl+E (KeyDown) -8:1856:2:68:1 //Quick fade: Ctrl+D (KeyDown) -8:1857:2:76:1 //Crossfade sample loop: Ctrl+L (KeyDown) +8:1856:2:68:1 //Quick Fade: Ctrl+D (KeyDown) +8:1857:2:76:1 //Crossfade Sample Loop: Ctrl+L (KeyDown) //----( Instrument Context [bottom] (9) )------------ 9:1837:0:107:5 //Zoom In: NUM PLUS (KeyDown|KeyHold) @@ -332,16 +333,16 @@ //----( Sample Context [top] (16) )------------ //----( Instrument Context [top] (17) )------------ -17:1851:2:68:1 //Duplicate instrument: Ctrl+D (KeyDown) -17:1850:3:69:1 //Edit sample map: Shift+Ctrl+E (KeyDown) -17:1849:2:69:1 //Edit current sample: Ctrl+E (KeyDown) +17:1851:2:68:1 //Duplicate Instrument: Ctrl+D (KeyDown) +17:1850:3:69:1 //Edit Sample Map: Shift+Ctrl+E (KeyDown) +17:1849:2:69:1 //Edit Current Sample: Ctrl+E (KeyDown) 17:1846:3:77:1 //Map all notes to selected note: Shift+Ctrl+M (KeyDown) 17:1847:2:77:1 //Map all notes to selected sample: Ctrl+M (KeyDown) -17:1848:2:82:1 //Reset note mapping: Ctrl+R (KeyDown) -17:1843:2:81:1 //Transpose +1 (note map): Ctrl+Q (KeyDown) -17:1842:2:65:1 //Transpose -1 (note map): Ctrl+A (KeyDown) -17:1845:3:81:1 //Transpose +12 (note map): Shift+Ctrl+Q (KeyDown) -17:1844:3:65:1 //Transpose -12 (note map): Shift+Ctrl+A (KeyDown) +17:1848:2:82:1 //Reset Note Mapping: Ctrl+R (KeyDown) +17:1843:2:81:1 //Transpose +1 (Note Map): Ctrl+Q (KeyDown) +17:1842:2:65:1 //Transpose -1 (Note Map): Ctrl+A (KeyDown) +17:1845:3:81:1 //Transpose +12 (Note Map): Shift+Ctrl+Q (KeyDown) +17:1844:3:65:1 //Transpose -12 (Note Map): Shift+Ctrl+A (KeyDown) //----( Comments Context [top] (18) )------------ @@ -384,3 +385,10 @@ 19:1854:0:32:1 //Stop (---) Index: SPACE (KeyDown) 19:1875:2:76:1 //Lock Playback to Selection: Ctrl+L (KeyDown) 19:1876:2:85:1 //Unlock Playback: Ctrl+U (KeyDown) + +//----( Quick Channel Settings Context (20) )------------ +20:1878:1:37:5 //Previous Channel: Shift+Left (KeyDown|KeyHold) +20:1878:1:8:5 //Previous Channel: Shift+Backspace (KeyDown|KeyHold) +20:1879:1:39:5 //Next Channel: Shift+Right (KeyDown|KeyHold) +20:1879:1:13:5 //Next Channel: Shift+ENTER (KeyDown|KeyHold) +20:1880:0:13:1 //Switch to Pattern Editor: ENTER (KeyDown) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2012-11-11 23:19:24 UTC (rev 1424) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2012-11-14 23:42:12 UTC (rev 1425) @@ -286,6 +286,7 @@ 8:1382:0:46:1 //Delete Sample Selection: ENTF (KeyDown) 8:1386:0:107:1 //Zoom Out: + (ZEHNERTASTATUR) (KeyDown) 8:1387:0:109:1 //Zoom In: - (ZEHNERTASTATUR) (KeyDown) +8:1882:0:32:1 //Zoom into Selection: LEER (KeyDown) 8:1784:2:73:1 //Invert Sample Phase: Ctrl+I (KeyDown) 8:1785:2:85:1 //Signed / Unsigned Conversion: Ctrl+U (KeyDown) 8:1790:2:69:1 //Remove DC Offset: Ctrl+E (KeyDown) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-11-14 23:43:49
|
Revision: 1426 http://modplug.svn.sourceforge.net/modplug/?rev=1426&view=rev Author: saga-games Date: 2012-11-14 23:43:41 +0000 (Wed, 14 Nov 2012) Log Message: ----------- [Ref] Rewrote ULT loader to use FileReader class. [Mod] OpenMPT: Version is now 1.20.04.03 Modified Paths: -------------- trunk/OpenMPT/mptrack/version.h trunk/OpenMPT/soundlib/Load_ult.cpp trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/Sndfile.h Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2012-11-14 23:42:12 UTC (rev 1425) +++ trunk/OpenMPT/mptrack/version.h 2012-11-14 23:43:41 UTC (rev 1426) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 20 #define VER_MINOR 04 -#define VER_MINORMINOR 02 +#define VER_MINORMINOR 03 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of Modified: trunk/OpenMPT/soundlib/Load_ult.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_ult.cpp 2012-11-14 23:42:12 UTC (rev 1425) +++ trunk/OpenMPT/soundlib/Load_ult.cpp 2012-11-14 23:43:41 UTC (rev 1426) @@ -12,13 +12,6 @@ #include "stdafx.h" #include "Loaders.h" -enum -{ - ULT_16BIT = 4, - ULT_LOOP = 8, - ULT_PINGPONGLOOP = 16, -}; - #pragma pack(push, 1) struct UltFileHeader @@ -34,16 +27,72 @@ struct UltSample { + enum UltSampleFlags + { + ULT_16BIT = 4, + ULT_LOOP = 8, + ULT_PINGPONGLOOP = 16, + }; + char name[32]; char filename[12]; - uint32 loop_start; - uint32 loop_end; - uint32 size_start; - uint32 size_end; + uint32 loopStart; + uint32 loopEnd; + uint32 sizeStart; + uint32 sizeEnd; uint8 volume; // 0-255, apparently prior to 1.4 this was logarithmic? uint8 flags; // above uint16 speed; // only exists for 1.4+ int16 finetune; + + // Convert all multi-byte numeric values to current platform's endianness or vice versa. + void ConvertEndianness() + { + SwapBytesLE(loopStart); + SwapBytesLE(loopEnd); + SwapBytesLE(sizeStart); + SwapBytesLE(sizeEnd); + SwapBytesLE(speed); + SwapBytesLE(finetune); + } + + // Convert an ULT sample header to OpenMPT's internal sample header. + void ConvertToMPT(ModSample &mptSmp) const + { + mptSmp.Initialize(); + + StringFixer::ReadString<StringFixer::maybeNullTerminated>(mptSmp.filename, filename); + + if(sizeEnd <= sizeStart) + { + return; + } + + mptSmp.nLength = sizeEnd - sizeStart; + mptSmp.nLoopStart = loopStart; + mptSmp.nLoopEnd = Util::Min(static_cast<SmpLength>(loopEnd), mptSmp.nLength); + mptSmp.nVolume = volume; + mptSmp.nGlobalVol = 64; + + // mikmod does some weird integer math here, but it didn't really work for me + mptSmp.nC5Speed = speed; + if(finetune) + { + mptSmp.nC5Speed = static_cast<uint32>((static_cast<double>(mptSmp.nC5Speed)) * pow(2.0, ((static_cast<double>(finetune)) / (12.0 * 32768)))); + } + + if(flags & ULT_LOOP) + mptSmp.uFlags.set(CHN_LOOP); + if(flags & ULT_PINGPONGLOOP) + mptSmp.uFlags.set(CHN_PINGPONGLOOP); + if(flags & ULT_16BIT) + { + mptSmp.uFlags.set(CHN_16BIT); + mptSmp.nLoopStart /= 2; + mptSmp.nLoopEnd /= 2; + } + + } }; STATIC_ASSERT(sizeof(UltSample) == 66); @@ -61,38 +110,41 @@ much anywhere for that matter. I don't even think Ultra Tracker tries to convert them. */ -static const uint8 ult_efftrans[] = -{ - CMD_ARPEGGIO, - CMD_PORTAMENTOUP, - CMD_PORTAMENTODOWN, - CMD_TONEPORTAMENTO, - CMD_VIBRATO, - CMD_NONE, - CMD_NONE, - CMD_TREMOLO, - CMD_NONE, - CMD_OFFSET, - CMD_VOLUMESLIDE, - CMD_PANNING8, - CMD_VOLUME, - CMD_PATTERNBREAK, - CMD_NONE, // extended effects, processed separately - CMD_SPEED, -}; static void TranslateULTCommands(uint8 *pe, uint8 *pp) //---------------------------------------------------- { + + static const uint8 ultEffTrans[] = + { + CMD_ARPEGGIO, + CMD_PORTAMENTOUP, + CMD_PORTAMENTODOWN, + CMD_TONEPORTAMENTO, + CMD_VIBRATO, + CMD_NONE, + CMD_NONE, + CMD_TREMOLO, + CMD_NONE, + CMD_OFFSET, + CMD_VOLUMESLIDE, + CMD_PANNING8, + CMD_VOLUME, + CMD_PATTERNBREAK, + CMD_NONE, // extended effects, processed separately + CMD_SPEED, + }; + + uint8 e = *pe & 0x0F; uint8 p = *pp; - *pe = ult_efftrans[e]; + *pe = ultEffTrans[e]; switch (e) { case 0x00: - if (!p) + if(!p) *pe = CMD_NONE; break; case 0x05: @@ -105,7 +157,7 @@ break; case 0x0A: // blah, this sucks - if (p & 0xF0) + if(p & 0xF0) p &= 0xF0; break; case 0x0B: @@ -118,7 +170,7 @@ case 0x0D: // pattern break p = 10 * (p >> 4) + (p & 0x0F); case 0x0E: // special - switch (p >> 4) + switch(p >> 4) { case 0x01: *pe = CMD_PORTAMENTOUP; @@ -150,7 +202,7 @@ } break; case 0x0F: - if (p > 0x2F) + if(p > 0x2F) *pe = CMD_TEMPO; break; } @@ -158,32 +210,28 @@ *pp = p; } -static int ReadULTEvent(ModCommand *note, const BYTE *lpStream, DWORD *dwMP, const DWORD dwMemLength) -//--------------------------------------------------------------------------------------------------- + +static int ReadULTEvent(ModCommand &m, FileReader &file) +//------------------------------------------------------ { - #define ASSERT_CAN_READ_ULTENV(x) ASSERT_CAN_READ_PROTOTYPE(dwMemPos, dwMemLength, x, return 0); - - DWORD dwMemPos = *dwMP; uint8 b, repeat = 1; uint8 cmd1, cmd2; // 1 = vol col, 2 = fx col in the original schismtracker code uint8 param1, param2; - ASSERT_CAN_READ_ULTENV(1) - b = lpStream[dwMemPos++]; + b = file.ReadUint8(); if (b == 0xFC) // repeat event { - ASSERT_CAN_READ_ULTENV(2); - repeat = lpStream[dwMemPos++]; - b = lpStream[dwMemPos++]; + repeat = file.ReadUint8(); + b = file.ReadUint8(); } - ASSERT_CAN_READ_ULTENV(4) - note->note = (b > 0 && b < 61) ? b + 36 : NOTE_NONE; - note->instr = lpStream[dwMemPos++]; - b = lpStream[dwMemPos++]; + + m.note = (b > 0 && b < 61) ? b + 36 : NOTE_NONE; + m.instr = file.ReadUint8(); + b = file.ReadUint8(); cmd1 = b & 0x0F; cmd2 = b >> 4; - param1 = lpStream[dwMemPos++]; - param2 = lpStream[dwMemPos++]; + param1 = file.ReadUint8(); + param2 = file.ReadUint8(); TranslateULTCommands(&cmd1, ¶m1); TranslateULTCommands(&cmd2, ¶m2); @@ -206,17 +254,20 @@ // don't try to figure out how ultratracker does this, it's quite random cmd2 = CMD_NONE; } - if (cmd2 == CMD_VOLUME || (cmd2 == CMD_NONE && cmd1 != CMD_VOLUME)) + if(cmd2 == CMD_VOLUME || (cmd2 == CMD_NONE && cmd1 != CMD_VOLUME)) { // swap commands std::swap(cmd1, cmd2); std::swap(param1, param2); } + // Combine slide commands, if possible + ModCommand::CombineEffects(cmd2, param2, cmd1, param1); + // Do that dance. // Maybe I should quit rewriting this everywhere and make a generic version :P int n; - for (n = 0; n < 4; n++) + for(n = 0; n < 4; n++) { if(ModCommand::ConvertVolEffect(cmd1, param1, (n >> 1) != 0)) { @@ -226,7 +277,7 @@ std::swap(cmd1, cmd2); std::swap(param1, param2); } - if (n < 5) + if(n < 5) { if (ModCommand::GetEffectWeight((ModCommand::COMMAND)cmd1) > ModCommand::GetEffectWeight((ModCommand::COMMAND)cmd2)) { @@ -235,22 +286,20 @@ } cmd1 = CMD_NONE; } - if (!cmd1) + if(cmd1 == CMD_NONE) param1 = 0; - if (!cmd2) + if(cmd2 == CMD_NONE) param2 = 0; - note->volcmd = cmd1; - note->vol = param1; - note->command = cmd2; - note->param = param2; + m.volcmd = cmd1; + m.vol = param1; + m.command = cmd2; + m.param = param2; - *dwMP = dwMemPos; return repeat; - - #undef ASSERT_CAN_READ_ULTENV } + // Functor for postfixing ULT patterns (this is easier than just remembering everything WHILE we're reading the pattern events) struct PostFixUltCommands //======================= @@ -321,168 +370,121 @@ }; -bool CSoundFile::ReadUlt(const BYTE *lpStream, const DWORD dwMemLength) -//--------------------------------------------------------------------- +bool CSoundFile::ReadUlt(FileReader &file) +//---------------------------------------- { - DWORD dwMemPos = 0; + file.Rewind(); + UltFileHeader fileHeader; - ASSERT_CAN_READ(sizeof(UltFileHeader)); - const UltFileHeader *fileHeader = reinterpret_cast<const UltFileHeader *>(lpStream); - // Tracker ID - if(fileHeader->version < '1' - || fileHeader->version > '4' - || memcmp(fileHeader->signature, "MAS_UTrack_V00", sizeof(fileHeader->signature)) != 0) + if(!file.Read(fileHeader) + || fileHeader.version < '1' + || fileHeader.version > '4' + || memcmp(fileHeader.signature, "MAS_UTrack_V00", sizeof(fileHeader.signature)) != 0) { return false; } - StringFixer::ReadString<StringFixer::maybeNullTerminated>(m_szNames[0], fileHeader->songName); + StringFixer::ReadString<StringFixer::maybeNullTerminated>(m_szNames[0], fileHeader.songName); - dwMemPos += sizeof(UltFileHeader); - m_nType = MOD_TYPE_ULT; m_SongFlags = SONG_ITCOMPATGXX | SONG_ITOLDEFFECTS; // this will be converted to IT format by MPT. SetModFlag(MSF_COMPATIBLE_PLAY, true); - ASSERT_CAN_READ((DWORD)(fileHeader->messageLength) * 32); - // read "nNumLines" lines, each containing 32 characters. - ReadFixedLineLengthMessage(lpStream + dwMemPos, fileHeader->messageLength * 32, 32, 0); - dwMemPos += fileHeader->messageLength * 32; + // read "messageLength" lines, each containing 32 characters. + ReadFixedLineLengthMessage(file, fileHeader.messageLength * 32, 32, 0); - ASSERT_CAN_READ(1); - m_nSamples = (SAMPLEINDEX)lpStream[dwMemPos++]; - if(m_nSamples >= MAX_SAMPLES) + m_nSamples = static_cast<SAMPLEINDEX>(file.ReadUint8()); + if(GetNumSamples() >= MAX_SAMPLES) return false; - for(SAMPLEINDEX nSmp = 0; nSmp < m_nSamples; nSmp++) + for(SAMPLEINDEX smp = 1; smp <= GetNumSamples(); smp++) { - UltSample ultSmp; - ModSample *pSmp = &(Samples[nSmp + 1]); - // annoying: v4 added a field before the end of the struct - if(fileHeader->version >= '4') + UltSample sampleHeader; + + // Annoying: v4 added a field before the end of the struct + if(fileHeader.version >= '4') { - ASSERT_CAN_READ(sizeof(UltSample)); - memcpy(&ultSmp, lpStream + dwMemPos, sizeof(UltSample)); - dwMemPos += sizeof(UltSample); - - ultSmp.speed = LittleEndianW(ultSmp.speed); + file.ReadConvertEndianness(sampleHeader); } else { - ASSERT_CAN_READ(sizeof(64)); - memcpy(&ultSmp, lpStream + dwMemPos, 64); - dwMemPos += 64; - - ultSmp.finetune = ultSmp.speed; - ultSmp.speed = 8363; + file.ReadStructPartial(sampleHeader, 64); + sampleHeader.ConvertEndianness(); + sampleHeader.finetune = sampleHeader.speed; + sampleHeader.speed = 8363; } - ultSmp.finetune = LittleEndianW(ultSmp.finetune); - ultSmp.loop_start = LittleEndian(ultSmp.loop_start); - ultSmp.loop_end = LittleEndian(ultSmp.loop_end); - ultSmp.size_start = LittleEndian(ultSmp.size_start); - ultSmp.size_end = LittleEndian(ultSmp.size_end); - StringFixer::ReadString<StringFixer::maybeNullTerminated>(m_szNames[nSmp + 1], ultSmp.name); - StringFixer::ReadString<StringFixer::maybeNullTerminated>(pSmp->filename, ultSmp.filename); - - if(ultSmp.size_end <= ultSmp.size_start) - continue; - pSmp->nLength = ultSmp.size_end - ultSmp.size_start; - pSmp->nLoopStart = ultSmp.loop_start; - pSmp->nLoopEnd = min(ultSmp.loop_end, pSmp->nLength); - pSmp->nVolume = ultSmp.volume; - pSmp->nGlobalVol = 64; - - /* mikmod does some weird integer math here, but it didn't really work for me */ - pSmp->nC5Speed = ultSmp.speed; - if(ultSmp.finetune) - { - pSmp->nC5Speed = (UINT)(((double)pSmp->nC5Speed) * pow(2.0, (((double)ultSmp.finetune) / (12.0 * 32768)))); - } - - if(ultSmp.flags & ULT_LOOP) - pSmp->uFlags |= CHN_LOOP; - if(ultSmp.flags & ULT_PINGPONGLOOP) - pSmp->uFlags |= CHN_PINGPONGLOOP; - if(ultSmp.flags & ULT_16BIT) - { - pSmp->uFlags |= CHN_16BIT; - pSmp->nLoopStart >>= 1; - pSmp->nLoopEnd >>= 1; - } + sampleHeader.ConvertToMPT(Samples[smp]); + StringFixer::ReadString<StringFixer::maybeNullTerminated>(m_szNames[smp], sampleHeader.name); } // ult just so happens to use 255 for its end mark, so there's no need to fiddle with this - Order.ReadAsByte(lpStream + dwMemPos, 256, dwMemLength - dwMemPos); - dwMemPos += 256; + Order.ReadAsByte(file, 256); - ASSERT_CAN_READ(2); - m_nChannels = lpStream[dwMemPos++] + 1; - PATTERNINDEX nNumPats = lpStream[dwMemPos++] + 1; + m_nChannels = file.ReadUint8() + 1; + PATTERNINDEX numPats = file.ReadUint8() + 1; - if(m_nChannels > MAX_BASECHANNELS || nNumPats > MAX_PATTERNS) + if(GetNumChannels() > MAX_BASECHANNELS || numPats > MAX_PATTERNS) return false; - if(fileHeader->version >= '3') + if(fileHeader.version >= '3') { - ASSERT_CAN_READ(m_nChannels); - for(CHANNELINDEX nChn = 0; nChn < m_nChannels; nChn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { - ChnSettings[nChn].nPan = ((lpStream[dwMemPos + nChn] & 0x0F) << 4) + 8; + ChnSettings[chn].nPan = ((file.ReadUint8() & 0x0F) << 4) + 8; } - dwMemPos += m_nChannels; } else { - for(CHANNELINDEX nChn = 0; nChn < m_nChannels; nChn++) + for(CHANNELINDEX chn = 0; chn < GetNumChannels(); chn++) { - ChnSettings[nChn].nPan = (nChn & 1) ? 192 : 64; + ChnSettings[chn].nPan = (chn & 1) ? 192 : 64; } } - for(PATTERNINDEX nPat = 0; nPat < nNumPats; nPat++) + for(PATTERNINDEX pat = 0; pat < numPats; pat++) { - if(Patterns.Insert(nPat, 64)) + if(Patterns.Insert(pat, 64)) return false; } - for(CHANNELINDEX nChn = 0; nChn < m_nChannels; nChn++) + for(CHANNELINDEX chn = 0; chn < m_nChannels; chn++) { ModCommand evnote; ModCommand *note; int repeat; evnote.Clear(); - for(PATTERNINDEX nPat = 0; nPat < nNumPats; nPat++) + for(PATTERNINDEX pat = 0; pat < numPats; pat++) { - note = Patterns[nPat] + nChn; - ROWINDEX nRow = 0; - while(nRow < 64) + note = Patterns[pat] + chn; + ROWINDEX row = 0; + while(row < 64) { - repeat = ReadULTEvent(&evnote, lpStream, &dwMemPos, dwMemLength); - if(repeat + nRow > 64) - repeat = 64 - nRow; + repeat = ReadULTEvent(evnote, file); + if(repeat + row > 64) + repeat = 64 - row; if(repeat == 0) break; while (repeat--) { *note = evnote; - note += m_nChannels; - nRow++; + note += GetNumChannels(); + row++; } } } } // Post-fix some effects. - Patterns.ForEachModCommand(PostFixUltCommands(m_nChannels)); + Patterns.ForEachModCommand(PostFixUltCommands(GetNumChannels())); - for(SAMPLEINDEX nSmp = 0; nSmp < m_nSamples; nSmp++) + for(SAMPLEINDEX smp = 1; smp <= GetNumSamples(); smp++) { - dwMemPos += SampleIO( - (Samples[nSmp + 1].uFlags & CHN_16BIT) ? SampleIO::_16bit : SampleIO::_8bit, + SampleIO( + Samples[smp].uFlags[CHN_16BIT] ? SampleIO::_16bit : SampleIO::_8bit, SampleIO::mono, SampleIO::littleEndian, SampleIO::signedPCM) - .ReadSample(Samples[nSmp + 1], (LPCSTR)(lpStream + dwMemPos), dwMemLength - dwMemPos); + .ReadSample(Samples[smp], file); } return true; } \ No newline at end of file Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2012-11-14 23:42:12 UTC (rev 1425) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2012-11-14 23:43:41 UTC (rev 1426) @@ -619,7 +619,7 @@ && !ReadAMS2(file) && !ReadOKT(file) && !ReadPTM(lpStream, dwMemLength) - && !ReadUlt(lpStream, dwMemLength) + && !ReadUlt(file) && !ReadDMF(lpStream, dwMemLength) && !ReadDSM(lpStream, dwMemLength) && !ReadUMX(file) Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2012-11-14 23:42:12 UTC (rev 1425) +++ trunk/OpenMPT/soundlib/Sndfile.h 2012-11-14 23:43:41 UTC (rev 1426) @@ -393,7 +393,7 @@ bool ReadIT(FileReader &file); bool ReadITProject(FileReader &file); bool Read669(FileReader &file); - bool ReadUlt(const LPCBYTE lpStream, const DWORD dwMemLength); + bool ReadUlt(FileReader &file); bool ReadWav(FileReader &file); bool ReadDSM(const LPCBYTE lpStream, const DWORD dwMemLength); bool ReadFAR(FileReader &file); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-11-16 22:34:29
|
Revision: 1427 http://modplug.svn.sourceforge.net/modplug/?rev=1427&view=rev Author: saga-games Date: 2012-11-16 22:34:22 +0000 (Fri, 16 Nov 2012) Log Message: ----------- [New] Pattern Editor: Added "Data Entry +/- 1" shortcuts in pattern editor, to increase or decrease the value of the currently selected pattern cells by one (experimental). [Imp] Pattern Editor: Added shortcuts for Record Select / Split Record Select (tx DJBouche). Modified Paths: -------------- trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/CommandSet.h trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/View_pat.h trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2012-11-14 23:43:41 UTC (rev 1426) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2012-11-16 22:34:22 UTC (rev 1427) @@ -635,6 +635,10 @@ DefineKeyCommand(kcChnSettingsClose, 1880, _T("Switch to Pattern Editor")); DefineKeyCommand(kcTransposeCustom, 1881, _T("Transpose Custom")); DefineKeyCommand(kcSampleZoomSelection, 1882, _T("Zoom into Selection")); + DefineKeyCommand(kcChannelRecordSelect, 1883, _T("Channel Record Select")); + DefineKeyCommand(kcChannelSplitRecordSelect, 1884, _T("Channel Split Record Select")); + DefineKeyCommand(kcDataEntryUp, 1885, _T("Data Entry +1")); + DefineKeyCommand(kcDataEntryDown, 1886, _T("Data Entry -1")); // Add new key commands here. #ifdef _DEBUG Modified: trunk/OpenMPT/mptrack/CommandSet.h =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.h 2012-11-14 23:43:41 UTC (rev 1426) +++ trunk/OpenMPT/mptrack/CommandSet.h 2012-11-16 22:34:22 UTC (rev 1427) @@ -259,6 +259,8 @@ kcToggleChanMuteOnPatTransition, kcUnmuteAllChnOnPatTransition, kcSoloChnOnPatTransition, + kcChannelRecordSelect, + kcChannelSplitRecordSelect, kcChannelReset, kcChannelSettings, kcEndChannelKeys = kcChannelSettings, Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2012-11-14 23:43:41 UTC (rev 1426) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2012-11-16 22:34:22 UTC (rev 1427) @@ -2699,7 +2699,7 @@ const ModCommand srcCmd = *sndFile->Patterns[m_nPattern].GetpModCommand(row0, nchn); const ModCommand destCmd = *sndFile->Patterns[m_nPattern].GetpModCommand(row1, nchn); - ModCommand::NOTE PCnote = 0; + ModCommand::NOTE PCnote = NOTE_NONE; uint16 PCinst = 0, PCparam = 0; switch(type) @@ -2877,8 +2877,7 @@ { if (m[chn].IsNote()) { - int note = m[chn].note; - note += transp; + int note = m[chn].note + transp; Limit(note, noteMin, noteMax); m[chn].note = (ModCommand::NOTE)note; } @@ -2890,6 +2889,92 @@ } +bool CViewPattern::DataEntry(int offset) +//-------------------------------------- +{ + CSoundFile *pSndFile = GetSoundFile(); + if(pSndFile == nullptr || !pSndFile->Patterns.IsValidPat(m_nPattern)) + { + return false; + } + + m_Selection.Sanitize(pSndFile->Patterns[m_nPattern].GetNumRows(), pSndFile->GetNumChannels()); + + const ROWINDEX startRow = m_Selection.GetStartRow(), endRow = m_Selection.GetEndRow(); + const CHANNELINDEX startChan = m_Selection.GetStartChannel(), endChan = m_Selection.GetEndChannel(); + + // Don't allow notes outside our supported note range. + const ModCommand::NOTE noteMin = pSndFile->GetModSpecifications().noteMin; + const ModCommand::NOTE noteMax = pSndFile->GetModSpecifications().noteMax; + const int instrMax = Util::Min(static_cast<int>(Util::MaxValueOfType(ModCommand::INSTR())), static_cast<int>(pSndFile->GetNumInstruments() ? pSndFile->GetModSpecifications().instrumentsMax : pSndFile->GetModSpecifications().samplesMax)); + const EffectInfo effectInfo(*pSndFile); + + PrepareUndo(m_Selection); + + for(ROWINDEX row = startRow; row <= endRow; row++) + { + PatternRow m = pSndFile->Patterns[m_nPattern].GetRow(row); + for(CHANNELINDEX chn = startChan; chn <= endChan; chn++) + { + if(m_Selection.ContainsHorizontal(PatternCursor(0, chn, PatternCursor::noteColumn)) && m[chn].IsNote()) + { + int note = m[chn].note + offset; + Limit(note, noteMin, noteMax); + m[chn].note = (ModCommand::NOTE)note; + } + if(m_Selection.ContainsHorizontal(PatternCursor(0, chn, PatternCursor::instrColumn))) + { + int instr = m[chn].instr + offset; + if(m[chn].IsInstrPlug()) + { + Limit(instr, 0, int(MAX_MIXPLUGINS)); + } else + { + Limit(instr, 0, instrMax); + } + m[chn].instr = (ModCommand::INSTR)instr; + } + if(m_Selection.ContainsHorizontal(PatternCursor(0, chn, PatternCursor::volumeColumn))) + { + if(m[chn].IsPcNote()) + { + int val = m[chn].GetValueVolCol() + offset; + Limit(val, 0, int(ModCommand::maxColumnValue)); + m[chn].SetValueVolCol(val); + } else + { + int vol = m[chn].vol + offset; + DWORD minValue = 0, maxValue = 64; + effectInfo.GetVolCmdInfo(effectInfo.GetIndexFromVolCmd(m[chn].volcmd), nullptr, &minValue, &maxValue); + Limit(vol, (int)minValue, (int)maxValue); + m[chn].vol = (ModCommand::VOL)vol; + } + } + if(m_Selection.ContainsHorizontal(PatternCursor(0, chn, PatternCursor::effectColumn)) || m_Selection.ContainsHorizontal(PatternCursor(0, chn, PatternCursor::paramColumn))) + { + if(m[chn].IsPcNote()) + { + int val = m[chn].GetValueEffectCol() + offset; + Limit(val, 0, int(ModCommand::maxColumnValue)); + m[chn].SetValueEffectCol(val); + } else + { + int param = m[chn].param + offset; + DWORD minValue = 0, maxValue = 0xFF; + effectInfo.GetEffectInfo(effectInfo.GetIndexFromEffect(m[chn].command, m[chn].param), nullptr, false, &minValue, &maxValue); + Limit(param, (int)minValue, (int)maxValue); + m[chn].param = (ModCommand::PARAM)param; + } + } + } + } + + SetModified(false); + InvalidatePattern(); + return true; +} + + void CViewPattern::OnDropSelection() //---------------------------------- { @@ -4032,6 +4117,8 @@ case kcChannelUnmuteAll: OnUnmuteAll(); return wParam; case kcToggleChanMuteOnPatTransition: TogglePendingMute(GetCurrentChannel()); return wParam; case kcUnmuteAllChnOnPatTransition: OnPendingUnmuteAllChnFromClick(); return wParam; + case kcChannelRecordSelect: pModDoc->Record1Channel(m_Cursor.GetChannel()); InvalidateChannelsHeaders(); return wParam; + case kcChannelSplitRecordSelect: pModDoc->Record2Channel(m_Cursor.GetChannel()); InvalidateChannelsHeaders(); return wParam; case kcChannelReset: ResetChannel(m_Cursor.GetChannel()); return wParam; case kcTimeAtRow: OnShowTimeAtRow(); return wParam; case kcSoloChnOnPatTransition: PendingSoloChn(GetCurrentChannel()); return wParam; @@ -4040,6 +4127,8 @@ case kcTransposeOctUp: OnTransposeOctUp(); return wParam; case kcTransposeOctDown: OnTransposeOctDown(); return wParam; case kcTransposeCustom: OnTransposeCustom(); return wParam; + case kcDataEntryUp: DataEntry(1); return wParam; + case kcDataEntryDown: DataEntry(-1); return wParam; case kcSelectColumn: OnSelectCurrentColumn(); return wParam; case kcPatternAmplify: OnPatternAmplify(); return wParam; case kcPatternSetInstrument: OnSetSelInstrument(); return wParam; Modified: trunk/OpenMPT/mptrack/View_pat.h =================================================================== --- trunk/OpenMPT/mptrack/View_pat.h 2012-11-14 23:43:41 UTC (rev 1426) +++ trunk/OpenMPT/mptrack/View_pat.h 2012-11-16 22:34:22 UTC (rev 1427) @@ -254,6 +254,7 @@ void MoveCursor(bool moveRight); bool TransposeSelection(int transp); + bool DataEntry(int offset); bool PrepareUndo(const PatternRect &selection) { return PrepareUndo(selection.GetUpperLeft(), selection.GetLowerRight()); }; bool PrepareUndo(const PatternCursor &beginSel, const PatternCursor &endSel); Modified: trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb =================================================================== --- trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb 2012-11-14 23:43:41 UTC (rev 1426) +++ trunk/OpenMPT/mptrack/res/defaultKeybindings.mkb 2012-11-16 22:34:22 UTC (rev 1427) @@ -95,6 +95,8 @@ 2:1005:0:121:1 //Mute current Channel: F10 (KeyDown) 2:1006:2:121:1 //Solo current Channel: Ctrl+F10 (KeyDown) 2:1771:6:121:1 //Unmute all channels: Ctrl+Alt+F10 (KeyDown) +2:1883:2:49:1 //Channel Record Select: Ctrl+1 (KeyDown) +2:1884:2:50:1 //Channel Split Record Select: Ctrl+2 (KeyDown) 2:1786:2:82:1 //Reset Channel: Ctrl+R (KeyDown) 2:1007:2:81:5 //Transpose +1: Ctrl+Q (KeyDown|KeyHold) 2:1008:2:65:5 //Transpose -1: Ctrl+A (KeyDown|KeyHold) Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2012-11-14 23:43:41 UTC (rev 1426) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2012-11-16 22:34:22 UTC (rev 1427) @@ -98,6 +98,8 @@ 2:1819:2:69:1 //Split Keyboard Settings dialog: Ctrl+E (KeyDown) 2:1780:2:80:1 //Show playback time at current row: Ctrl+P (KeyDown) 2:1005:2:85:1 //Mute current Channel: Ctrl+U (KeyDown) +2:1883:2:49:1 //Channel Record Select: Ctrl+1 (KeyDown) +2:1884:2:50:1 //Channel Split Record Select: Ctrl+2 (KeyDown) 2:1786:2:82:1 //Reset Channel: Ctrl+R (KeyDown) 2:1007:2:81:5 //Transpose +1: Ctrl+Q (KeyDown|KeyHold) 2:1008:2:65:5 //Transpose -1: Ctrl+A (KeyDown|KeyHold) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-11-17 16:04:20
|
Revision: 1430 http://modplug.svn.sourceforge.net/modplug/?rev=1430&view=rev Author: saga-games Date: 2012-11-17 16:04:12 +0000 (Sat, 17 Nov 2012) Log Message: ----------- [Fix] Some weird pattern loops that are obfuscated through pattern jump commands should now also work correctly when "Loop Song" is off and during Wave Export (http://bugs.openmpt.org/view.php?id=311). [Fix] Song Cleanup: Reordering instruments was not working in all cases. Modified Paths: -------------- trunk/OpenMPT/mptrack/CleanupSong.cpp trunk/OpenMPT/soundlib/RowVisitor.cpp trunk/OpenMPT/soundlib/RowVisitor.h trunk/OpenMPT/soundlib/Snd_fx.cpp Modified: trunk/OpenMPT/mptrack/CleanupSong.cpp =================================================================== --- trunk/OpenMPT/mptrack/CleanupSong.cpp 2012-11-16 22:44:07 UTC (rev 1429) +++ trunk/OpenMPT/mptrack/CleanupSong.cpp 2012-11-17 16:04:12 UTC (rev 1430) @@ -708,7 +708,7 @@ EndWaitCursor(); - if(reorder && numUsed > 1) + if(reorder && numUsed >= 1) { reorder = (Reporting::Confirm("Do you want to reorganize the remaining instruments?", "Removing unused instruments", false, false, this) == cnfYes); } else @@ -922,11 +922,11 @@ CSoundFile *pSndFile = m_pModDoc->GetSoundFile(); if(pSndFile == nullptr) return false; - if (pSndFile->GetNumInstruments() == 0) return false; + if(pSndFile->GetNumInstruments() == 0) return false; m_pModDoc->ConvertInstrumentsToSamples(); - for (INSTRUMENTINDEX i = 1; i <= pSndFile->GetNumInstruments(); i++) + for(INSTRUMENTINDEX i = 1; i <= pSndFile->GetNumInstruments(); i++) { pSndFile->DestroyInstrument(i, doNoDeleteAssociatedSamples); } Modified: trunk/OpenMPT/soundlib/RowVisitor.cpp =================================================================== --- trunk/OpenMPT/soundlib/RowVisitor.cpp 2012-11-16 22:44:07 UTC (rev 1429) +++ trunk/OpenMPT/soundlib/RowVisitor.cpp 2012-11-17 16:04:12 UTC (rev 1430) @@ -31,6 +31,7 @@ { const ORDERINDEX endOrder = sndFile.Order.GetLengthTailTrimmed(); visitedRows.resize(endOrder); + visitOrder.clear(); for(ORDERINDEX order = 0; order < endOrder; order++) { @@ -64,6 +65,10 @@ } visitedRows[order][row] = visited; + if(visited) + { + AddVisitedRow(order, row); + } } @@ -96,6 +101,7 @@ } else if(autoSet) { visitedRows[order][row] = true; + AddVisitedRow(order, row); } return false; @@ -155,3 +161,40 @@ row = ROWINDEX_INVALID; return false; } + + +// Set all rows of a previous pattern loop as unvisited. +void RowVisitor::ResetPatternLoop(ORDERINDEX order, ROWINDEX startRow) +//-------------------------------------------------------------------- +{ + ASSERT(order == currentOrder); // Should never trigger. + + // Unvisit all rows that are in the visited row buffer, until we hit the start row for this pattern loop. + while(!visitOrder.empty()) + { + ROWINDEX row = visitOrder.back(); + visitOrder.pop_back(); + Unvisit(order, row); + if(row == startRow) + { + break; + } + } + visitOrder.clear(); +} + + +// Add a row to the visited row memory for this pattern. +void RowVisitor::AddVisitedRow(ORDERINDEX order, ROWINDEX row) +//------------------------------------------------------------ +{ + // Update Pattern Loop memory + if(order != currentOrder) + { + // We're in a new pattern! Forget about which rows we previously visited... + visitOrder.clear(); + visitOrder.reserve(GetVisitedRowsVectorSize(sndFile.Order[order])); + currentOrder = order; + } + visitOrder.push_back(row); +} \ No newline at end of file Modified: trunk/OpenMPT/soundlib/RowVisitor.h =================================================================== --- trunk/OpenMPT/soundlib/RowVisitor.h 2012-11-16 22:44:07 UTC (rev 1429) +++ trunk/OpenMPT/soundlib/RowVisitor.h 2012-11-17 16:04:12 UTC (rev 1430) @@ -24,17 +24,21 @@ typedef std::vector<bool> VisitedRowsBaseType; typedef std::vector<VisitedRowsBaseType> VisitedRowsType; + // Memory for every row in the module if it has been visited or not. VisitedRowsType visitedRows; + // Memory of visited rows (including their order) to reset pattern loops. + std::vector<ROWINDEX> visitOrder; const CSoundFile &sndFile; + ORDERINDEX currentOrder; public: - RowVisitor(const CSoundFile &sf) : sndFile(sf) + RowVisitor(const CSoundFile &sf) : sndFile(sf), currentOrder(0) { Initialize(true); }; - RowVisitor(const RowVisitor &other) : sndFile(other.sndFile), visitedRows(other.visitedRows) { }; + RowVisitor(const RowVisitor &other) : sndFile(other.sndFile), visitedRows(other.visitedRows), visitOrder(other.visitOrder), currentOrder(other.currentOrder) { }; // Resize / Clear the row vector. // If reset is true, the vector is not only resized to the required dimensions, but also completely cleared (i.e. all visited rows are unset). @@ -72,6 +76,9 @@ visitedRows = other.visitedRows; } + // Set all rows of a previous pattern loop as unvisited. + void ResetPatternLoop(ORDERINDEX order, ROWINDEX startRow); + protected: // (Un)sets a given row as visited. @@ -79,4 +86,7 @@ // If visited is true, the row will be set as visited. void SetVisited(ORDERINDEX order, ROWINDEX row, bool visited); + // Add a row to the visited row memory for this pattern. + void AddVisitedRow(ORDERINDEX order, ROWINDEX row); + }; Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2012-11-16 22:44:07 UTC (rev 1429) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2012-11-17 16:04:12 UTC (rev 1430) @@ -1989,7 +1989,7 @@ { pChn->nPan = 0; } - break; + // Intentional fall-through default: // no memory here. volcmd = VOLCMD_NONE; @@ -2506,10 +2506,7 @@ } // As long as the pattern loop is running, mark the looped rows as not visited yet - for(ROWINDEX nRow = nPatLoopRow; nRow <= m_nRow; nRow++) - { - visitedSongRows.Unvisit(m_nCurrentOrder, nRow); - } + visitedSongRows.ResetPatternLoop(m_nCurrentOrder, nPatLoopRow); } // Pattern Break / Position Jump only if no loop running This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-11-17 16:32:10
|
Revision: 1431 http://modplug.svn.sourceforge.net/modplug/?rev=1431&view=rev Author: saga-games Date: 2012-11-17 16:32:02 +0000 (Sat, 17 Nov 2012) Log Message: ----------- [Fix] FT2 Compatibility: lxx/rxx shouldn't set the effect memory of Pxx (test case: PanSlideMem.xm). [Mod] OpenMPT: Version is now 1.20.04.04 Modified Paths: -------------- trunk/OpenMPT/mptrack/version.h trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/Sndfile.h Modified: trunk/OpenMPT/mptrack/version.h =================================================================== --- trunk/OpenMPT/mptrack/version.h 2012-11-17 16:04:12 UTC (rev 1430) +++ trunk/OpenMPT/mptrack/version.h 2012-11-17 16:32:02 UTC (rev 1431) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 20 #define VER_MINOR 04 -#define VER_MINORMINOR 03 +#define VER_MINORMINOR 04 //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2012-11-17 16:04:12 UTC (rev 1430) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2012-11-17 16:32:02 UTC (rev 1431) @@ -2039,11 +2039,11 @@ break; case VOLCMD_PANSLIDELEFT: - PanningSlide(pChn, vol); + PanningSlide(pChn, vol, !IsCompatibleMode(TRK_FASTTRACKER2)); break; case VOLCMD_PANSLIDERIGHT: - PanningSlide(pChn, vol << 4); + PanningSlide(pChn, vol << 4, !IsCompatibleMode(TRK_FASTTRACKER2)); break; case VOLCMD_PORTAUP: @@ -3074,13 +3074,18 @@ } -void CSoundFile::PanningSlide(ModChannel *pChn, UINT param) -//--------------------------------------------------------- +void CSoundFile::PanningSlide(ModChannel *pChn, UINT param, bool memory) +//---------------------------------------------------------------------- { - if (param) - pChn->nOldPanSlide = param; - else - param = pChn->nOldPanSlide; + if(memory) + { + // FT2 compatibility: Use effect memory (lxx and rxx in XM shouldn't use effect memory). + // Test case: PanSlideMem.xm + if(param) + pChn->nOldPanSlide = param; + else + param = pChn->nOldPanSlide; + } if((GetType() & (MOD_TYPE_XM | MOD_TYPE_MT2))) { Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2012-11-17 16:04:12 UTC (rev 1430) +++ trunk/OpenMPT/soundlib/Sndfile.h 2012-11-17 16:32:02 UTC (rev 1431) @@ -568,7 +568,7 @@ void Vibrato(ModChannel *pChn, UINT param); void FineVibrato(ModChannel *pChn, UINT param); void VolumeSlide(ModChannel *pChn, UINT param); - void PanningSlide(ModChannel *pChn, UINT param); + void PanningSlide(ModChannel *pChn, UINT param, bool memory = true); void ChannelVolSlide(ModChannel *pChn, UINT param); void FineVolumeUp(ModChannel *pChn, UINT param); void FineVolumeDown(ModChannel *pChn, UINT param); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-11-20 20:16:36
|
Revision: 1434 http://modplug.svn.sourceforge.net/modplug/?rev=1434&view=rev Author: saga-games Date: 2012-11-20 20:16:27 +0000 (Tue, 20 Nov 2012) Log Message: ----------- [Ref] Various small changes. Modified Paths: -------------- trunk/OpenMPT/mptrack/EffectInfo.cpp trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/mptrack/Vstplug.h trunk/OpenMPT/mptrack/test/test.cpp trunk/OpenMPT/soundlib/Endianness.h trunk/OpenMPT/soundlib/Load_it.cpp trunk/OpenMPT/soundlib/Load_itp.cpp trunk/OpenMPT/soundlib/Load_ult.cpp trunk/OpenMPT/soundlib/Snd_defs.h trunk/OpenMPT/soundlib/plugins/PlugInterface.h trunk/OpenMPT/ungzip/ungzip.h Modified: trunk/OpenMPT/mptrack/EffectInfo.cpp =================================================================== --- trunk/OpenMPT/mptrack/EffectInfo.cpp 2012-11-19 21:42:41 UTC (rev 1433) +++ trunk/OpenMPT/mptrack/EffectInfo.cpp 2012-11-20 20:16:27 UTC (rev 1434) @@ -297,7 +297,7 @@ if (s) GetEffectName(s, gFXInfo[ndx].effect, gFXInfo[ndx].paramValue, bXX); if ((prangeMin) && (prangeMax)) { - UINT nmin = 0, nmax = 0xFF, nType = sndFile.GetType(); + UINT nmin = 0, nmax = 0xFF; if (gFXInfo[ndx].paramMask == 0xF0) { nmin = gFXInfo[ndx].paramValue; @@ -306,7 +306,7 @@ switch(gFXInfo[ndx].effect) { case CMD_ARPEGGIO: - if (nType & (MOD_TYPE_MOD | MOD_TYPE_XM)) nmin = 1; + if (sndFile.GetType() & (MOD_TYPE_MOD | MOD_TYPE_XM)) nmin = 1; break; case CMD_VOLUME: case CMD_CHANNELVOLUME: @@ -315,16 +315,16 @@ case CMD_SPEED: nmin = 1; nmax = 0xFF; - if (nType & MOD_TYPE_MOD) nmax = 0x20; else - if (nType & MOD_TYPE_XM) nmax = 0x1F; + if (sndFile.GetType() & MOD_TYPE_MOD) nmax = 0x20; else + if (sndFile.GetType() & MOD_TYPE_XM) nmax = 0x1F; break; case CMD_TEMPO: nmin = 0x20; - if (nType & MOD_TYPE_MOD) nmin = 0x21; else + if (sndFile.GetType() & MOD_TYPE_MOD) nmin = 0x21; else // -> CODE#0010 // -> DESC="add extended parameter mechanism to pattern effects" // if (nType & MOD_TYPE_S3MIT) nmin = 1; - if (nType & MOD_TYPE_S3MITMPT) nmin = 0; + if (sndFile.GetType() & MOD_TYPE_S3MITMPT) nmin = 0; // -! NEW_FEATURE#0010 break; case CMD_VOLUMESLIDE: @@ -333,14 +333,14 @@ case CMD_GLOBALVOLSLIDE: case CMD_CHANNELVOLSLIDE: case CMD_PANNINGSLIDE: - nmax = (nType & MOD_TYPE_S3MITMPT) ? 58 : 30; + nmax = (sndFile.GetType() & MOD_TYPE_S3MITMPT) ? 58 : 30; break; case CMD_PANNING8: - if (nType & (MOD_TYPE_S3M)) nmax = 0x81; + if (sndFile.GetType() & (MOD_TYPE_S3M)) nmax = 0x81; else nmax = 0xFF; break; case CMD_GLOBALVOLUME: - nmax = (nType & (MOD_TYPE_IT | MOD_TYPE_MPT)) ? 128 : 64; + nmax = (sndFile.GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT)) ? 128 : 64; break; case CMD_MODCMDEX: @@ -353,7 +353,7 @@ break; case CMD_PATTERNBREAK: // no big patterns in MOD/S3M files - if(nType & (MOD_TYPE_MOD | MOD_TYPE_S3M)) + if(sndFile.GetType() & (MOD_TYPE_MOD | MOD_TYPE_S3M)) nmax = 63; break; } Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2012-11-19 21:42:41 UTC (rev 1433) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2012-11-20 20:16:27 UTC (rev 1434) @@ -590,18 +590,20 @@ bool handledByTextBox = false; HWND hWnd = ::GetFocus(); - if (hWnd != NULL) { + if(hWnd != NULL) + { TCHAR activeWindowClassName[512]; GetClassName(hWnd, activeWindowClassName, 6); textboxHasFocus = _tcsicmp(activeWindowClassName, _T("Edit")) == 0; - if (textboxHasFocus) { + if(textboxHasFocus) + { handledByTextBox = m_InputHandler->isKeyPressHandledByTextBox(wParam); } } - if (!handledByTextBox && m_InputHandler->GeneralKeyEvent(kCtxAllContexts, code, wParam, lParam) != kcNull) + if(!handledByTextBox && m_InputHandler->GeneralKeyEvent(kCtxAllContexts, code, wParam, lParam) != kcNull) { - if (wParam != VK_ESCAPE) + if(wParam != VK_ESCAPE) return -1; // We've handled the keypress. No need to take it further. // Unless it was esc, in which case we need it to close Windows // (there might be other special cases, we'll see.. ) @@ -609,13 +611,13 @@ } return CallNextHookEx(ghKbdHook, code, wParam, lParam); -} +} BOOL CMainFrame::PreTranslateMessage(MSG* pMsg) //--------------------------------------------- { - if ((pMsg->message == WM_RBUTTONDOWN) || (pMsg->message == WM_NCRBUTTONDOWN)) + if((pMsg->message == WM_RBUTTONDOWN) || (pMsg->message == WM_NCRBUTTONDOWN)) { CWnd* pWnd = CWnd::FromHandlePermanent(pMsg->hwnd); CControlBar* pBar = NULL; Modified: trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp =================================================================== --- trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp 2012-11-19 21:42:41 UTC (rev 1433) +++ trunk/OpenMPT/mptrack/SoundFilePlayConfig.cpp 2012-11-20 20:16:27 UTC (rev 1434) @@ -11,7 +11,7 @@ #include "stdafx.h" #include "Sndfile.h" -#include ".\soundfileplayconfig.h" +#include "SoundFilePlayConfig.h" CSoundFilePlayConfig::CSoundFilePlayConfig() //------------------------------------------ Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2012-11-19 21:42:41 UTC (rev 1433) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2012-11-20 20:16:27 UTC (rev 1434) @@ -1931,12 +1931,6 @@ } -void CVstPlugin::Init(unsigned long /*nFreq*/, int /*bReset*/) -//------------------------------------------------------------ -{ - -} - void CVstPlugin::Resume() //----------------------- { Modified: trunk/OpenMPT/mptrack/Vstplug.h =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.h 2012-11-19 21:42:41 UTC (rev 1433) +++ trunk/OpenMPT/mptrack/Vstplug.h 2012-11-20 20:16:27 UTC (rev 1434) @@ -59,11 +59,11 @@ }; VSTPluginLib *pPrev, *pNext; + CVstPlugin *pPluginsList; VstInt32 dwPluginId1; VstInt32 dwPluginId2; - bool isInstrument; PluginCategory category; - CVstPlugin *pPluginsList; + bool isInstrument; CHAR szLibraryName[_MAX_FNAME]; CHAR szDllPath[_MAX_PATH]; @@ -233,7 +233,6 @@ void RestoreAllParameters(long nProg=-1); //rewbs.plugDefaultProgram - added param void RecalculateGain(); void Process(float *pOutL, float *pOutR, size_t nSamples); - void Init(unsigned long nFreq, int bReset); bool MidiSend(DWORD dwMidiCode); void MidiCC(uint8 nMidiCh, MIDIEvents::MidiCC nController, uint8 nParam, CHANNELINDEX trackChannel); void MidiPitchBend(uint8 nMidiCh, int32 increment, int8 pwd); Modified: trunk/OpenMPT/mptrack/test/test.cpp =================================================================== --- trunk/OpenMPT/mptrack/test/test.cpp 2012-11-19 21:42:41 UTC (rev 1433) +++ trunk/OpenMPT/mptrack/test/test.cpp 2012-11-20 20:16:27 UTC (rev 1434) @@ -199,12 +199,6 @@ VERIFY_EQUAL(int64_min, (std::numeric_limits<int64>::min)()); VERIFY_EQUAL(int64_max, (std::numeric_limits<int64>::max)()); VERIFY_EQUAL(uint64_max, (std::numeric_limits<uint64>::max)()); - - VERIFY_EQUAL(ROWINDEX_MAX, (std::numeric_limits<ROWINDEX>::max)()); - VERIFY_EQUAL(ORDERINDEX_MAX, (std::numeric_limits<ORDERINDEX>::max)()); - VERIFY_EQUAL(PATTERNINDEX_MAX, (std::numeric_limits<PATTERNINDEX>::max)()); - VERIFY_EQUAL(SAMPLEINDEX_MAX, (std::numeric_limits<SAMPLEINDEX>::max)()); - VERIFY_EQUAL(INSTRUMENTINDEX_MAX, (std::numeric_limits<INSTRUMENTINDEX>::max)()); } Modified: trunk/OpenMPT/soundlib/Endianness.h =================================================================== --- trunk/OpenMPT/soundlib/Endianness.h 2012-11-19 21:42:41 UTC (rev 1433) +++ trunk/OpenMPT/soundlib/Endianness.h 2012-11-20 20:16:27 UTC (rev 1434) @@ -22,17 +22,18 @@ // Deprecated. Use "SwapBytesXX" versions below. #ifdef PLATFORM_BIG_ENDIAN // PPC -inline DWORD LittleEndian(DWORD x) { return ((x & 0xFF) << 24) | ((x & 0xFF00) << 8) | ((x & 0xFF0000) >> 8) | ((x & 0xFF000000) >> 24); } -inline WORD LittleEndianW(WORD x) { return (WORD)(((x >> 8) & 0xFF) | ((x << 8) & 0xFF00)); } -#define BigEndian(x) (x) -#define BigEndianW(x) (x) +inline uint32 LittleEndian(uint32 x) { return ((x & 0xFF) << 24) | ((x & 0xFF00) << 8) | ((x & 0xFF0000) >> 8) | ((x & 0xFF000000) >> 24); } +inline uint16 LittleEndianW(uint16 x) { return (uint16)(((x >> 8) & 0xFF) | ((x << 8) & 0xFF00)); } +#define BigEndian(x) (x) +#define BigEndianW(x) (x) #else // x86 -inline DWORD BigEndian(DWORD x) { return ((x & 0xFF) << 24) | ((x & 0xFF00) << 8) | ((x & 0xFF0000) >> 8) | ((x & 0xFF000000) >> 24); } -inline WORD BigEndianW(WORD x) { return (WORD)(((x >> 8) & 0xFF) | ((x << 8) & 0xFF00)); } -#define LittleEndian(x) (x) -#define LittleEndianW(x) (x) +inline uint32 BigEndian(uint32 x) { return ((x & 0xFF) << 24) | ((x & 0xFF00) << 8) | ((x & 0xFF0000) >> 8) | ((x & 0xFF000000) >> 24); } +inline uint16 BigEndianW(uint16 x) { return (uint16)(((x >> 8) & 0xFF) | ((x << 8) & 0xFF00)); } +#define LittleEndian(x) (x) +#define LittleEndianW(x) (x) #endif +//#pragma deprecated(BigEndian, BigEndianW, LittleEndian, LittleEndianW) #ifdef PLATFORM_BIG_ENDIAN // PPC Modified: trunk/OpenMPT/soundlib/Load_it.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_it.cpp 2012-11-19 21:42:41 UTC (rev 1433) +++ trunk/OpenMPT/soundlib/Load_it.cpp 2012-11-20 20:16:27 UTC (rev 1434) @@ -1900,7 +1900,7 @@ if(plug < MAX_MIXPLUGINS) { // MPT's standard plugin data. Size not specified in file.. grrr.. - chunk.Read(m_MixPlugins[plug].Info); + chunk.ReadConvertEndianness(m_MixPlugins[plug].Info); StringFixer::SetNullTerminator(m_MixPlugins[plug].Info.szName); StringFixer::SetNullTerminator(m_MixPlugins[plug].Info.szLibraryName); Modified: trunk/OpenMPT/soundlib/Load_itp.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_itp.cpp 2012-11-19 21:42:41 UTC (rev 1433) +++ trunk/OpenMPT/soundlib/Load_itp.cpp 2012-11-20 20:16:27 UTC (rev 1434) @@ -83,8 +83,10 @@ } // Song mix plugins - size = file.ReadUint32LE(); - LoadMixPlugins(file.GetChunk(size)); + { + FileReader plugChunk = file.GetChunk(file.ReadUint32LE()); + LoadMixPlugins(plugChunk); + } // MIDI Macro config file.ReadStructPartial(m_MidiCfg, file.ReadUint32LE()); Modified: trunk/OpenMPT/soundlib/Load_ult.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_ult.cpp 2012-11-19 21:42:41 UTC (rev 1433) +++ trunk/OpenMPT/soundlib/Load_ult.cpp 2012-11-20 20:16:27 UTC (rev 1434) @@ -451,7 +451,6 @@ { ModCommand evnote; ModCommand *note; - int repeat; evnote.Clear(); for(PATTERNINDEX pat = 0; pat < numPats; pat++) @@ -460,11 +459,11 @@ ROWINDEX row = 0; while(row < 64) { - repeat = ReadULTEvent(evnote, file); + int repeat = ReadULTEvent(evnote, file); if(repeat + row > 64) repeat = 64 - row; if(repeat == 0) break; - while (repeat--) + while(repeat--) { *note = evnote; note += GetNumChannels(); Modified: trunk/OpenMPT/soundlib/Snd_defs.h =================================================================== --- trunk/OpenMPT/soundlib/Snd_defs.h 2012-11-19 21:42:41 UTC (rev 1433) +++ trunk/OpenMPT/soundlib/Snd_defs.h 2012-11-20 20:16:27 UTC (rev 1434) @@ -19,29 +19,22 @@ #endif typedef uint32 ROWINDEX; - const ROWINDEX ROWINDEX_MAX = uint32_max; - const ROWINDEX ROWINDEX_INVALID = ROWINDEX_MAX; + const ROWINDEX ROWINDEX_INVALID = uint32_max; typedef uint16 CHANNELINDEX; - const CHANNELINDEX CHANNELINDEX_MAX = uint16_max; - const CHANNELINDEX CHANNELINDEX_INVALID = CHANNELINDEX_MAX; + const CHANNELINDEX CHANNELINDEX_INVALID = uint16_max; typedef uint16 ORDERINDEX; - const ORDERINDEX ORDERINDEX_MAX = uint16_max; - const ORDERINDEX ORDERINDEX_INVALID = ORDERINDEX_MAX; + const ORDERINDEX ORDERINDEX_INVALID = uint16_max; typedef uint16 PATTERNINDEX; - const PATTERNINDEX PATTERNINDEX_MAX = uint16_max; - const PATTERNINDEX PATTERNINDEX_INVALID = PATTERNINDEX_MAX; + const PATTERNINDEX PATTERNINDEX_INVALID = uint16_max; typedef uint8 PLUGINDEX; const PLUGINDEX PLUGINDEX_INVALID = uint8_max; typedef uint16 TEMPO; typedef uint16 SAMPLEINDEX; - const SAMPLEINDEX SAMPLEINDEX_MAX = uint16_max; - const SAMPLEINDEX SAMPLEINDEX_INVALID = SAMPLEINDEX_MAX; + const SAMPLEINDEX SAMPLEINDEX_INVALID = uint16_max; typedef uint16 INSTRUMENTINDEX; - const INSTRUMENTINDEX INSTRUMENTINDEX_MAX = uint16_max; - const INSTRUMENTINDEX INSTRUMENTINDEX_INVALID = INSTRUMENTINDEX_MAX; + const INSTRUMENTINDEX INSTRUMENTINDEX_INVALID = uint16_max; typedef uint8 SEQUENCEINDEX; - const SEQUENCEINDEX SEQUENCEINDEX_MAX = uint8_max; - const SEQUENCEINDEX SEQUENCEINDEX_INVALID = SEQUENCEINDEX_MAX; + const SEQUENCEINDEX SEQUENCEINDEX_INVALID = uint8_max; typedef uintptr_t SmpLength; @@ -52,7 +45,7 @@ // Note: Sample size in bytes can be more than this (= 256 MB). #define MAX_SAMPLE_RATE 192000 // Max playback / render rate in Hz -const ROWINDEX MAX_PATTERN_ROWS = 1024; // -> CODE#0008 -> DESC="#define to set pattern size" -! BEHAVIOUR_CHANGE#0008 +const ROWINDEX MAX_PATTERN_ROWS = 1024; const ORDERINDEX MAX_ORDERS = 256; const PATTERNINDEX MAX_PATTERNS = 240; const SAMPLEINDEX MAX_SAMPLES = 4000; @@ -272,8 +265,8 @@ SONG_ITPEMBEDIH = 0x40000, // Embed instrument headers in project file // -! NEW_FEATURE#0023 SONG_BREAKTOROW = 0x80000, // Break to row command encountered (internal flag, do not touch) - SONG_POSJUMP = 0x100000, // Position jump encountered (internal flag, do not touch) - SONG_PT1XMODE = 0x200000, // ProTracker 1.x playback mode + SONG_POSJUMP = 0x100000, // Position jump encountered (internal flag, do not touch) + SONG_PT1XMODE = 0x200000, // ProTracker 1.x playback mode }; #define SONG_FILE_FLAGS (SONG_EMBEDMIDICFG|SONG_FASTVOLSLIDES|SONG_ITOLDEFFECTS|SONG_ITCOMPATGXX|SONG_LINEARSLIDES|SONG_EXFILTERRANGE|SONG_AMIGALIMITS|SONG_ITPROJECT|SONG_ITPEMBEDIH|SONG_PT1XMODE) Modified: trunk/OpenMPT/soundlib/plugins/PlugInterface.h =================================================================== --- trunk/OpenMPT/soundlib/plugins/PlugInterface.h 2012-11-19 21:42:41 UTC (rev 1433) +++ trunk/OpenMPT/soundlib/plugins/PlugInterface.h 2012-11-20 20:16:27 UTC (rev 1434) @@ -22,6 +22,7 @@ #include "Snd_defs.h" #include "../common/misc_util.h" #include "../soundlib/MIDIEvents.h" +#include "../soundlib/Endianness.h" //////////////////////////////////////////////////////////////////// // Mix Plugins @@ -39,7 +40,6 @@ virtual void SaveAllParameters() = 0; virtual void RestoreAllParameters(long nProg=-1) = 0; //rewbs.plugDefaultProgram: added param virtual void Process(float *pOutL, float *pOutR, size_t nSamples) = 0; - virtual void Init(unsigned long nFreq, int bReset) = 0; virtual bool MidiSend(DWORD dwMidiCode) = 0; virtual void MidiCC(uint8 nMidiCh, MIDIEvents::MidiCC nController, uint8 nParam, CHANNELINDEX trackChannel) = 0; virtual void MidiPitchBend(uint8 nMidiCh, int32 increment, int8 pwd) = 0; @@ -118,6 +118,19 @@ // Should only be called from SNDMIXPLUGIN::SetBypass() and IMixPlugin::Bypass() void SetBypass(bool bypass = true) { if(bypass) dwInputRouting |= irBypass; else dwInputRouting &= ~irBypass; }; + // Convert all multi-byte numeric values to current platform's endianness or vice versa. + void ConvertEndianness() + { + SwapBytesLE(dwPluginId1); + SwapBytesLE(dwPluginId2); + SwapBytesLE(dwInputRouting); + SwapBytesLE(dwOutputRouting); + SwapBytesLE(dwReserved[0]); + SwapBytesLE(dwReserved[1]); + SwapBytesLE(dwReserved[2]); + SwapBytesLE(dwReserved[3]); + } + }; STATIC_ASSERT(sizeof(SNDMIXPLUGININFO) == 128); // this is directly written to files, so the size must be correct! Modified: trunk/OpenMPT/ungzip/ungzip.h =================================================================== --- trunk/OpenMPT/ungzip/ungzip.h 2012-11-19 21:42:41 UTC (rev 1433) +++ trunk/OpenMPT/ungzip/ungzip.h 2012-11-20 20:16:27 UTC (rev 1434) @@ -15,27 +15,7 @@ #include "../zlib/zlib.h" #include "../common/typedefs.h" -#pragma pack(push, 1) -struct GZheader -{ - uint8 magic1; // 0x1F - uint8 magic2; // 0x8B - uint8 method; // 0-7 = reserved, 8 = deflate - uint8 flags; // See GZ_F* constants - uint32 mtime; // UNIX time - uint8 xflags; // Available for use by specific compression methods. We ignore this. - uint8 os; // Which OS was used to compress the file? We also ignore this. -}; - -struct GZtrailer -{ - uint32 crc32; // CRC32 of decompressed data - uint32 isize; // Size of decompressed data -}; - -#pragma pack(pop) - // magic bytes #define GZ_HMAGIC1 0x1F #define GZ_HMAGIC2 0x8B @@ -53,6 +33,35 @@ class CGzipArchive //================ { +protected: + // in + LPBYTE m_lpStream; + DWORD m_dwStreamLen; + // out + Bytef *m_pOutputFile; + DWORD m_dwOutputLen; + +#pragma pack(push, 1) + + struct GZheader + { + uint8 magic1; // 0x1F + uint8 magic2; // 0x8B + uint8 method; // 0-7 = reserved, 8 = deflate + uint8 flags; // See GZ_F* constants + uint32 mtime; // UNIX time + uint8 xflags; // Available for use by specific compression methods. We ignore this. + uint8 os; // Which OS was used to compress the file? We also ignore this. + }; + + struct GZtrailer + { + uint32 crc32; // CRC32 of decompressed data + uint32 isize; // Size of decompressed data + }; + +#pragma pack(pop) + public: LPBYTE GetOutputFile() const { return m_pOutputFile; } @@ -62,12 +71,4 @@ CGzipArchive(LPBYTE lpStream, DWORD dwMemLength); ~CGzipArchive(); - -protected: - // in - LPBYTE m_lpStream; - DWORD m_dwStreamLen; - // out - Bytef *m_pOutputFile; - DWORD m_dwOutputLen; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-11-21 00:08:45
|
Revision: 1436 http://modplug.svn.sourceforge.net/modplug/?rev=1436&view=rev Author: saga-games Date: 2012-11-21 00:08:35 +0000 (Wed, 21 Nov 2012) Log Message: ----------- [New] Sample Editor: Added new Stereo to Mono sample conversion modes: Only left / right channel, Split into two samples. Modified Paths: -------------- trunk/OpenMPT/mptrack/MPTHacks.cpp trunk/OpenMPT/mptrack/View_smp.cpp trunk/OpenMPT/mptrack/View_smp.h trunk/OpenMPT/mptrack/resource.h trunk/OpenMPT/soundlib/modsmp_ctrl.cpp trunk/OpenMPT/soundlib/modsmp_ctrl.h Modified: trunk/OpenMPT/mptrack/MPTHacks.cpp =================================================================== --- trunk/OpenMPT/mptrack/MPTHacks.cpp 2012-11-20 20:18:02 UTC (rev 1435) +++ trunk/OpenMPT/mptrack/MPTHacks.cpp 2012-11-21 00:08:35 UTC (rev 1436) @@ -350,7 +350,7 @@ foundHere = foundHacks = true; if(autofix) { - ctrlSmp::ConvertToMono(smp, &m_SndFile); + ctrlSmp::ConvertToMono(smp, &m_SndFile, ctrlSmp::mixChannels); } else { break; Modified: trunk/OpenMPT/mptrack/View_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_smp.cpp 2012-11-20 20:18:02 UTC (rev 1435) +++ trunk/OpenMPT/mptrack/View_smp.cpp 2012-11-21 00:08:35 UTC (rev 1436) @@ -89,7 +89,10 @@ ON_COMMAND(ID_SAMPLE_SETLOOP, OnSetLoop) ON_COMMAND(ID_SAMPLE_SETSUSTAINLOOP, OnSetSustainLoop) ON_COMMAND(ID_SAMPLE_8BITCONVERT, On8BitConvert) - ON_COMMAND(ID_SAMPLE_MONOCONVERT, OnMonoConvert) + ON_COMMAND(ID_SAMPLE_MONOCONVERT, OnMonoConvertMix) + ON_COMMAND(ID_SAMPLE_MONOCONVERT_LEFT, OnMonoConvertLeft) + ON_COMMAND(ID_SAMPLE_MONOCONVERT_RIGHT, OnMonoConvertRight) + ON_COMMAND(ID_SAMPLE_MONOCONVERT_SPLIT, OnMonoConvertSplit) ON_COMMAND(ID_SAMPLE_TRIM, OnSampleTrim) ON_COMMAND(ID_PREVINSTRUMENT, OnPrevInstrument) ON_COMMAND(ID_NEXTINSTRUMENT, OnNextInstrument) @@ -1527,13 +1530,21 @@ if(m_dwBeginSel >= m_dwEndSel) { - if (sample.uFlags & CHN_16BIT) ::AppendMenu(hMenu, MF_STRING, ID_SAMPLE_8BITCONVERT, "Convert to 8-bit"); - if (sample.uFlags & CHN_STEREO) ::AppendMenu(hMenu, MF_STRING, ID_SAMPLE_MONOCONVERT, "Convert to mono"); + if(sample.GetElementarySampleSize() > 1) ::AppendMenu(hMenu, MF_STRING, ID_SAMPLE_8BITCONVERT, "Convert to &8-bit"); + if(sample.GetNumChannels() > 1) + { + HMENU hMonoMenu = ::CreatePopupMenu(); + ::AppendMenu(hMonoMenu, MF_STRING, ID_SAMPLE_MONOCONVERT, "&Mix Channels"); + ::AppendMenu(hMonoMenu, MF_STRING, ID_SAMPLE_MONOCONVERT_LEFT, "&Left Channel"); + ::AppendMenu(hMonoMenu, MF_STRING, ID_SAMPLE_MONOCONVERT_RIGHT, "&Right Channel"); + ::AppendMenu(hMonoMenu, MF_STRING, ID_SAMPLE_MONOCONVERT_SPLIT, "&Split Sample"); + ::AppendMenu(hMenu, MF_POPUP, reinterpret_cast<UINT_PTR>(hMonoMenu), "Convert to &Mono"); + } } // "Trim" menu item is responding differently if there's no selection, // but a loop present: "trim around loop point"! (jojo in topic 2258) - std::string sTrimMenuText = "Trim"; + std::string sTrimMenuText = "T&rim"; bool bIsGrayed = ( (m_dwEndSel<=m_dwBeginSel) || (m_dwEndSel - m_dwBeginSel < MIN_TRIM_LENGTH) || (m_dwEndSel - m_dwBeginSel == sample.nLength) ); @@ -1554,13 +1565,13 @@ ::AppendMenu(hMenu, MF_STRING|(bIsGrayed) ? MF_GRAYED : 0, ID_SAMPLE_TRIM, sTrimMenuText.c_str()); if((m_dwBeginSel == 0 && m_dwEndSel != 0) || (m_dwBeginSel < sample.nLength && m_dwEndSel == sample.nLength)) { - ::AppendMenu(hMenu, MF_STRING, ID_SAMPLE_QUICKFADE, "Quick fade\t" + ih->GetKeyTextFromCommand(kcSampleQuickFade)); + ::AppendMenu(hMenu, MF_STRING, ID_SAMPLE_QUICKFADE, "Quick &fade\t" + ih->GetKeyTextFromCommand(kcSampleQuickFade)); } - ::AppendMenu(hMenu, MF_STRING, ID_EDIT_CUT, "Cut\t" + ih->GetKeyTextFromCommand(kcEditCut)); - ::AppendMenu(hMenu, MF_STRING, ID_EDIT_COPY, "Copy\t" + ih->GetKeyTextFromCommand(kcEditCopy)); + ::AppendMenu(hMenu, MF_STRING, ID_EDIT_CUT, "Cu&t\t" + ih->GetKeyTextFromCommand(kcEditCut)); + ::AppendMenu(hMenu, MF_STRING, ID_EDIT_COPY, "&Copy\t" + ih->GetKeyTextFromCommand(kcEditCopy)); } - ::AppendMenu(hMenu, MF_STRING, ID_EDIT_PASTE, "Paste\t" + ih->GetKeyTextFromCommand(kcEditPaste)); - ::AppendMenu(hMenu, MF_STRING | (pModDoc->GetSampleUndo().CanUndo(m_nSample) ? 0 : MF_GRAYED), ID_EDIT_UNDO, "Undo\t" + ih->GetKeyTextFromCommand(kcEditUndo)); + ::AppendMenu(hMenu, MF_STRING, ID_EDIT_PASTE, "&Paste\t" + ih->GetKeyTextFromCommand(kcEditPaste)); + ::AppendMenu(hMenu, MF_STRING | (pModDoc->GetSampleUndo().CanUndo(m_nSample) ? 0 : MF_GRAYED), ID_EDIT_UNDO, "&Undo\t" + ih->GetKeyTextFromCommand(kcEditUndo)); ClientToScreen(&pt); ::TrackPopupMenu(hMenu, TPM_LEFTALIGN|TPM_RIGHTBUTTON, pt.x, pt.y, 0, m_hWnd, NULL); ::DestroyMenu(hMenu); @@ -2063,8 +2074,8 @@ } -void CViewSample::OnMonoConvert() -//------------------------------- +void CViewSample::OnMonoConvert(ctrlSmp::StereoToMonoMode convert) +//---------------------------------------------------------------- { CModDoc *pModDoc = GetDocument(); BeginWaitCursor(); @@ -2072,11 +2083,58 @@ { CSoundFile *pSndFile = pModDoc->GetSoundFile(); ModSample &sample = pSndFile->GetSample(m_nSample); - if(sample.GetNumChannels() > 1&& sample.pSample != nullptr && sample.nLength != 0) + if(sample.GetNumChannels() > 1 && sample.pSample != nullptr && sample.nLength != 0) { + SAMPLEINDEX rightSmp = SAMPLEINDEX_INVALID; + if(convert == ctrlSmp::splitSample) + { + // Split sample into two slots + rightSmp = pModDoc->InsertSample(true); + if(rightSmp != SAMPLEINDEX_INVALID) + { + pSndFile->ReadSampleFromSong(rightSmp, pSndFile, m_nSample); + } else + { + return; + } + } + pModDoc->GetSampleUndo().PrepareUndo(m_nSample, sundo_replace); - if(ctrlSmp::ConvertToMono(sample, pSndFile)) + + if(ctrlSmp::ConvertToMono(sample, pSndFile, convert)) { + if(convert == ctrlSmp::splitSample) + { + // Split mode: We need to convert the right channel as well! + ModSample &right = pSndFile->GetSample(rightSmp); + ctrlSmp::ConvertToMono(right, pSndFile, ctrlSmp::onlyRight); + + // Try to create a new instrument as well which maps to the right sample. + INSTRUMENTINDEX ins = pModDoc->FindSampleParent(m_nSample); + if(ins != INSTRUMENTINDEX_INVALID) + { + INSTRUMENTINDEX rightIns = pModDoc->InsertInstrument(0, ins); + if(rightIns != INSTRUMENTINDEX_INVALID) + { + for(size_t i = 0; i < CountOf(pSndFile->Instruments[rightIns]->Keyboard); i++) + { + if(pSndFile->Instruments[rightIns]->Keyboard[i] == m_nSample) + { + pSndFile->Instruments[rightIns]->Keyboard[i] = rightSmp; + } + } + } + } + + // Finally, adjust sample panning + if(pSndFile->GetType() & (MOD_TYPE_IT | MOD_TYPE_MPT | MOD_TYPE_XM)) + { + sample.uFlags.set(CHN_PANNING); + sample.nPan = 0; + right.uFlags.set(CHN_PANNING); + right.nPan = 256; + } + } pModDoc->SetModified(); pModDoc->UpdateAllViews(NULL, (m_nSample << HINT_SHIFT_SMP) | HINT_SAMPLEDATA | HINT_SAMPLEINFO, NULL); } else Modified: trunk/OpenMPT/mptrack/View_smp.h =================================================================== --- trunk/OpenMPT/mptrack/View_smp.h 2012-11-20 20:18:02 UTC (rev 1435) +++ trunk/OpenMPT/mptrack/View_smp.h 2012-11-21 00:08:35 UTC (rev 1436) @@ -17,6 +17,8 @@ #define SMP_LEFTBAR_BUTTONS 8 +#include "modsmp_ctrl.h" + //====================================== class CViewSample: public CModScrollView //====================================== @@ -85,6 +87,8 @@ void AdjustLoopPoints(UINT &loopStart, UINT &loopEnd, UINT length) const; + void OnMonoConvert(ctrlSmp::StereoToMonoMode convert); + public: //{{AFX_VIRTUAL(CViewSample) virtual void OnDraw(CDC *); @@ -130,7 +134,10 @@ afx_msg void OnSetLoop(); afx_msg void OnSetSustainLoop(); afx_msg void On8BitConvert(); - afx_msg void OnMonoConvert(); + afx_msg void OnMonoConvertMix() { OnMonoConvert(ctrlSmp::mixChannels); } + afx_msg void OnMonoConvertLeft() { OnMonoConvert(ctrlSmp::onlyLeft); } + afx_msg void OnMonoConvertRight() { OnMonoConvert(ctrlSmp::onlyRight); } + afx_msg void OnMonoConvertSplit() { OnMonoConvert(ctrlSmp::splitSample); } afx_msg void OnSampleTrim(); afx_msg void OnPrevInstrument(); afx_msg void OnNextInstrument(); Modified: trunk/OpenMPT/mptrack/resource.h =================================================================== --- trunk/OpenMPT/mptrack/resource.h 2012-11-20 20:18:02 UTC (rev 1435) +++ trunk/OpenMPT/mptrack/resource.h 2012-11-21 00:08:35 UTC (rev 1436) @@ -1210,6 +1210,9 @@ #define ID_ORDERLIST_LOCKPLAYBACK 44603 #define ID_ORDERLIST_UNLOCKPLAYBACK 44604 #define ID_TRANSPOSE_CUSTOM 44605 +#define ID_SAMPLE_MONOCONVERT_LEFT 44606 +#define ID_SAMPLE_MONOCONVERT_RIGHT 44607 +#define ID_SAMPLE_MONOCONVERT_SPLIT 44608 // Next default values for new objects // @@ -1217,7 +1220,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 536 -#define _APS_NEXT_COMMAND_VALUE 44606 +#define _APS_NEXT_COMMAND_VALUE 44609 #define _APS_NEXT_CONTROL_VALUE 2441 #define _APS_NEXT_SYMED_VALUE 901 #endif Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.cpp =================================================================== --- trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2012-11-20 20:18:02 UTC (rev 1435) +++ trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2012-11-21 00:08:35 UTC (rev 1436) @@ -588,8 +588,8 @@ template <class T> -void ConvertStereoToMonoImpl(T* pDest, const SmpLength length) -//------------------------------------------------------------ +void ConvertStereoToMonoMixImpl(T* pDest, const SmpLength length) +//--------------------------------------------------------------- { const T* pEnd = pDest + length; for(T* pSource = pDest; pDest != pEnd; pDest++, pSource += 2) @@ -599,19 +599,46 @@ } +template <class T> +void ConvertStereoToMonoOneChannelImpl(T* pDest, const SmpLength length) +//---------------------------------------------------------------------- +{ + const T* pEnd = pDest + length; + for(T* pSource = pDest; pDest != pEnd; pDest++, pSource += 2) + { + *pDest = *pSource; + } +} + + // Convert a multichannel sample to mono (currently only implemented for stereo) -bool ConvertToMono(ModSample &smp, CSoundFile *pSndFile) -//------------------------------------------------------ +bool ConvertToMono(ModSample &smp, CSoundFile *pSndFile, StereoToMonoMode conversionMode) +//--------------------------------------------------------------------------------------- { if(smp.pSample == nullptr || smp.nLength == 0 || smp.GetNumChannels() != 2) return false; // Note: Sample is overwritten in-place! Unused data is not deallocated! - if(smp.GetElementarySampleSize() == 2) - ConvertStereoToMonoImpl(reinterpret_cast<int16*>(smp.pSample), smp.nLength); - else if(smp.GetElementarySampleSize() == 1) - ConvertStereoToMonoImpl(reinterpret_cast<int8*>(smp.pSample), smp.nLength); - else - return false; + if(conversionMode == mixChannels) + { + if(smp.GetElementarySampleSize() == 2) + ConvertStereoToMonoMixImpl(reinterpret_cast<int16 *>(smp.pSample), smp.nLength); + else if(smp.GetElementarySampleSize() == 1) + ConvertStereoToMonoMixImpl(reinterpret_cast<int8 *>(smp.pSample), smp.nLength); + else + return false; + } else + { + if(conversionMode == splitSample) + { + conversionMode = onlyLeft; + } + if(smp.GetElementarySampleSize() == 2) + ConvertStereoToMonoOneChannelImpl(reinterpret_cast<int16 *>(smp.pSample) + (conversionMode == onlyLeft ? 0 : 1), smp.nLength); + else if(smp.GetElementarySampleSize() == 1) + ConvertStereoToMonoOneChannelImpl(reinterpret_cast<int8 *>(smp.pSample) + (conversionMode == onlyLeft ? 0 : 1), smp.nLength); + else + return false; + } CriticalSection cs; smp.uFlags &= ~(CHN_STEREO); Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.h =================================================================== --- trunk/OpenMPT/soundlib/modsmp_ctrl.h 2012-11-20 20:18:02 UTC (rev 1435) +++ trunk/OpenMPT/soundlib/modsmp_ctrl.h 2012-11-21 00:08:35 UTC (rev 1436) @@ -74,8 +74,16 @@ // Crossfade sample data to create smooth loops bool XFadeSample(ModSample &smp, SmpLength iFadeLength, CSoundFile *pSndFile); +enum StereoToMonoMode +{ + mixChannels, + onlyLeft, + onlyRight, + splitSample, +}; + // Convert a sample with any number of channels to mono -bool ConvertToMono(ModSample &smp, CSoundFile *pSndFile); +bool ConvertToMono(ModSample &smp, CSoundFile *pSndFile, StereoToMonoMode conversionMode); } // Namespace ctrlSmp This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-11-23 17:22:01
|
Revision: 1438 http://modplug.svn.sourceforge.net/modplug/?rev=1438&view=rev Author: saga-games Date: 2012-11-23 17:21:54 +0000 (Fri, 23 Nov 2012) Log Message: ----------- [Imp] Sample Editor: Added shortcuts for 8-bit/mono conversion. [Mod] Updated DE_jojo.mkb Modified Paths: -------------- trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/CommandSet.h trunk/OpenMPT/mptrack/View_smp.cpp trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2012-11-21 22:41:54 UTC (rev 1437) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2012-11-23 17:21:54 UTC (rev 1438) @@ -639,6 +639,12 @@ DefineKeyCommand(kcChannelSplitRecordSelect, 1884, _T("Channel Split Record Select")); DefineKeyCommand(kcDataEntryUp, 1885, _T("Data Entry +1")); DefineKeyCommand(kcDataEntryDown, 1886, _T("Data Entry -1")); + DefineKeyCommand(kcSample8Bit, 1887, _T("Conver to 8-bit")); + DefineKeyCommand(kcSampleMonoMix, 1888, _T("Convert to Mono (Mix)")); + DefineKeyCommand(kcSampleMonoLeft, 1889, _T("Convert to Mono (Left Channel)")); + DefineKeyCommand(kcSampleMonoRight, 1890, _T("Convert to Mono (Right Channel)")); + DefineKeyCommand(kcSampleMonoSplit, 1891, _T("Convert to Mono (Split Sample)")); + // Add new key commands here. #ifdef _DEBUG Modified: trunk/OpenMPT/mptrack/CommandSet.h =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.h 2012-11-21 22:41:54 UTC (rev 1437) +++ trunk/OpenMPT/mptrack/CommandSet.h 2012-11-23 17:21:54 UTC (rev 1438) @@ -647,6 +647,11 @@ kcSampleZoomUp, kcSampleZoomDown, kcSampleZoomSelection, + kcSample8Bit, + kcSampleMonoMix, + kcSampleMonoLeft, + kcSampleMonoRight, + kcSampleMonoSplit, kcSampleInvert, kcSampleSignUnsign, kcSampleRemoveDCOffset, Modified: trunk/OpenMPT/mptrack/View_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_smp.cpp 2012-11-21 22:41:54 UTC (rev 1437) +++ trunk/OpenMPT/mptrack/View_smp.cpp 2012-11-23 17:21:54 UTC (rev 1438) @@ -44,7 +44,7 @@ // of trimming is nTrimLengthMin + 1. #define MIN_TRIM_LENGTH 16 -const UINT cLeftBarButtons[SMP_LEFTBAR_BUTTONS] = +const UINT cLeftBarButtons[SMP_LEFTBAR_BUTTONS] = { ID_SAMPLE_ZOOMUP, ID_SAMPLE_ZOOMDOWN, @@ -141,7 +141,7 @@ ModifyStyleEx(0, WS_EX_ACCEPTFILES); CModScrollView::OnInitialUpdate(); CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); - if (pMainFrm) + if (pMainFrm) { pMainFrm->SetInfoText(""); pMainFrm->SetXInfoText(""); //rewbs.xinfo @@ -154,7 +154,7 @@ //---------------------------------- { CModDoc *pModDoc = GetDocument(); - + GetClientRect(&m_rcClient); if (pModDoc) { @@ -242,10 +242,10 @@ BOOL CViewSample::SetZoom(UINT nZoom) //----------------------------------- { - - if (nZoom == m_nZoom) + + if (nZoom == m_nZoom) return TRUE; - if (nZoom > MAX_ZOOM) + if (nZoom > MAX_ZOOM) return FALSE; const UINT nZoomOld = m_nZoom; @@ -449,7 +449,7 @@ UpdateNcButtonState(); InvalidateSample(); } - + // sample drawing if(dwHintMask & HINT_SAMPLEINFO) { @@ -464,7 +464,7 @@ // Draw sample data, 1:1 ratio void CViewSample::DrawSampleData1(HDC hdc, int ymed, int cx, int cy, int len, int uFlags, PVOID pSampleData) //---------------------------------------------------------------------------------------------------------- -{ +{ int smplsize; int yrange = cy/2; signed char *psample = (signed char *)pSampleData; @@ -742,7 +742,7 @@ { for (int i=0; i<scanlen; i++) { - + int s = *p; if (s < smin) smin = s; if (s > smax) smax = s; @@ -774,15 +774,15 @@ void CViewSample::OnDraw(CDC *pDC) //-------------------------------- -{ +{ CRect rcClient = m_rcClient, rect, rc; CModDoc *pModDoc = GetDocument(); CSoundFile *pSndFile; HGDIOBJ oldpen; HDC hdc; - + UINT nSmpScrollPos = ScrollPosToSamplePos(); - + if ((!pModDoc) || (!pDC)) return; hdc = pDC->m_hDC; oldpen = ::SelectObject(hdc, CMainFrame::penBlack); @@ -793,7 +793,7 @@ const ModSample &sample = pSndFile->GetSample((m_nSample <= pSndFile->GetNumSamples()) ? m_nSample : 0); int ymed = (rect.top + rect.bottom) / 2; int yrange = (rect.bottom - rect.top) / 2; - + // Erase background if ((m_dwBeginSel < m_dwEndSel) && (m_dwEndSel > nSmpScrollPos)) { @@ -1022,7 +1022,7 @@ DWORD dwStyle = m_NcButtonState[nBtn]; COLORREF c3, c4; int xofs = 0, yofs = 0, nImage = 0; - + c1 = c2 = c3 = c4 = crFc; if (!(CMainFrame::GetSettings().m_dwPatternSetup & PATTERN_FLATBUTTONS)) { @@ -1115,13 +1115,13 @@ CModDoc *pModDoc = GetDocument(); CSoundFile *pSndFile; CDC *pDC = NULL; - + if (!pModDoc) return; pSndFile = pModDoc->GetSoundFile(); for (UINT i=0; i<SMP_LEFTBAR_BUTTONS; i++) if (cLeftBarButtons[i] != ID_SEPARATOR) { DWORD dwStyle = 0; - + if (m_nBtnMouseOver == i) { dwStyle |= NCBTNS_MOUSEOVER; @@ -1130,7 +1130,7 @@ switch(cLeftBarButtons[i]) { - case ID_SAMPLE_DRAW: + case ID_SAMPLE_DRAW: if(m_bDrawingEnabled) dwStyle |= NCBTNS_CHECKED; if(m_nSample > pSndFile->GetNumSamples() || pSndFile->GetSample(m_nSample).GetNumChannels() > 1 || @@ -1284,7 +1284,7 @@ CHAR s[64]; CModDoc *pModDoc = GetDocument(); CSoundFile *pSndFile; - + if ((m_nBtnMouseOver < SMP_LEFTBAR_BUTTONS) || (m_dwStatus & SMPSTATUS_NCLBTNDOWN)) { m_dwStatus &= ~SMPSTATUS_NCLBTNDOWN; @@ -1381,7 +1381,7 @@ SetSampleData<int16, uint16>(pSndFile->GetSample(m_nSample).pSample, point, old); else if(pSndFile->GetSample(m_nSample).GetElementarySampleSize() == 1) SetSampleData<int8, uint8>(pSndFile->GetSample(m_nSample).pSample, point, old); - + ctrlSmp::AdjustEndOfSample(pSndFile->GetSample(m_nSample), pSndFile); InvalidateSample(); @@ -1511,7 +1511,7 @@ wsprintf(s, "Set Loop End to:\t%d", dwPos); ::AppendMenu(hMenu, MF_STRING | (dwPos >= sample.nLoopStart + 4 ? 0 : MF_GRAYED), ID_SAMPLE_SETLOOPEND, s); - + if (pSndFile->GetType() & (MOD_TYPE_IT|MOD_TYPE_MPT)) { //Set sustain loop points @@ -1559,7 +1559,7 @@ (sample.nLoopEnd - sample.nLoopStart < sample.nLength) ) bIsGrayed = false; } - + sTrimMenuText += "\t" + ih->GetKeyTextFromCommand(kcSampleTrim); ::AppendMenu(hMenu, MF_STRING|(bIsGrayed) ? MF_GRAYED : 0, ID_SAMPLE_TRIM, sTrimMenuText.c_str()); @@ -1656,7 +1656,7 @@ LRESULT CViewSample::OnNcHitTest(CPoint point) #else UINT CViewSample::OnNcHitTest(CPoint point) -#endif +#endif //----------------------------------------- { CRect rect; @@ -1920,7 +1920,7 @@ psh->dwSamplePeriod = 22675; if (sample.nC5Speed > 256) psh->dwSamplePeriod = 1000000000 / sample.nC5Speed; psh->dwBaseNote = 60; - + // Write loops WAVESAMPLERINFO *psmpl = (WAVESAMPLERINFO *)psh; MemsetZero(psmpl->wsiLoops); @@ -1992,7 +1992,7 @@ CSoundFile *pSndFile = pModDoc->GetSoundFile(); DWORD dwMemSize = GlobalSize(hCpy); - + CriticalSection cs; ModSample &sample = pSndFile->GetSample(m_nSample); @@ -2176,7 +2176,7 @@ CriticalSection cs; - + // Note: Sample is overwritten in-place! Unused data is not deallocated! const UINT bend = nEnd * sample.GetBytesPerSample() , bstart = nStart * sample.GetBytesPerSample(); signed char *p = (signed char *)sample.pSample; @@ -2202,7 +2202,7 @@ sample.uFlags &= ~(CHN_SUSTAINLOOP|CHN_PINGPONGSUSTAIN); } sample.nLength = nEnd; - + cs.Leave(); pModDoc->SetModified(); @@ -2229,7 +2229,7 @@ if (note >= NOTE_MIN_SPECIAL) { pModDoc->NoteOff(0, (note == NOTE_NOTECUT)); - } + } else { CHAR s[64]; @@ -2329,7 +2329,7 @@ bCanDrop = ((lpDropInfo->dwDropItem < MAX_DLS_BANKS) && (CTrackApp::gpDLSBanks[lpDropInfo->dwDropItem])); break; - + case DRAGONDROP_SOUNDFILE: case DRAGONDROP_MIDIINSTR: bCanDrop = ((lpDropInfo->lDropParam) @@ -2388,7 +2388,7 @@ case DRAGONDROP_SOUNDFILE: SendCtrlMessage(CTRLMSG_SMP_OPENFILE, (LPARAM)lpDropInfo->lDropParam); break; - + case DRAGONDROP_DLS: { CDLSBank *pDLSBank = CTrackApp::gpDLSBanks[lpDropInfo->dwDropItem]; @@ -2705,24 +2705,24 @@ if (pMsg) { //We handle keypresses before Windows has a chance to handle them (for alt etc..) - if ((pMsg->message == WM_SYSKEYUP) || (pMsg->message == WM_KEYUP) || + if ((pMsg->message == WM_SYSKEYUP) || (pMsg->message == WM_KEYUP) || (pMsg->message == WM_SYSKEYDOWN) || (pMsg->message == WM_KEYDOWN)) { CInputHandler* ih = (CMainFrame::GetMainFrame())->GetInputHandler(); - + //Translate message manually UINT nChar = pMsg->wParam; UINT nRepCnt = LOWORD(pMsg->lParam); UINT nFlags = HIWORD(pMsg->lParam); KeyEventType kT = ih->GetKeyEventType(nFlags); InputTargetContext ctx = (InputTargetContext)(kCtxViewSamples); - + if (ih->KeyEvent(ctx, nChar, nRepCnt, nFlags, kT) != kcNull) return true; // Mapped to a command, no need to pass message on. } } - + return CModScrollView::PreTranslateMessage(pMsg); } @@ -2731,11 +2731,11 @@ { if (wParam == kcNull) return NULL; - - CModDoc *pModDoc = GetDocument(); + + CModDoc *pModDoc = GetDocument(); if (!pModDoc) return NULL; - - //CSoundFile *pSndFile = pModDoc->GetSoundFile(); + + //CSoundFile *pSndFile = pModDoc->GetSoundFile(); CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); switch(wParam) @@ -2752,11 +2752,16 @@ case kcEditCopy: OnEditCopy(); return wParam; case kcEditPaste: OnEditPaste(); return wParam; case kcEditUndo: OnEditUndo(); return wParam; + case kcSample8Bit: On8BitConvert(); return wParam; + case kcSampleMonoMix: OnMonoConvertMix(); return wParam; + case kcSampleMonoLeft: OnMonoConvertLeft(); return wParam; + case kcSampleMonoRight: OnMonoConvertRight(); return wParam; + case kcSampleMonoSplit: OnMonoConvertSplit(); return wParam; case kcSampleLoad: PostCtrlMessage(IDC_SAMPLE_OPEN); return wParam; case kcSampleSave: PostCtrlMessage(IDC_SAMPLE_SAVEAS); return wParam; case kcSampleNew: PostCtrlMessage(IDC_SAMPLE_NEW); return wParam; - + case kcSampleReverse: PostCtrlMessage(IDC_SAMPLE_REVERSE); return wParam; case kcSampleSilence: PostCtrlMessage(IDC_SAMPLE_SILENCE); return wParam; case kcSampleNormalize: PostCtrlMessage(IDC_SAMPLE_NORMALIZE); return wParam; @@ -2831,7 +2836,7 @@ // If auto-zoom is not the smallest zoom, move auto-zoom index(=zero) // to the right position in the zoom order. - if (nAutoZoomLevel < MAX_ZOOM + 1) + if (nAutoZoomLevel < MAX_ZOOM + 1) { UINT* p = std::find(zoomOrder, pZoomOrderEnd, nAutoZoomLevel); if (p != pZoomOrderEnd) @@ -2863,4 +2868,4 @@ m_nGridSegments = dlg.m_nSegments; InvalidateSample(); } -} +} \ No newline at end of file Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2012-11-21 22:41:54 UTC (rev 1437) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2012-11-23 17:21:54 UTC (rev 1438) @@ -106,6 +106,8 @@ 2:1009:3:81:5 //Transpose +12: Shift+Ctrl+Q (KeyDown|KeyHold) 2:1010:3:65:5 //Transpose -12: Shift+Ctrl+A (KeyDown|KeyHold) 2:1881:2:84:1 //Transpose Custom: Ctrl+T (KeyDown) +2:1885:2:107:1 //Data Entry +1: Ctrl++ (ZEHNERTASTATUR) (KeyDown) +2:1886:2:189:1 //Data Entry -1: Ctrl+- (KeyDown) 2:1012:2:77:1 //Amplify selection: Ctrl+M (KeyDown) 2:1014:2:74:1 //Interpolate Volume: Ctrl+J (KeyDown) 2:1015:2:75:1 //Interpolate Effect: Ctrl+K (KeyDown) @@ -289,11 +291,17 @@ 8:1386:0:107:1 //Zoom Out: + (ZEHNERTASTATUR) (KeyDown) 8:1387:0:109:1 //Zoom In: - (ZEHNERTASTATUR) (KeyDown) 8:1882:0:32:1 //Zoom into Selection: LEER (KeyDown) +8:1887:2:56:1 //Conver to 8-bit: Ctrl+8 (KeyDown) +8:1888:1:77:1 //Convert to Mono (Mix): Shift+M (KeyDown) +8:1889:1:76:1 //Convert to Mono (Left Channel): Shift+L (KeyDown) +8:1890:1:82:1 //Convert to Mono (Right Channel): Shift+R (KeyDown) +8:1891:1:83:1 //Convert to Mono (Split Sample): Shift+S (KeyDown) 8:1784:2:73:1 //Invert Sample Phase: Ctrl+I (KeyDown) 8:1785:2:85:1 //Signed / Unsigned Conversion: Ctrl+U (KeyDown) 8:1790:2:69:1 //Remove DC Offset: Ctrl+E (KeyDown) 8:1856:2:68:1 //Quick Fade: Ctrl+D (KeyDown) 8:1857:2:76:1 //Crossfade Sample Loop: Ctrl+L (KeyDown) +8:1863:1:84:1 //Tune Sample to given Note: Shift+T (KeyDown) //----( Instrument Context [bottom] (9) )------------ 9:1837:0:107:5 //Zoom In: + (ZEHNERTASTATUR) (KeyDown|KeyHold) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-12-06 22:27:19
|
Revision: 1446 http://sourceforge.net/p/modplug/code/1446 Author: saga-games Date: 2012-12-06 22:27:14 +0000 (Thu, 06 Dec 2012) Log Message: ----------- [Mod] Added quantize shortcut and fixed data entry shortcuts in DE_jojo.mkb [Fix] Fixed crash when loading some DLS samples. Modified Paths: -------------- trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb trunk/OpenMPT/soundlib/WAVTools.cpp Modified: trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb =================================================================== --- trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2012-12-06 22:23:00 UTC (rev 1445) +++ trunk/OpenMPT/packageTemplate/extraKeymaps/DE_jojo.mkb 2012-12-06 22:27:14 UTC (rev 1446) @@ -97,6 +97,7 @@ 2:1772:2:93:1 //Show Pattern Properties: Ctrl+ANWENDUNG (KeyDown) 2:1819:2:69:1 //Split Keyboard Settings dialog: Ctrl+E (KeyDown) 2:1780:2:80:1 //Show playback time at current row: Ctrl+P (KeyDown) +2:1892:4:81:1 //Quantize Settings: Alt+Q (KeyDown) 2:1005:2:85:1 //Mute current Channel: Ctrl+U (KeyDown) 2:1883:2:49:1 //Channel Record Select: Ctrl+1 (KeyDown) 2:1884:2:50:1 //Channel Split Record Select: Ctrl+2 (KeyDown) @@ -106,8 +107,10 @@ 2:1009:3:81:5 //Transpose +12: Shift+Ctrl+Q (KeyDown|KeyHold) 2:1010:3:65:5 //Transpose -12: Shift+Ctrl+A (KeyDown|KeyHold) 2:1881:2:84:1 //Transpose Custom: Ctrl+T (KeyDown) -2:1885:2:107:1 //Data Entry +1: Ctrl++ (ZEHNERTASTATUR) (KeyDown) -2:1886:2:189:1 //Data Entry -1: Ctrl+- (KeyDown) +2:1885:2:107:5 //Data Entry +1: Ctrl++ (ZEHNERTASTATUR) (KeyDown|KeyHold) +2:1885:2:187:5 //Data Entry +1: Ctrl++ (KeyDown|KeyHold) +2:1886:2:109:5 //Data Entry -1: Ctrl+- (ZEHNERTASTATUR) (KeyDown|KeyHold) +2:1886:2:189:5 //Data Entry -1: Ctrl+- (KeyDown|KeyHold) 2:1012:2:77:1 //Amplify selection: Ctrl+M (KeyDown) 2:1014:2:74:1 //Interpolate Volume: Ctrl+J (KeyDown) 2:1015:2:75:1 //Interpolate Effect: Ctrl+K (KeyDown) Modified: trunk/OpenMPT/soundlib/WAVTools.cpp =================================================================== --- trunk/OpenMPT/soundlib/WAVTools.cpp 2012-12-06 22:23:00 UTC (rev 1445) +++ trunk/OpenMPT/soundlib/WAVTools.cpp 2012-12-06 22:27:14 UTC (rev 1446) @@ -116,7 +116,7 @@ if(isDLS) { // DLS sample -> sample filename - strncpy(sample.filename, sampleName, CountOf(sample.filename)); + strncpy(sample.filename, sampleName, CountOf(sample.filename) - 1); StringFixer::SetNullTerminator(sample.filename); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-12-09 16:04:57
|
Revision: 1448 http://sourceforge.net/p/modplug/code/1448 Author: saga-games Date: 2012-12-09 16:04:46 +0000 (Sun, 09 Dec 2012) Log Message: ----------- [New] Sample Editor: Can now load and save FLAC samples. TODO: Add FLAC project files for VS2008. Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/mptrack/MPTRACK_10.sln trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/mptrack/mptrack_10.vcxproj trunk/OpenMPT/mptrack/version.h trunk/OpenMPT/soundlib/SampleFormatConverters.h trunk/OpenMPT/soundlib/SampleFormats.cpp trunk/OpenMPT/soundlib/Sndfile.h trunk/OpenMPT/soundlib/WAVTools.cpp trunk/OpenMPT/soundlib/WAVTools.h Added Paths: ----------- trunk/OpenMPT/include/flac/ trunk/OpenMPT/include/flac/AUTHORS trunk/OpenMPT/include/flac/COPYING.FDL trunk/OpenMPT/include/flac/COPYING.GPL trunk/OpenMPT/include/flac/COPYING.Xiph trunk/OpenMPT/include/flac/README trunk/OpenMPT/include/flac/include/ trunk/OpenMPT/include/flac/include/FLAC/ trunk/OpenMPT/include/flac/include/FLAC/all.h trunk/OpenMPT/include/flac/include/FLAC/assert.h trunk/OpenMPT/include/flac/include/FLAC/callback.h trunk/OpenMPT/include/flac/include/FLAC/export.h trunk/OpenMPT/include/flac/include/FLAC/format.h trunk/OpenMPT/include/flac/include/FLAC/metadata.h trunk/OpenMPT/include/flac/include/FLAC/ordinals.h trunk/OpenMPT/include/flac/include/FLAC/stream_decoder.h trunk/OpenMPT/include/flac/include/FLAC/stream_encoder.h trunk/OpenMPT/include/flac/include/share/ trunk/OpenMPT/include/flac/include/share/alloc.h trunk/OpenMPT/include/flac/include/share/getopt.h trunk/OpenMPT/include/flac/include/share/grabbag/ trunk/OpenMPT/include/flac/include/share/grabbag/cuesheet.h trunk/OpenMPT/include/flac/include/share/grabbag/file.h trunk/OpenMPT/include/flac/include/share/grabbag/picture.h trunk/OpenMPT/include/flac/include/share/grabbag/replaygain.h trunk/OpenMPT/include/flac/include/share/grabbag/seektable.h trunk/OpenMPT/include/flac/include/share/grabbag.h trunk/OpenMPT/include/flac/include/share/replaygain_analysis.h trunk/OpenMPT/include/flac/include/share/replaygain_synthesis.h trunk/OpenMPT/include/flac/include/share/utf8.h trunk/OpenMPT/include/flac/lib/ trunk/OpenMPT/include/flac/src/ trunk/OpenMPT/include/flac/src/libFLAC/ trunk/OpenMPT/include/flac/src/libFLAC/bitmath.c trunk/OpenMPT/include/flac/src/libFLAC/bitreader.c trunk/OpenMPT/include/flac/src/libFLAC/bitwriter.c trunk/OpenMPT/include/flac/src/libFLAC/cpu.c trunk/OpenMPT/include/flac/src/libFLAC/crc.c trunk/OpenMPT/include/flac/src/libFLAC/fixed.c trunk/OpenMPT/include/flac/src/libFLAC/float.c trunk/OpenMPT/include/flac/src/libFLAC/format.c trunk/OpenMPT/include/flac/src/libFLAC/include/ trunk/OpenMPT/include/flac/src/libFLAC/include/private/ trunk/OpenMPT/include/flac/src/libFLAC/include/private/all.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/bitmath.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/bitreader.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/bitwriter.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/cpu.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/crc.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/fixed.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/float.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/format.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/lpc.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/md5.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/memory.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/metadata.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/stream_encoder_framing.h trunk/OpenMPT/include/flac/src/libFLAC/include/private/window.h trunk/OpenMPT/include/flac/src/libFLAC/include/protected/ trunk/OpenMPT/include/flac/src/libFLAC/include/protected/all.h trunk/OpenMPT/include/flac/src/libFLAC/include/protected/stream_decoder.h trunk/OpenMPT/include/flac/src/libFLAC/include/protected/stream_encoder.h trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_10.vcxproj trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_10.vcxproj.filters trunk/OpenMPT/include/flac/src/libFLAC/lpc.c trunk/OpenMPT/include/flac/src/libFLAC/md5.c trunk/OpenMPT/include/flac/src/libFLAC/memory.c trunk/OpenMPT/include/flac/src/libFLAC/metadata_iterators.c trunk/OpenMPT/include/flac/src/libFLAC/metadata_object.c trunk/OpenMPT/include/flac/src/libFLAC/stream_decoder.c trunk/OpenMPT/include/flac/src/libFLAC/stream_encoder.c trunk/OpenMPT/include/flac/src/libFLAC/stream_encoder_framing.c trunk/OpenMPT/include/flac/src/libFLAC/window.c Property changes on: trunk/OpenMPT/include/flac ___________________________________________________________________ Added: tsvn:logminsize + 10 Added: trunk/OpenMPT/include/flac/AUTHORS =================================================================== --- trunk/OpenMPT/include/flac/AUTHORS (rev 0) +++ trunk/OpenMPT/include/flac/AUTHORS 2012-12-09 16:04:46 UTC (rev 1448) @@ -0,0 +1,41 @@ +/* FLAC - Free Lossless Audio Codec + * Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * + * This file is part the FLAC project. FLAC is comprised of several + * components distributed under difference licenses. The codec libraries + * are distributed under Xiph.Org's BSD-like license (see the file + * COPYING.Xiph in this distribution). All other programs, libraries, and + * plugins are distributed under the GPL (see COPYING.GPL). The documentation + * is distributed under the Gnu FDL (see COPYING.FDL). Each file in the + * FLAC distribution contains at the top the terms under which it may be + * distributed. + * + * Since this particular file is relevant to all components of FLAC, + * it may be distributed under the Xiph.Org license, which is the least + * restrictive of those mentioned above. See the file COPYING.Xiph in this + * distribution. + */ + + +FLAC (http://flac.sourceforge.net/) is an Open Source lossless audio +codec developed by Josh Coalson <jco...@us...>. + +Other major contributors and their contributions: +"Andrey Astafiev" <an...@tv...> +* Russian translation of the HTML documentation + +"Miroslav Lichvar" <lic...@ph...> +* IA-32 assembly versions of several libFLAC routines + +"Brady Patterson" <bp...@us...> +* AIFF file support, PPC assembly versions of libFLAC routines + +"Daisuke Shimamura" <Dai...@ni...> +* i18n support in the XMMS plugin + +"X-Fixer" <x-...@na...> +* Configuration system, tag editing, and file info in the Winamp2 plugin + +"Matt Zimmerman" <md...@de...> +* Libtool/autoconf/automake make system, flac man page + Added: trunk/OpenMPT/include/flac/COPYING.FDL =================================================================== --- trunk/OpenMPT/include/flac/COPYING.FDL (rev 0) +++ trunk/OpenMPT/include/flac/COPYING.FDL 2012-12-09 16:04:46 UTC (rev 1448) @@ -0,0 +1,397 @@ + GNU Free Documentation License + Version 1.2, November 2002 + + + Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +functional and useful document "free" in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The "Document", below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as "you". You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (Thus, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML, PostScript or PDF designed for human modification. Examples of +transparent image formats include PNG, XCF and JPG. Opaque formats +include proprietary formats that can be read and edited only by +proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML, PostScript or PDF produced by some word +processors for output purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + +A section "Entitled XYZ" means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as "Acknowledgements", +"Dedications", "Endorsements", or "History".) To "Preserve the Title" +of such a section when you modify the Document means that it remains a +section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. + + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document's license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has fewer than five), + unless they release you from this requirement. +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section Entitled "History", Preserve its Title, and add + to it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section Entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. For any section Entitled "Acknowledgements" or "Dedications", + Preserve the Title of the section, and preserve in the section all + the substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section Entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section to be Entitled "Endorsements" + or to conflict in title with any Invariant Section. +O. Preserve any Warranty Disclaimers. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" +in the various original documents, forming one section Entitled +"History"; likewise combine any sections Entitled "Acknowledgements", +and any sections Entitled "Dedications". You must delete all sections +Entitled "Endorsements". + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an "aggregate" if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation's users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document's Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", +"Dedications", or "History", the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. + + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.2 + or any later version published by the Free Software Foundation; + with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. + A copy of the license is included in the section entitled "GNU + Free Documentation License". + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. + +If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. Added: trunk/OpenMPT/include/flac/COPYING.GPL =================================================================== --- trunk/OpenMPT/include/flac/COPYING.GPL (rev 0) +++ trunk/OpenMPT/include/flac/COPYING.GPL 2012-12-09 16:04:46 UTC (rev 1448) @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) 19yy <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Added: trunk/OpenMPT/include/flac/COPYING.Xiph =================================================================== --- trunk/OpenMPT/include/flac/COPYING.Xiph (rev 0) +++ trunk/OpenMPT/include/flac/COPYING.Xiph 2012-12-09 16:04:46 UTC (rev 1448) @@ -0,0 +1,28 @@ +Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of the Xiph.org Foundation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Added: trunk/OpenMPT/include/flac/README =================================================================== --- trunk/OpenMPT/include/flac/README (rev 0) +++ trunk/OpenMPT/include/flac/README 2012-12-09 16:04:46 UTC (rev 1448) @@ -0,0 +1,254 @@ +/* FLAC - Free Lossless Audio Codec + * Copyright (C) 2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * + * This file is part the FLAC project. FLAC is comprised of several + * components distributed under difference licenses. The codec libraries + * are distributed under Xiph.Org's BSD-like license (see the file + * COPYING.Xiph in this distribution). All other programs, libraries, and + * plugins are distributed under the LGPL or GPL (see COPYING.LGPL and + * COPYING.GPL). The documentation is distributed under the Gnu FDL (see + * COPYING.FDL). Each file in the FLAC distribution contains at the top the + * terms under which it may be distributed. + * + * Since this particular file is relevant to all components of FLAC, + * it may be distributed under the Xiph.Org license, which is the least + * restrictive of those mentioned above. See the file COPYING.Xiph in this + * distribution. + */ + + +FLAC (http://flac.sourceforge.net/) is an Open Source lossless audio +codec developed by Josh Coalson. + +FLAC is comprised of + * `libFLAC', a library which implements reference encoders and + decoders for native FLAC and Ogg FLAC, and a metadata interface + * `libFLAC++', a C++ object wrapper library around libFLAC + * `flac', a command-line program for encoding and decoding files + * `metaflac', a command-line program for viewing and editing FLAC + metadata + * player plugins for XMMS and Winamp + * user and API documentation + +The libraries (libFLAC, libFLAC++) are +licensed under Xiph.org's BSD-like license (see COPYING.Xiph). All other +programs and plugins are licensed under the GNU General Public License +(see COPYING.GPL). The documentation is licensed under the GNU Free +Documentation License (see COPYING.FDL). + + +=============================================================================== +FLAC - 1.2.1 - Contents +=============================================================================== + +- Introduction +- Prerequisites +- Note to embedded developers +- Building in a GNU environment +- Building with Makefile.lite +- Building with MSVC +- Building on Mac OS X + + +=============================================================================== +Introduction +=============================================================================== + +This is the source release for the FLAC project. See + + doc/html/index.html + +for full documentation. + +A brief description of the directory tree: + + doc/ the HTML documentation + include/ public include files for libFLAC and libFLAC++ + man/ the man page for `flac' + src/ the source code and private headers + test/ the test scripts + + +=============================================================================== +Prerequisites +=============================================================================== + +To build FLAC with support for Ogg FLAC you must have built and installed +libogg according to the specific instructions below. You must have +libogg 1.1.2 or greater, or there will be seeking problems with Ogg FLAC. + +If you are building on x86 and want the assembly optimizations, you will +need to have NASM >= 0.98.30 installed according to the specific instructions +below. + + +=============================================================================== +Note to embedded developers +=============================================================================== + +libFLAC has grown larger over time as more functionality has been +included, but much of it may be unnecessary for a particular embedded +implementation. Unused parts may be pruned by some simple editing of +configure.in and src/libFLAC/Makefile.am; the following dependency +graph shows which modules may be pruned without breaking things +further down: + +metadata.h + stream_decoder.h + format.h + +stream_encoder.h + stream_decoder.h + format.h + +stream_decoder.h + format.h + +In other words, for pure decoding applications, both the stream encoder +and metadata editing interfaces can be safely removed. + +There is a section dedicated to embedded use in the libFLAC API +HTML documentation (see doc/html/api/index.html). + +Also, there are several places in the libFLAC code with comments marked +with "OPT:" where a #define can be changed to enable code that might be +faster on a specific platform. Experimenting with these can yield faster +binaries. + + +=============================================================================== +Building in a GNU environment +=============================================================================== + +FLAC uses autoconf and libtool for configuring and building. +Better documentation for these will be forthcoming, but in +general, this should work: + +./configure && make && make check && make install + +The 'make check' step is optional; omit it to skip all the tests, +which can take several hours and use around 70-80 megs of disk space. +Even though it will stop with an explicit message on any failure, it +does print out a lot of stuff so you might want to capture the output +to a file if you're having a problem. Also, don't run 'make check' +as root because it confuses some of the tests. + +NOTE: Despite our best efforts it's entirely possible to have +problems when using older versions of autoconf, automake, or +libtool. If you have the latest versions and still can't get it +to work, see the next section on Makefile.lite. + +There are a few FLAC-specific arguments you can give to +`configure': + +--enable-debug : Builds everything with debug symbols and some +extra (and more verbose) error checking. + +--disable-asm-optimizations : Disables the compilation of the +assembly routines. Many routines have assembly versions for +speed and `configure' is pretty good about knowing what is +supported, but you can use this option to build only from the +C sources. May be necessary for building on OS X (Intel) + +--enable-sse : If you are building for an x86 CPU that supports +SSE instructions, you can enable some of the faster routines +if your operating system also supports SSE instructions. flac +can tell if the CPU supports the instructions but currently has +no way to test if the OS does, so if it does, you must pass +this argument to configure to use the SSE routines. If flac +crashes when built with this option you will have to go back and +configure without --enable-sse. Note that +--disable-asm-optimizations implies --disable-sse. + +--enable-local-xmms-plugin : Installs the FLAC XMMS plugin in +$HOME/.xmms/Plugins, instead of the global XMMS plugin area +(usually /usr/lib/xmms/Input). + +--with-ogg= +--with-xmms-prefix= +--with-libiconv-prefix= +Use these if you have these packages but configure can't find them. + +If you want to build completely from scratch (i.e. starting with just +configure.in and Makefile.am) you should be able to just run 'autogen.sh' +but make sure and read the comments in that file first. + + +=============================================================================== +Building with Makefile.lite +=============================================================================== + +There is a more lightweight build system for do-it-yourself-ers. +It is also useful if configure isn't working, which may be the +case since lately we've had some problems with different versions +of automake and libtool. The Makefile.lite system should work +on GNU systems with few or no adjustments. + +From the top level just 'make -f Makefile.lite'. You can +specify zero or one optional target from 'release', 'debug', +'test', or 'clean'. The default is 'release'. There is no +'install' target but everything you need will end up in the +obj/ directory. + +If you are not on an x86 system or you don't have nasm, you +may have to change the DEFINES in src/libFLAC/Makefile.lite. If +you don't have nasm, remove -DFLAC__HAS_NASM. If your target is +not an x86, change -DFLAC__CPU_IA32 to -DFLAC__CPU_UNKNOWN. + + +=============================================================================== +Building with MSVC +=============================================================================== + +There are .dsp projects and a master FLAC.dsw workspace to build all +the libraries and executables with MSVC6. There are also .vcproj +projects and a master FLAC.sln solution to build all the libraries and +executables with VC++ 2005. + +Prerequisite: you must have the Ogg libraries installed as described +later. + +Prerequisite: you must have nasm installed, and nasmw.exe must be in +your PATH, or the path to nasmw.exe must be added to the list of +directories for executable files in the MSVC global options. + +MSVC6: +To build everything, run Developer Studio, do File|Open Workspace, +and open FLAC.dsw. Select "Build | Set active configuration..." +from the menu, then in the dialog, select "All - Win32 Release" (or +Debug if you prefer). Click "Ok" then hit F7 to build. + +VC++ 2005: +To build everything, run Visual Studio, do File|Open and open FLAC.sln. +From the dropdown in the toolbar, select "Release" instead of "Debug", +then hit F7 to build. + +Either way, this will build all libraries both statically (e.g. +obj\release\lib\libFLAC_static.lib) and as DLLs (e.g. +obj\release\lib\libFLAC.dll), and it will build all binaries, statically +linked (e.g. obj\release\bin\flac.exe). + +Everything will end up in the "obj" directory. DLLs and .exe files +are all that are needed and can be copied to an installation area and +added to the PATH. The plugins have to be copied to their appropriate +place in the player area. For Winamp2 this is <winamp2-dir>\Plugins. + +By default the code is configured with Ogg support. Before building FLAC +you will need to get the Ogg source distribution +(see http://xiph.org/ogg/vorbis/download/), build ogg_static.lib (load and +build win32\ogg_static.dsp), copy ogg_static.lib into FLAC's +'obj\release\lib' directory, and copy the entire include\ogg tree into +FLAC's 'include' directory (so that there is an 'ogg' directory in FLAC's +'include' directory with the files ogg.h, os_types.h and config_types.h). + +If you want to build without Ogg support, instead edit all .dsp or +.vcproj files and remove any occurrences of "/D FLAC__HAS_OGG". + + +=============================================================================== +Building on Mac OS X +=============================================================================== + +If you have Fink or a recent version of OS X with the proper autotooles, +the GNU flow above should work. The Project Builder project has been +deprecated but we are working on replacing it with an Xcode equivalent. Property changes on: trunk/OpenMPT/include/flac/include ___________________________________________________________________ Added: tsvn:logminsize + 10 Property changes on: trunk/OpenMPT/include/flac/include/FLAC ___________________________________________________________________ Added: tsvn:logminsize + 10 Added: trunk/OpenMPT/include/flac/include/FLAC/all.h =================================================================== --- trunk/OpenMPT/include/flac/include/FLAC/all.h (rev 0) +++ trunk/OpenMPT/include/flac/include/FLAC/all.h 2012-12-09 16:04:46 UTC (rev 1448) @@ -0,0 +1,370 @@ +/* libFLAC - Free Lossless Audio Codec library + * Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this l... [truncated message content] |
From: <sag...@us...> - 2012-12-09 17:34:41
|
Revision: 1450 http://sourceforge.net/p/modplug/code/1450 Author: saga-games Date: 2012-12-09 17:34:34 +0000 (Sun, 09 Dec 2012) Log Message: ----------- Added FLAC project to VS2008 project (should work in theory) Modified Paths: -------------- trunk/OpenMPT/mptrack/MPTRACK_08.sln trunk/OpenMPT/mptrack/mptrack_08.vcproj Added Paths: ----------- trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_08.vcproj Added: trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_08.vcproj =================================================================== --- trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_08.vcproj (rev 0) +++ trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_08.vcproj 2012-12-09 17:34:34 UTC (rev 1450) @@ -0,0 +1,370 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="libFLAC_static" + ProjectGUID="{4CEFBC84-C215-11DB-8314-0800200C9A66}" + RootNamespace="libFLAC_static" + Keyword="Win32Proj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="..\..\lib" + IntermediateDirectory="Debug_static" + ConfigurationType="4" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=".\include;..\..\include" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLAC__HAS_OGG;FLAC__CPU_IA32;FLAC__HAS_NASM;FLAC__USE_3DNOW;VERSION=\"1.2.0\";FLAC__NO_DLL;DEBUG;FLAC__OVERFLOW_DETECT" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + CompileAs="0" + DisableSpecificWarnings="4267;4996" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + OutputFile="..\..\lib\libFLAC_staticd.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="..\..\lib" + IntermediateDirectory="Release_static" + ConfigurationType="4" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + EnableIntrinsicFunctions="true" + FavorSizeOrSpeed="1" + OmitFramePointers="true" + WholeProgramOptimization="true" + AdditionalIncludeDirectories=".\include;..\..\include" + PreprocessorDefinitions="WIN32;NDEBUG;_LIB;FLAC__USE_3DNOW;VERSION=\"1.2.0\";FLAC__NO_DLL" + RuntimeLibrary="0" + BufferSecurityCheck="false" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + CompileAs="0" + DisableSpecificWarnings="4267;4996" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + OutputFile="..\..\lib\libFLAC_static.lib" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + <File + RelativePath=".\include\protected\all.h" + > + </File> + <File + RelativePath=".\include\private\all.h" + > + </File> + <File + RelativePath=".\include\private\bitmath.h" + > + </File> + <File + RelativePath=".\include\private\bitreader.h" + > + </File> + <File + RelativePath=".\include\private\bitwriter.h" + > + </File> + <File + RelativePath=".\include\private\cpu.h" + > + </File> + <File + RelativePath=".\include\private\crc.h" + > + </File> + <File + RelativePath=".\include\private\fixed.h" + > + </File> + <File + RelativePath=".\include\private\float.h" + > + </File> + <File + RelativePath=".\include\private\format.h" + > + </File> + <File + RelativePath=".\include\private\lpc.h" + > + </File> + <File + RelativePath=".\include\private\md5.h" + > + </File> + <File + RelativePath=".\include\private\memory.h" + > + </File> + <File + RelativePath=".\include\private\metadata.h" + > + </File> + <File + RelativePath=".\ia32\nasm.h" + > + </File> + <File + RelativePath=".\include\private\ogg_decoder_aspect.h" + > + </File> + <File + RelativePath=".\include\private\ogg_encoder_aspect.h" + > + </File> + <File + RelativePath=".\include\private\ogg_helper.h" + > + </File> + <File + RelativePath=".\include\private\ogg_mapping.h" + > + </File> + <File + RelativePath=".\include\protected\stream_decoder.h" + > + </File> + <File + RelativePath=".\include\protected\stream_encoder.h" + > + </File> + <File + RelativePath=".\include\private\stream_encoder_framing.h" + > + </File> + <File + RelativePath=".\include\private\window.h" + > + </File> + </Filter> + <Filter + Name="Public Header Files" + > + <File + RelativePath="..\..\include\FLAC\all.h" + > + </File> + <File + RelativePath="..\..\include\FLAC\assert.h" + > + </File> + <File + RelativePath="..\..\include\FLAC\callback.h" + > + </File> + <File + RelativePath="..\..\include\FLAC\export.h" + > + </File> + <File + RelativePath="..\..\include\FLAC\format.h" + > + </File> + <File + RelativePath="..\..\include\FLAC\metadata.h" + > + </File> + <File + RelativePath="..\..\include\FLAC\ordinals.h" + > + </File> + <File + RelativePath="..\..\include\FLAC\stream_decoder.h" + > + </File> + <File + RelativePath="..\..\include\FLAC\stream_encoder.h" + > + </File> + </Filter> + <Filter + Name="Source Files" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath=".\bitmath.c" + > + </File> + <File + RelativePath=".\bitreader.c" + > + </File> + <File + RelativePath=".\bitwriter.c" + > + </File> + <File + RelativePath=".\cpu.c" + > + </File> + <File + RelativePath=".\crc.c" + > + </File> + <File + RelativePath=".\fixed.c" + > + </File> + <File + RelativePath=".\float.c" + > + </File> + <File + RelativePath=".\format.c" + > + </File> + <File + RelativePath=".\lpc.c" + > + </File> + <File + RelativePath=".\md5.c" + > + </File> + <File + RelativePath=".\memory.c" + > + </File> + <File + RelativePath=".\metadata_iterators.c" + > + </File> + <File + RelativePath=".\metadata_object.c" + > + </File> + <File + RelativePath=".\stream_decoder.c" + > + </File> + <File + RelativePath=".\stream_encoder.c" + > + </File> + <File + RelativePath=".\stream_encoder_framing.c" + > + </File> + <File + RelativePath=".\window.c" + > + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Modified: trunk/OpenMPT/mptrack/MPTRACK_08.sln =================================================================== --- trunk/OpenMPT/mptrack/MPTRACK_08.sln 2012-12-09 16:18:35 UTC (rev 1449) +++ trunk/OpenMPT/mptrack/MPTRACK_08.sln 2012-12-09 17:34:34 UTC (rev 1450) @@ -27,6 +27,8 @@ {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} = {745DEC58-EBB3-47A9-A9B8-4C6627C01BF8} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libFLAC_static", "..\include\flac\src\libFLAC\libFLAC_static_08.vcproj", "{4CEFBC84-C215-11DB-8314-0800200C9A66}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -82,6 +84,12 @@ {94CD7910-649A-4075-9F33-7EBEE614FD45}.Release|Win32.Build.0 = Release|Win32 {94CD7910-649A-4075-9F33-7EBEE614FD45}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 {94CD7910-649A-4075-9F33-7EBEE614FD45}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 + {4CEFBC84-C215-11DB-8314-0800200C9A66}.Debug|Win32.ActiveCfg = Debug|Win32 + {4CEFBC84-C215-11DB-8314-0800200C9A66}.Debug|Win32.Build.0 = Debug|Win32 + {4CEFBC84-C215-11DB-8314-0800200C9A66}.Release|Win32.ActiveCfg = Release|Win32 + {4CEFBC84-C215-11DB-8314-0800200C9A66}.Release|Win32.Build.0 = Release|Win32 + {4CEFBC84-C215-11DB-8314-0800200C9A66}.ReleaseWithoutAsm|Win32.ActiveCfg = Release|Win32 + {4CEFBC84-C215-11DB-8314-0800200C9A66}.ReleaseWithoutAsm|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Modified: trunk/OpenMPT/mptrack/mptrack_08.vcproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack_08.vcproj 2012-12-09 16:18:35 UTC (rev 1449) +++ trunk/OpenMPT/mptrack/mptrack_08.vcproj 2012-12-09 17:34:34 UTC (rev 1450) @@ -83,7 +83,7 @@ <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib version.lib Rpcrt4.lib delayimp.lib" + AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib version.lib Rpcrt4.lib delayimp.lib;../include/flac/lib/libFLAC_staticd.lib" OutputFile=".\Debug/mptrack.exe" Version="5.0" LinkIncremental="2" @@ -189,7 +189,7 @@ <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib version.lib Rpcrt4.lib delayimp.lib wininet.lib" + AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib version.lib Rpcrt4.lib delayimp.lib wininet.lib ../include/flac/lib/libFLAC_static.lib" OutputFile=".\Bin/mptrack.exe" Version="5.0" LinkIncremental="1" @@ -867,6 +867,10 @@ > </File> <File + RelativePath="..\common\FlagSet.h" + > + </File> + <File RelativePath=".\fxp.h" > </File> @@ -902,11 +906,7 @@ RelativePath=".\MIDIMapping.h" > </File> - <File - RelativePath="..\common\FlagSet.h" - > - </File> - <File + <File RelativePath="..\common\misc_util.h" > </File> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-12-09 20:55:14
|
Revision: 1451 http://sourceforge.net/p/modplug/code/1451 Author: saga-games Date: 2012-12-09 20:55:07 +0000 (Sun, 09 Dec 2012) Log Message: ----------- More small changes to the flac projects and readmes. Modified Paths: -------------- trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_08.vcproj trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_10.vcxproj trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_10.vcxproj.filters trunk/OpenMPT/installer/packageTemplate/readme.txt trunk/OpenMPT/packageTemplate/readme.txt Added Paths: ----------- trunk/OpenMPT/include/flac/OpenMPT.txt Added: trunk/OpenMPT/include/flac/OpenMPT.txt =================================================================== --- trunk/OpenMPT/include/flac/OpenMPT.txt (rev 0) +++ trunk/OpenMPT/include/flac/OpenMPT.txt 2012-12-09 20:55:07 UTC (rev 1451) @@ -0,0 +1,16 @@ +The FLAC package has been left pretty much untouched, except for a few changes: +- Obviously, unnecessary folders and files (documentation, makefiles, etc.) have + been removed. +- The existing libFLAC_static project files have been upgraded to VS2008 and + VS2010. The following changes have been made: + - Output directory for the library has been changed to ..\..\lib\ + - Output filename has been changed to ..\..\lib\libFLAC_staticd.lib (debug) + and ..\..\lib\libFLAC_static.lib (release). + - ASM files and nasm.h have been excluded from the project to be able to + compile without NASM. + - *ogg*.c/h files have been excluded from the project to be able to compile + without libvorbis. + - The following preprocessor directives have been removed from both debug + and release configurations: FLAC__HAS_OGG;FLAC__CPU_IA32;FLAC__HAS_NASM + - Debug configurations have been changed to use a multi-threaded debug DLL + runtime library (/MDd) \ No newline at end of file Modified: trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_08.vcproj =================================================================== --- trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_08.vcproj 2012-12-09 17:34:34 UTC (rev 1450) +++ trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_08.vcproj 2012-12-09 20:55:07 UTC (rev 1451) @@ -41,7 +41,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=".\include;..\..\include" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLAC__HAS_OGG;FLAC__CPU_IA32;FLAC__HAS_NASM;FLAC__USE_3DNOW;VERSION=\"1.2.0\";FLAC__NO_DLL;DEBUG;FLAC__OVERFLOW_DETECT" + PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLAC__USE_3DNOW;VERSION=\"1.2.0\";FLAC__NO_DLL;DEBUG;FLAC__OVERFLOW_DETECT" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -214,26 +214,6 @@ > </File> <File - RelativePath=".\ia32\nasm.h" - > - </File> - <File - RelativePath=".\include\private\ogg_decoder_aspect.h" - > - </File> - <File - RelativePath=".\include\private\ogg_encoder_aspect.h" - > - </File> - <File - RelativePath=".\include\private\ogg_helper.h" - > - </File> - <File - RelativePath=".\include\private\ogg_mapping.h" - > - </File> - <File RelativePath=".\include\protected\stream_decoder.h" > </File> Modified: trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_10.vcxproj =================================================================== --- trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_10.vcxproj 2012-12-09 17:34:34 UTC (rev 1450) +++ trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_10.vcxproj 2012-12-09 20:55:07 UTC (rev 1451) @@ -95,11 +95,6 @@ <ClInclude Include="include\private\md5.h" /> <ClInclude Include="include\private\memory.h" /> <ClInclude Include="include\private\metadata.h" /> - <ClInclude Include="ia32\nasm.h" /> - <ClInclude Include="include\private\ogg_decoder_aspect.h" /> - <ClInclude Include="include\private\ogg_encoder_aspect.h" /> - <ClInclude Include="include\private\ogg_helper.h" /> - <ClInclude Include="include\private\ogg_mapping.h" /> <ClInclude Include="include\protected\stream_decoder.h" /> <ClInclude Include="include\protected\stream_encoder.h" /> <ClInclude Include="include\private\stream_encoder_framing.h" /> Modified: trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_10.vcxproj.filters =================================================================== --- trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_10.vcxproj.filters 2012-12-09 17:34:34 UTC (rev 1450) +++ trunk/OpenMPT/include/flac/src/libFLAC/libFLAC_static_10.vcxproj.filters 2012-12-09 20:55:07 UTC (rev 1451) @@ -56,21 +56,6 @@ <ClInclude Include="include\private\metadata.h"> <Filter>Header Files</Filter> </ClInclude> - <ClInclude Include="ia32\nasm.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="include\private\ogg_decoder_aspect.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="include\private\ogg_encoder_aspect.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="include\private\ogg_helper.h"> - <Filter>Header Files</Filter> - </ClInclude> - <ClInclude Include="include\private\ogg_mapping.h"> - <Filter>Header Files</Filter> - </ClInclude> <ClInclude Include="include\protected\stream_decoder.h"> <Filter>Header Files</Filter> </ClInclude> Modified: trunk/OpenMPT/installer/packageTemplate/readme.txt =================================================================== --- trunk/OpenMPT/installer/packageTemplate/readme.txt 2012-12-09 17:34:34 UTC (rev 1450) +++ trunk/OpenMPT/installer/packageTemplate/readme.txt 2012-12-09 20:55:07 UTC (rev 1451) @@ -16,6 +16,8 @@ An uninstaller is provided. Don't worry, it will ask you if you want to keep your personal settings, none of these will be deleted automatically. +Custom files that are created by the user (e.g. key bindings) will never be +removed. Changes @@ -32,8 +34,8 @@ tracker at http://bugs.openmpt.org/ -Release package contents: -------------------------- +Release package contents +------------------------ extraKeymaps (folder): Additional key bindings for the keyboard manager, available in several flavours (including MPT classic, Fasttracker 2 and Impulse Tracker) and country-specific layouts. @@ -51,8 +53,8 @@ unmo3.dll: Used in MO3-file import. OMPT_1.20_ReleaseNotes.html: Release notes for this version. -Misc: ------ +License +------- OpenMPT is partially under the following license: @@ -88,9 +90,11 @@ For more information about SoundTouch, see folder SoundTouch. +PortMidi +-------- OpenMPT's MIDI plugins make use of the PortMidi library, which is released under the MIT license. -Visit https://sourceforge.net/projects/portmedia/ for more information. +Visit http://portmedia.sourceforge.net/ for more information. unmo3.dll --------- @@ -100,8 +104,45 @@ charge you for it, kick 'em where it hurts! TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED "AS -IS", WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT +IS", WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS SHALL NOT BE HELD LIABLE FOR ANY DAMAGE THAT MAY RESULT FROM THE USE OF THIS SOFTWARE. YOU USE THIS SOFTWARE ENTIRELY AT YOUR OWN -RISK. +RISK. + +Visit http://www.un4seen.com/mo3.html for more information. + +libFLAC +------- +OpenMPT makes use of libFLAC, which is released under the BSD license: + +Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of the Xiph.org Foundation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Visit http://flac.sourceforge.net/ for more information. Modified: trunk/OpenMPT/packageTemplate/readme.txt =================================================================== --- trunk/OpenMPT/packageTemplate/readme.txt 2012-12-09 17:34:34 UTC (rev 1450) +++ trunk/OpenMPT/packageTemplate/readme.txt 2012-12-09 20:55:07 UTC (rev 1451) @@ -49,8 +49,8 @@ tracker at http://bugs.openmpt.org/ -Release package contents: -------------------------- +Release package contents +------------------------ extraKeymaps (folder): Additional key bindings for the keyboard manager, available in several flavours (including MPT classic, Fasttracker 2 and Impulse Tracker) and country-specific layouts. @@ -70,8 +70,8 @@ OMPT_1.20_ReleaseNotes.html: Release notes for this version. -Misc: ------ +License +------- OpenMPT is partially under the following license: @@ -107,9 +107,11 @@ For more information about SoundTouch, see folder SoundTouch. +PortMidi +-------- OpenMPT's MIDI plugins make use of the PortMidi library, which is released under the MIT license. -Visit https://sourceforge.net/projects/portmedia/ for more information. +Visit http://portmedia.sourceforge.net/ for more information. unmo3.dll --------- @@ -123,4 +125,41 @@ NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS SHALL NOT BE HELD LIABLE FOR ANY DAMAGE THAT MAY RESULT FROM THE USE OF THIS SOFTWARE. YOU USE THIS SOFTWARE ENTIRELY AT YOUR OWN -RISK. +RISK. + +Visit http://www.un4seen.com/mo3.html for more information. + +libFLAC +------- +OpenMPT makes use of libFLAC, which is released under the BSD license: + +Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of the Xiph.org Foundation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Visit http://flac.sourceforge.net/ for more information. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2012-12-09 23:16:27
|
Revision: 1452 http://sourceforge.net/p/modplug/code/1452 Author: saga-games Date: 2012-12-09 23:16:17 +0000 (Sun, 09 Dec 2012) Log Message: ----------- [Fix] WAV Writer: Header size was still off by one [Imp] Sample Editor: If current sample's file name ends with .flac, offer flac filter by default. Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/soundlib/SampleFormats.cpp Removed Paths: ------------- trunk/OpenMPT/include/flac/COPYING.FDL trunk/OpenMPT/include/flac/COPYING.GPL Deleted: trunk/OpenMPT/include/flac/COPYING.FDL =================================================================== --- trunk/OpenMPT/include/flac/COPYING.FDL 2012-12-09 20:55:07 UTC (rev 1451) +++ trunk/OpenMPT/include/flac/COPYING.FDL 2012-12-09 23:16:17 UTC (rev 1452) @@ -1,397 +0,0 @@ - GNU Free Documentation License - Version 1.2, November 2002 - - - Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. - 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - -0. PREAMBLE - -The purpose of this License is to make a manual, textbook, or other -functional and useful document "free" in the sense of freedom: to -assure everyone the effective freedom to copy and redistribute it, -with or without modifying it, either commercially or noncommercially. -Secondarily, this License preserves for the author and publisher a way -to get credit for their work, while not being considered responsible -for modifications made by others. - -This License is a kind of "copyleft", which means that derivative -works of the document must themselves be free in the same sense. It -complements the GNU General Public License, which is a copyleft -license designed for free software. - -We have designed this License in order to use it for manuals for free -software, because free software needs free documentation: a free -program should come with manuals providing the same freedoms that the -software does. But this License is not limited to software manuals; -it can be used for any textual work, regardless of subject matter or -whether it is published as a printed book. We recommend this License -principally for works whose purpose is instruction or reference. - - -1. APPLICABILITY AND DEFINITIONS - -This License applies to any manual or other work, in any medium, that -contains a notice placed by the copyright holder saying it can be -distributed under the terms of this License. Such a notice grants a -world-wide, royalty-free license, unlimited in duration, to use that -work under the conditions stated herein. The "Document", below, -refers to any such manual or work. Any member of the public is a -licensee, and is addressed as "you". You accept the license if you -copy, modify or distribute the work in a way requiring permission -under copyright law. - -A "Modified Version" of the Document means any work containing the -Document or a portion of it, either copied verbatim, or with -modifications and/or translated into another language. - -A "Secondary Section" is a named appendix or a front-matter section of -the Document that deals exclusively with the relationship of the -publishers or authors of the Document to the Document's overall subject -(or to related matters) and contains nothing that could fall directly -within that overall subject. (Thus, if the Document is in part a -textbook of mathematics, a Secondary Section may not explain any -mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, -commercial, philosophical, ethical or political position regarding -them. - -The "Invariant Sections" are certain Secondary Sections whose titles -are designated, as being those of Invariant Sections, in the notice -that says that the Document is released under this License. If a -section does not fit the above definition of Secondary then it is not -allowed to be designated as Invariant. The Document may contain zero -Invariant Sections. If the Document does not identify any Invariant -Sections then there are none. - -The "Cover Texts" are certain short passages of text that are listed, -as Front-Cover Texts or Back-Cover Texts, in the notice that says that -the Document is released under this License. A Front-Cover Text may -be at most 5 words, and a Back-Cover Text may be at most 25 words. - -A "Transparent" copy of the Document means a machine-readable copy, -represented in a format whose specification is available to the -general public, that is suitable for revising the document -straightforwardly with generic text editors or (for images composed of -pixels) generic paint programs or (for drawings) some widely available -drawing editor, and that is suitable for input to text formatters or -for automatic translation to a variety of formats suitable for input -to text formatters. A copy made in an otherwise Transparent file -format whose markup, or absence of markup, has been arranged to thwart -or discourage subsequent modification by readers is not Transparent. -An image format is not Transparent if used for any substantial amount -of text. A copy that is not "Transparent" is called "Opaque". - -Examples of suitable formats for Transparent copies include plain -ASCII without markup, Texinfo input format, LaTeX input format, SGML -or XML using a publicly available DTD, and standard-conforming simple -HTML, PostScript or PDF designed for human modification. Examples of -transparent image formats include PNG, XCF and JPG. Opaque formats -include proprietary formats that can be read and edited only by -proprietary word processors, SGML or XML for which the DTD and/or -processing tools are not generally available, and the -machine-generated HTML, PostScript or PDF produced by some word -processors for output purposes only. - -The "Title Page" means, for a printed book, the title page itself, -plus such following pages as are needed to hold, legibly, the material -this License requires to appear in the title page. For works in -formats which do not have any title page as such, "Title Page" means -the text near the most prominent appearance of the work's title, -preceding the beginning of the body of the text. - -A section "Entitled XYZ" means a named subunit of the Document whose -title either is precisely XYZ or contains XYZ in parentheses following -text that translates XYZ in another language. (Here XYZ stands for a -specific section name mentioned below, such as "Acknowledgements", -"Dedications", "Endorsements", or "History".) To "Preserve the Title" -of such a section when you modify the Document means that it remains a -section "Entitled XYZ" according to this definition. - -The Document may include Warranty Disclaimers next to the notice which -states that this License applies to the Document. These Warranty -Disclaimers are considered to be included by reference in this -License, but only as regards disclaiming warranties: any other -implication that these Warranty Disclaimers may have is void and has -no effect on the meaning of this License. - - -2. VERBATIM COPYING - -You may copy and distribute the Document in any medium, either -commercially or noncommercially, provided that this License, the -copyright notices, and the license notice saying this License applies -to the Document are reproduced in all copies, and that you add no other -conditions whatsoever to those of this License. You may not use -technical measures to obstruct or control the reading or further -copying of the copies you make or distribute. However, you may accept -compensation in exchange for copies. If you distribute a large enough -number of copies you must also follow the conditions in section 3. - -You may also lend copies, under the same conditions stated above, and -you may publicly display copies. - - -3. COPYING IN QUANTITY - -If you publish printed copies (or copies in media that commonly have -printed covers) of the Document, numbering more than 100, and the -Document's license notice requires Cover Texts, you must enclose the -copies in covers that carry, clearly and legibly, all these Cover -Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on -the back cover. Both covers must also clearly and legibly identify -you as the publisher of these copies. The front cover must present -the full title with all words of the title equally prominent and -visible. You may add other material on the covers in addition. -Copying with changes limited to the covers, as long as they preserve -the title of the Document and satisfy these conditions, can be treated -as verbatim copying in other respects. - -If the required texts for either cover are too voluminous to fit -legibly, you should put the first ones listed (as many as fit -reasonably) on the actual cover, and continue the rest onto adjacent -pages. - -If you publish or distribute Opaque copies of the Document numbering -more than 100, you must either include a machine-readable Transparent -copy along with each Opaque copy, or state in or with each Opaque copy -a computer-network location from which the general network-using -public has access to download using public-standard network protocols -a complete Transparent copy of the Document, free of added material. -If you use the latter option, you must take reasonably prudent steps, -when you begin distribution of Opaque copies in quantity, to ensure -that this Transparent copy will remain thus accessible at the stated -location until at least one year after the last time you distribute an -Opaque copy (directly or through your agents or retailers) of that -edition to the public. - -It is requested, but not required, that you contact the authors of the -Document well before redistributing any large number of copies, to give -them a chance to provide you with an updated version of the Document. - - -4. MODIFICATIONS - -You may copy and distribute a Modified Version of the Document under -the conditions of sections 2 and 3 above, provided that you release -the Modified Version under precisely this License, with the Modified -Version filling the role of the Document, thus licensing distribution -and modification of the Modified Version to whoever possesses a copy -of it. In addition, you must do these things in the Modified Version: - -A. Use in the Title Page (and on the covers, if any) a title distinct - from that of the Document, and from those of previous versions - (which should, if there were any, be listed in the History section - of the Document). You may use the same title as a previous version - if the original publisher of that version gives permission. -B. List on the Title Page, as authors, one or more persons or entities - responsible for authorship of the modifications in the Modified - Version, together with at least five of the principal authors of the - Document (all of its principal authors, if it has fewer than five), - unless they release you from this requirement. -C. State on the Title page the name of the publisher of the - Modified Version, as the publisher. -D. Preserve all the copyright notices of the Document. -E. Add an appropriate copyright notice for your modifications - adjacent to the other copyright notices. -F. Include, immediately after the copyright notices, a license notice - giving the public permission to use the Modified Version under the - terms of this License, in the form shown in the Addendum below. -G. Preserve in that license notice the full lists of Invariant Sections - and required Cover Texts given in the Document's license notice. -H. Include an unaltered copy of this License. -I. Preserve the section Entitled "History", Preserve its Title, and add - to it an item stating at least the title, year, new authors, and - publisher of the Modified Version as given on the Title Page. If - there is no section Entitled "History" in the Document, create one - stating the title, year, authors, and publisher of the Document as - given on its Title Page, then add an item describing the Modified - Version as stated in the previous sentence. -J. Preserve the network location, if any, given in the Document for - public access to a Transparent copy of the Document, and likewise - the network locations given in the Document for previous versions - it was based on. These may be placed in the "History" section. - You may omit a network location for a work that was published at - least four years before the Document itself, or if the original - publisher of the version it refers to gives permission. -K. For any section Entitled "Acknowledgements" or "Dedications", - Preserve the Title of the section, and preserve in the section all - the substance and tone of each of the contributor acknowledgements - and/or dedications given therein. -L. Preserve all the Invariant Sections of the Document, - unaltered in their text and in their titles. Section numbers - or the equivalent are not considered part of the section titles. -M. Delete any section Entitled "Endorsements". Such a section - may not be included in the Modified Version. -N. Do not retitle any existing section to be Entitled "Endorsements" - or to conflict in title with any Invariant Section. -O. Preserve any Warranty Disclaimers. - -If the Modified Version includes new front-matter sections or -appendices that qualify as Secondary Sections and contain no material -copied from the Document, you may at your option designate some or all -of these sections as invariant. To do this, add their titles to the -list of Invariant Sections in the Modified Version's license notice. -These titles must be distinct from any other section titles. - -You may add a section Entitled "Endorsements", provided it contains -nothing but endorsements of your Modified Version by various -parties--for example, statements of peer review or that the text has -been approved by an organization as the authoritative definition of a -standard. - -You may add a passage of up to five words as a Front-Cover Text, and a -passage of up to 25 words as a Back-Cover Text, to the end of the list -of Cover Texts in the Modified Version. Only one passage of -Front-Cover Text and one of Back-Cover Text may be added by (or -through arrangements made by) any one entity. If the Document already -includes a cover text for the same cover, previously added by you or -by arrangement made by the same entity you are acting on behalf of, -you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. - -The author(s) and publisher(s) of the Document do not by this License -give permission to use their names for publicity for or to assert or -imply endorsement of any Modified Version. - - -5. COMBINING DOCUMENTS - -You may combine the Document with other documents released under this -License, under the terms defined in section 4 above for modified -versions, provided that you include in the combination all of the -Invariant Sections of all of the original documents, unmodified, and -list them all as Invariant Sections of your combined work in its -license notice, and that you preserve all their Warranty Disclaimers. - -The combined work need only contain one copy of this License, and -multiple identical Invariant Sections may be replaced with a single -copy. If there are multiple Invariant Sections with the same name but -different contents, make the title of each such section unique by -adding at the end of it, in parentheses, the name of the original -author or publisher of that section if known, or else a unique number. -Make the same adjustment to the section titles in the list of -Invariant Sections in the license notice of the combined work. - -In the combination, you must combine any sections Entitled "History" -in the various original documents, forming one section Entitled -"History"; likewise combine any sections Entitled "Acknowledgements", -and any sections Entitled "Dedications". You must delete all sections -Entitled "Endorsements". - - -6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents -released under this License, and replace the individual copies of this -License in the various documents with a single copy that is included in -the collection, provided that you follow the rules of this License for -verbatim copying of each of the documents in all other respects. - -You may extract a single document from such a collection, and distribute -it individually under this License, provided you insert a copy of this -License into the extracted document, and follow this License in all -other respects regarding verbatim copying of that document. - - -7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate -and independent documents or works, in or on a volume of a storage or -distribution medium, is called an "aggregate" if the copyright -resulting from the compilation is not used to limit the legal rights -of the compilation's users beyond what the individual works permit. -When the Document is included in an aggregate, this License does not -apply to the other works in the aggregate which are not themselves -derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these -copies of the Document, then if the Document is less than one half of -the entire aggregate, the Document's Cover Texts may be placed on -covers that bracket the Document within the aggregate, or the -electronic equivalent of covers if the Document is in electronic form. -Otherwise they must appear on printed covers that bracket the whole -aggregate. - - -8. TRANSLATION - -Translation is considered a kind of modification, so you may -distribute translations of the Document under the terms of section 4. -Replacing Invariant Sections with translations requires special -permission from their copyright holders, but you may include -translations of some or all Invariant Sections in addition to the -original versions of these Invariant Sections. You may include a -translation of this License, and all the license notices in the -Document, and any Warranty Disclaimers, provided that you also include -the original English version of this License and the original versions -of those notices and disclaimers. In case of a disagreement between -the translation and the original version of this License or a notice -or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", -"Dedications", or "History", the requirement (section 4) to Preserve -its Title (section 1) will typically require changing the actual -title. - - -9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except -as expressly provided for under this License. Any other attempt to -copy, modify, sublicense or distribute the Document is void, and will -automatically terminate your rights under this License. However, -parties who have received copies, or rights, from you under this -License will not have their licenses terminated so long as such -parties remain in full compliance. - - -10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions -of the GNU Free Documentation License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. See -http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. -If the Document specifies that a particular numbered version of this -License "or any later version" applies to it, you have the option of -following the terms and conditions either of that specified version or -of any later version that has been published (not as a draft) by the -Free Software Foundation. If the Document does not specify a version -number of this License, you may choose any version ever published (not -as a draft) by the Free Software Foundation. - - -ADDENDUM: How to use this License for your documents - -To use this License in a document you have written, include a copy of -the License in the document and put the following copyright and -license notices just after the title page: - - Copyright (c) YEAR YOUR NAME. - Permission is granted to copy, distribute and/or modify this document - under the terms of the GNU Free Documentation License, Version 1.2 - or any later version published by the Free Software Foundation; - with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. - A copy of the license is included in the section entitled "GNU - Free Documentation License". - -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, -replace the "with...Texts." line with this: - - with the Invariant Sections being LIST THEIR TITLES, with the - Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. - -If you have Invariant Sections without Cover Texts, or some other -combination of the three, merge those two alternatives to suit the -situation. - -If your document contains nontrivial examples of program code, we -recommend releasing these examples in parallel under your choice of -free software license, such as the GNU General Public License, -to permit their use in free software. Deleted: trunk/OpenMPT/include/flac/COPYING.GPL =================================================================== --- trunk/OpenMPT/include/flac/COPYING.GPL 2012-12-09 20:55:07 UTC (rev 1451) +++ trunk/OpenMPT/include/flac/COPYING.GPL 2012-12-09 23:16:17 UTC (rev 1452) @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) 19yy <name of author> - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu |