From: <rel...@us...> - 2008-09-07 22:14:02
|
Revision: 223 http://modplug.svn.sourceforge.net/modplug/?rev=223&view=rev Author: relabsoluness Date: 2008-09-07 22:13:53 +0000 (Sun, 07 Sep 2008) Log Message: ----------- ./ Name changes and update fixes to plugin velocity/volume handling controls in instrument tab. . Further fixes to ReadSample/itp vulnerabilities. (http://secunia.com/advisories/21418/) . Fix to possible crash in LOAD_AMF.CPP. . Fixed wrong default velocity/volume handling when loading XM files. ? Deleted miscellaneous items from version control. ? Removed GPL notifications from soundlib files. - pitch shift/time stretch is gone. Can be enabled by disabling definition NO_XSOUNDLIB and adding xsoundlib.lib to linking. Modified Paths: -------------- trunk/OpenMPT/mptrack/Ctrl_ins.cpp trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/mptrack/Ctrl_smp.h trunk/OpenMPT/mptrack/MPTRACK.sln trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/mptrack/mptrack.vcproj trunk/OpenMPT/mptrack/resource.h trunk/OpenMPT/soundlib/Dlsbank.cpp trunk/OpenMPT/soundlib/Fastmix.cpp trunk/OpenMPT/soundlib/LOAD_AMF.CPP trunk/OpenMPT/soundlib/Load_it.cpp trunk/OpenMPT/soundlib/Load_mid.cpp trunk/OpenMPT/soundlib/Load_xm.cpp trunk/OpenMPT/soundlib/Mmcmp.cpp trunk/OpenMPT/soundlib/Mmx_mix.cpp trunk/OpenMPT/soundlib/Sampleio.cpp trunk/OpenMPT/soundlib/Snd_dsp.cpp trunk/OpenMPT/soundlib/Snd_eq.cpp trunk/OpenMPT/soundlib/Snd_flt.cpp trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/Sndfile.h trunk/OpenMPT/soundlib/Sndmix.cpp trunk/OpenMPT/soundlib/Tables.cpp trunk/OpenMPT/soundlib/Waveform.cpp Removed Paths: ------------- trunk/OpenMPT/mptrack/Debug/ trunk/OpenMPT/mptrack/bin/getVersionFromCode.pl trunk/OpenMPT/mptrack/bin/version Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -805,7 +805,7 @@ m_CbnFilterMode.SetItemData(m_CbnFilterMode.AddString("Force highpass"), FLTMODE_HIGHPASS); //VST velocity/volume handling - m_CbnPluginVelocityHandling.AddString("Use channelvolume"); + m_CbnPluginVelocityHandling.AddString("Use note volume"); m_CbnPluginVelocityHandling.AddString("Process as volume"); m_CbnPluginVolumeHandling.AddString("MIDI volume"); m_CbnPluginVolumeHandling.AddString("Dry/Wet ratio"); @@ -1177,6 +1177,21 @@ CheckDlgButton(IDC_CHECK_PITCHTEMPOLOCK, MF_UNCHECKED); OnBnClickedCheckPitchtempolock(); + + if(m_pSndFile->GetType() & (MOD_TYPE_XM|MOD_TYPE_IT|MOD_TYPE_MPT)) + { + if(m_CbnMixPlug.GetCurSel() > 0 && m_pSndFile->GetModFlag(MSF_MIDICC_BUGEMULATION) == false) + { + m_CbnPluginVelocityHandling.EnableWindow(TRUE); + m_CbnPluginVolumeHandling.EnableWindow(TRUE); + } + else + { + m_CbnPluginVelocityHandling.EnableWindow(FALSE); + m_CbnPluginVolumeHandling.EnableWindow(FALSE); + } + + } } else { m_EditName.SetWindowText(""); Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -10,10 +10,10 @@ #include "PSRatioCalc.h" //rewbs.timeStretchMods #include "mpdlgs.h" -// -> CODE#0029 -// -> DESC="pitch shifting - time stretching" -#include "smbPitchShift.h" -#include "samplerate.h" +#ifndef NO_XSOUNDLIB + #include "smbPitchShift.h" + #include "samplerate.h" +#endif #ifdef _DEBUG #include <math.h> @@ -65,14 +65,13 @@ ON_COMMAND(ID_PREVINSTRUMENT, OnPrevInstrument) ON_COMMAND(ID_NEXTINSTRUMENT, OnNextInstrument) -// -> CODE#0029 -// -> DESC="pitch shifting - time stretching" +#ifndef NO_XSOUNDLIB ON_COMMAND(IDC_BUTTON1, OnPitchShiftTimeStretch) ON_COMMAND(IDC_BUTTON2, OnEstimateSampleSize) ON_COMMAND(IDC_BUTTON3, OnPitchShiftTimeStretchAccept) ON_COMMAND(IDC_BUTTON4, OnPitchShiftTimeStretchCancel) ON_COMMAND(IDC_CHECK3, OnEnableStretchToSize) -// -! TEST#0029 +#endif ON_EN_CHANGE(IDC_SAMPLE_NAME, OnNameChanged) ON_EN_CHANGE(IDC_SAMPLE_FILENAME, OnFileNameChanged) @@ -140,13 +139,12 @@ DDX_Control(pDX, IDC_EDIT15, m_EditVibDepth); DDX_Control(pDX, IDC_EDIT16, m_EditVibRate); -// -> CODE#0029 -// -> DESC="pitch shifting - time stretching" +#ifndef NO_XSOUNDLIB DDX_Control(pDX, IDC_COMBO4, m_ComboPitch); DDX_Control(pDX, IDC_COMBO5, m_ComboQuality); DDX_Control(pDX, IDC_COMBO6, m_ComboFFT); DDX_Text(pDX, IDC_EDIT6, m_dTimeStretchRatio); //rewbs.timeStretchMods -// -! TEST#0029 +#endif //}}AFX_DATA_MAP } @@ -158,25 +156,25 @@ m_nSample = 1; m_nLockCount = 1; -// -> CODE#0029 -// -> DESC="pitch shifting - time stretching" +#ifndef NO_XSOUNDLIB pSampleUndoBuffer = NULL; UndoBufferSize = 0; -// -! TEST#0029 +#endif + } -// -> CODE#0029 -// -> DESC="pitch shifting - time stretching" -CCtrlSamples::~CCtrlSamples() -{ - if(pSampleUndoBuffer) CSoundFile::FreeSample(pSampleUndoBuffer); - pSampleUndoBuffer = NULL; - UndoBufferSize = 0; -} -// -! TEST#0029 +#ifndef NO_XSOUNDLIB + CCtrlSamples::~CCtrlSamples() + { + if(pSampleUndoBuffer) CSoundFile::FreeSample(pSampleUndoBuffer); + pSampleUndoBuffer = NULL; + UndoBufferSize = 0; + } +#endif + CRuntimeClass *CCtrlSamples::GetAssociatedViewClass() //--------------------------------------------------- { @@ -242,8 +240,28 @@ m_CbnBaseNote.AddString(s); } -// -> CODE#0029 -// -> DESC="pitch shifting - time stretching" + +#ifndef NO_XSOUNDLIB + m_ComboFFT.ShowWindow(SW_SHOW); + m_ComboPitch.ShowWindow(SW_SHOW); + m_ComboQuality.ShowWindow(SW_SHOW); + m_ComboFFT.ShowWindow(SW_SHOW); + + GetDlgItem(IDC_BUTTON1)->ShowWindow(SW_SHOW); // PitchShiftTimeStretch + GetDlgItem(IDC_BUTTON2)->ShowWindow(SW_SHOW); // EstimateSampleSize + GetDlgItem(IDC_BUTTON3)->ShowWindow(SW_SHOW); // PitchShiftTimeStretchAccept + GetDlgItem(IDC_BUTTON4)->ShowWindow(SW_SHOW); // PitchShiftTimeStretchCancel + GetDlgItem(IDC_CHECK2)->ShowWindow(SW_SHOW); // Preview mode + GetDlgItem(IDC_CHECK3)->ShowWindow(SW_SHOW); // EnableStretchToSize + GetDlgItem(IDC_EDIT6)->ShowWindow(SW_SHOW); // + GetDlgItem(IDC_GROUPBOX_PITCH_TIME)->ShowWindow(SW_SHOW); // + GetDlgItem(IDC_TEXT_PITCH)->ShowWindow(SW_SHOW); // + GetDlgItem(IDC_TEXT_QUALITY)->ShowWindow(SW_SHOW); // + GetDlgItem(IDC_TEXT_FFT)->ShowWindow(SW_SHOW); // + GetDlgItem(IDC_TEXT_PREVIEW)->ShowWindow(SW_SHOW); // + GetDlgItem(IDC_GROUPBOX_PITCH_TIME)->ShowWindow(SW_SHOW); // + GetDlgItem(IDC_TEXT_PERCENT)->ShowWindow(SW_SHOW); // + CHAR str[16]; // Pitch selection @@ -297,7 +315,7 @@ // Stretch to size check box OnEnableStretchToSize(); -// -! TEST#0029 +#endif // NO_XSOUNDLIB return TRUE; } @@ -319,10 +337,9 @@ if (pSndFile->m_nSamples < 1) pSndFile->m_nSamples = 1; if ((nSmp < 1) || (nSmp > pSndFile->m_nSamples)) return FALSE; -// -> CODE#0029 -// -> DESC="pitch shifting - time stretching" +#ifndef NO_XSOUNDLIB if(pSampleUndoBuffer) OnPitchShiftTimeStretchCancel(); -// -! TEST#0029 +#endif LockControls(); if (m_nSample != nSmp) @@ -666,11 +683,11 @@ DWORD len; BOOL bOk; -// -> CODE#0029 -// -> DESC="pitch shifting - time stretching" +#ifndef NO_XSOUNDLIB if(pSampleUndoBuffer) OnPitchShiftTimeStretchCancel(); -// -! TEST#0029 +#endif + BeginWaitCursor(); if ((!lpszFileName) || (!f.Open(lpszFileName))) { @@ -786,11 +803,11 @@ { if ((!pSndFile) || (!nSample) || (nSample > pSndFile->m_nSamples)) return FALSE; -// -> CODE#0029 -// -> DESC="pitch shifting - time stretching" +#ifndef NO_XSOUNDLIB if(pSampleUndoBuffer) OnPitchShiftTimeStretchCancel(); -// -! TEST#0029 +#endif + BeginWaitCursor(); BEGIN_CRITICAL(); m_pSndFile->DestroySample(m_nSample); @@ -819,10 +836,9 @@ if ((!IsLocked()) && (m_pSndFile)) { -// -> CODE#0029 -// -> DESC="pitch shifting - time stretching" +#ifndef NO_XSOUNDLIB if(pSampleUndoBuffer) OnPitchShiftTimeStretchCancel(); -// -! TEST#0029 +#endif UINT n = GetDlgItemInt(IDC_EDIT_SAMPLE); if ((n > 0) && (n <= m_pSndFile->m_nSamples) && (n != m_nSample)) @@ -863,10 +879,9 @@ if (smp > 0) { -// -> CODE#0029 -// -> DESC="pitch shifting - time stretching" + #ifndef NO_XSOUNDLIB if(pSampleUndoBuffer) OnPitchShiftTimeStretchCancel(); -// -! TEST#0029 + #endif CSoundFile *pSndFile = m_pModDoc->GetSoundFile(); SetCurrentSample(smp); @@ -1416,8 +1431,7 @@ } -// -> CODE#0029 -// -> DESC="pitch shifting - time stretching" +#ifndef NO_XSOUNDLIB #define MAX_BUFFER_LENGTH 8192 #define CLIP_SOUND(v) v = v < -1.0f ? -1.0f : v > 1.0f ? 1.0f : v @@ -1998,9 +2012,10 @@ return 0; } -// -! TEST#0029 +#endif // NO_XSOUNDLIB + void CCtrlSamples::OnReverse() //---------------------------- { Modified: trunk/OpenMPT/mptrack/Ctrl_smp.h =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.h 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/mptrack/Ctrl_smp.h 2008-09-07 22:13:53 UTC (rev 223) @@ -1,7 +1,10 @@ #ifndef _CONTROL_SAMPLES_H_ #define _CONTROL_SAMPLES_H_ +// If defined, disables pitch shifting - time stretching. +#define NO_XSOUNDLIB + //======================================= class CCtrlSamples: public CModControlDlg //======================================= @@ -21,23 +24,21 @@ double m_dTimeStretchRatio; //rewbs.timeStretchMods -// -> CODE#0029 -// -> DESC="pitch shifting - time stretching" +#ifndef NO_XSOUNDLIB CComboBox m_ComboPitch, m_ComboQuality, m_ComboFFT; PVOID pSampleUndoBuffer; UINT UndoBufferSize; int PitchShift(float pitch); int TimeStretch(double ratio); -// -! TEST#0029 +#endif public: CCtrlSamples(); -// -> CODE#0029 -// -> DESC="pitch shifting - time stretching" +#ifndef NO_XSOUNDLIB ~CCtrlSamples(); -// -! TEST#0029 +#endif public: BOOL SetCurrentSample(UINT n, LONG lZoom=-1, BOOL bUpdNum=TRUE); @@ -94,14 +95,14 @@ afx_msg void OnVibRateChanged(); afx_msg void OnVScroll(UINT, UINT, CScrollBar *); afx_msg LRESULT OnCustomKeyMsg(WPARAM, LPARAM); //rewbs.customKeys -// -> CODE#0029 -// -> DESC="" + +#ifndef NO_XSOUNDLIB afx_msg void OnPitchShiftTimeStretch(); afx_msg void OnEnableStretchToSize(); afx_msg void OnEstimateSampleSize(); afx_msg void OnPitchShiftTimeStretchAccept(); afx_msg void OnPitchShiftTimeStretchCancel(); -// -! TEST#0029 +#endif //}}AFX_MSG DECLARE_MESSAGE_MAP() Modified: trunk/OpenMPT/mptrack/MPTRACK.sln =================================================================== --- trunk/OpenMPT/mptrack/MPTRACK.sln 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/mptrack/MPTRACK.sln 2008-09-07 22:13:53 UTC (rev 223) @@ -2,7 +2,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mptrack", "mptrack.vcproj", "{DB18719C-9177-4632-A9E0-7E72E2E6B05E}" ProjectSection(ProjectDependencies) = postProject {1FF4AB04-B22F-4CB8-AA2A-0C5095B5FEE4} = {1FF4AB04-B22F-4CB8-AA2A-0C5095B5FEE4} - {DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8} = {DCC2BB2F-6778-4FD3-9C00-D6CD8DC917B8} {71531076-78C7-488D-8FD6-9D841F20AADE} = {71531076-78C7-488D-8FD6-9D841F20AADE} {3C7281B0-D0E2-48ED-AE4D-A181FC77D8F7} = {3C7281B0-D0E2-48ED-AE4D-A181FC77D8F7} EndProjectSection Deleted: trunk/OpenMPT/mptrack/bin/getVersionFromCode.pl =================================================================== --- trunk/OpenMPT/mptrack/bin/getVersionFromCode.pl 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/mptrack/bin/getVersionFromCode.pl 2008-09-07 22:13:53 UTC (rev 223) @@ -1,9 +0,0 @@ -open(I, "mptrack.rc"); - -while(<I>) { - if (/\VALUE "FileVersion", "([0-9]*), ([0-9]*), ([0-9]*), ([0-9]*)".*/) { - printf("%d.%02d.%02d.%02d", $1, $2, $3, $4); - } -} - -close(I); \ No newline at end of file Deleted: trunk/OpenMPT/mptrack/bin/version =================================================================== --- trunk/OpenMPT/mptrack/bin/version 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/mptrack/bin/version 2008-09-07 22:13:53 UTC (rev 223) @@ -1 +0,0 @@ -1.17.02.48 \ No newline at end of file Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/mptrack/mptrack.rc 2008-09-07 22:13:53 UTC (rev 223) @@ -755,29 +755,35 @@ UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,353,83, 11,11 LTEXT "Auto-Vibrato",IDC_STATIC,275,50,41,8 - GROUPBOX "Pitch shifting / Time stretching",IDC_STATIC,370,22,150, - 78 - LTEXT "Pitch",IDC_STATIC,374,38,23,10 - LTEXT "Quality",IDC_STATIC,374,54,23,10 - LTEXT "FFT",IDC_STATIC,374,70,23,10 + GROUPBOX "Pitch shifting / Time stretching", + IDC_GROUPBOX_PITCH_TIME,370,22,150,78,NOT WS_VISIBLE + LTEXT "Pitch",IDC_TEXT_PITCH,374,38,23,10,NOT WS_VISIBLE + LTEXT "Quality",IDC_TEXT_QUALITY,374,54,23,10,NOT WS_VISIBLE + LTEXT "FFT",IDC_TEXT_FFT,374,70,23,10,NOT WS_VISIBLE CONTROL "Preview mode",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | - BS_LEFTTEXT | BS_FLAT | WS_TABSTOP,373,83,65,11 + BS_LEFTTEXT | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,373, + 83,65,11 CONTROL "Time stretching",IDC_CHECK3,"Button",BS_AUTOCHECKBOX | - BS_LEFTTEXT | BS_FLAT | WS_TABSTOP,446,36,68,11 - EDITTEXT IDC_EDIT6,446,51,45,13,ES_RIGHT | ES_AUTOHSCROLL, - WS_EX_RIGHT - CTEXT "Static",IDC_STATIC1,448,69,67,10 - PUSHBUTTON "Process",IDC_BUTTON1,448,80,67,16,0,WS_EX_CLIENTEDGE - PUSHBUTTON "...",IDC_BUTTON2,502,51,13,13,0,WS_EX_CLIENTEDGE - PUSHBUTTON "Keep",IDC_BUTTON3,448,82,32,13,0,WS_EX_CLIENTEDGE - PUSHBUTTON "Restore",IDC_BUTTON4,482,82,33,13,0,WS_EX_CLIENTEDGE - COMBOBOX IDC_COMBO4,400,35,39,61,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_GROUP | WS_TABSTOP - COMBOBOX IDC_COMBO5,400,51,39,86,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_GROUP | WS_TABSTOP - COMBOBOX IDC_COMBO6,400,67,39,61,CBS_DROPDOWNLIST | WS_VSCROLL | - WS_GROUP | WS_TABSTOP - LTEXT "%",IDC_STATIC,494,53,8,10 + BS_LEFTTEXT | BS_FLAT | NOT WS_VISIBLE | WS_TABSTOP,446, + 36,68,11 + EDITTEXT IDC_EDIT6,446,51,45,13,ES_RIGHT | ES_AUTOHSCROLL | NOT + WS_VISIBLE,WS_EX_RIGHT + CTEXT "Static",IDC_TEXT_PREVIEW,448,69,67,10,NOT WS_VISIBLE + PUSHBUTTON "Process",IDC_BUTTON1,448,80,67,16,NOT WS_VISIBLE, + WS_EX_CLIENTEDGE + PUSHBUTTON "...",IDC_BUTTON2,502,51,13,13,NOT WS_VISIBLE, + WS_EX_CLIENTEDGE + PUSHBUTTON "Keep",IDC_BUTTON3,448,82,32,13,NOT WS_VISIBLE, + WS_EX_CLIENTEDGE + PUSHBUTTON "Restore",IDC_BUTTON4,482,82,33,13,NOT WS_VISIBLE, + WS_EX_CLIENTEDGE + COMBOBOX IDC_COMBO4,400,35,39,61,CBS_DROPDOWNLIST | NOT + WS_VISIBLE | WS_VSCROLL | WS_GROUP | WS_TABSTOP + COMBOBOX IDC_COMBO5,400,51,39,86,CBS_DROPDOWNLIST | NOT + WS_VISIBLE | WS_VSCROLL | WS_GROUP | WS_TABSTOP + COMBOBOX IDC_COMBO6,400,67,39,61,CBS_DROPDOWNLIST | NOT + WS_VISIBLE | WS_VSCROLL | WS_GROUP | WS_TABSTOP + LTEXT "%",IDC_TEXT_PERCENT,494,53,8,10,NOT WS_VISIBLE END IDD_CONTROL_INSTRUMENTS DIALOGEX 0, 0, 558, 173 @@ -852,9 +858,9 @@ CONTROL "",IDC_SPIN11,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_NOTHOUSANDS,351,153, 8,11 - COMBOBOX IDC_PLUGIN_VELOCITYSTYLE,371,115,82,50,CBS_DROPDOWNLIST | + COMBOBOX IDC_PLUGIN_VELOCITYSTYLE,367,115,83,50,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_PLUGIN_VOLUMESTYLE,373,148,77,53,CBS_DROPDOWNLIST | + COMBOBOX IDC_PLUGIN_VOLUMESTYLE,367,148,83,53,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_COMBOTUNING,367,39,86,48,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP @@ -915,10 +921,10 @@ RTEXT "--",IDC_TEXT1,204,62,27,8 GROUPBOX "Pitch/Tempo Lock",IDC_STATIC,364,57,89,25 GROUPBOX "Sample Map",IDC_STATIC,461,27,62,141 - CTEXT "Note Velocity",IDC_STATIC,374,101,77,10,SS_CENTERIMAGE, - WS_EX_STATICEDGE - CTEXT "Volume command effect",IDC_STATIC,374,133,77,10, + CTEXT "Velocity handling",IDC_STATIC,367,102,83,10, SS_CENTERIMAGE,WS_EX_STATICEDGE + CTEXT "Volume handling",IDC_STATIC,367,133,83,10, + SS_CENTERIMAGE,WS_EX_STATICEDGE GROUPBOX "Tuning (experimental)",IDC_STATIC,364,28,92,28 END Modified: trunk/OpenMPT/mptrack/mptrack.vcproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack.vcproj 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/mptrack/mptrack.vcproj 2008-09-07 22:13:53 UTC (rev 223) @@ -48,12 +48,12 @@ <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib xsoundlib.lib version.lib opengl32.lib glu32.lib Rpcrt4.lib" + AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib version.lib opengl32.lib glu32.lib Rpcrt4.lib" OutputFile=".\Debug/mptrack.exe" Version="5.0" LinkIncremental="2" SuppressStartupBanner="TRUE" - AdditionalLibraryDirectories="..\xsoundlib\Debug" + AdditionalLibraryDirectories="" DelayLoadDLLs="" GenerateDebugInformation="TRUE" AssemblyDebug="1" @@ -125,12 +125,12 @@ <Tool Name="VCLinkerTool" AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib xsoundlib.lib version.lib opengl32.lib glu32.lib Rpcrt4.lib" + AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib version.lib opengl32.lib glu32.lib Rpcrt4.lib" OutputFile=".\Bin/mptrack.exe" Version="5.0" LinkIncremental="1" SuppressStartupBanner="TRUE" - AdditionalLibraryDirectories="..\xsoundlib\Release" + AdditionalLibraryDirectories="" GenerateMapFile="FALSE" MapFileName=".\Release/mptrack.map" SubSystem="2"/> Modified: trunk/OpenMPT/mptrack/resource.h =================================================================== --- trunk/OpenMPT/mptrack/resource.h 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/mptrack/resource.h 2008-09-07 22:13:53 UTC (rev 223) @@ -701,6 +701,7 @@ #define IDC_CHORDDETECTWAITTIME 2206 #define IDC_STATIC2 2207 #define IDC_STATIC1 2208 +#define IDC_TEXT_PREVIEW 2208 #define IDC_MACROPLUG 2209 #define IDC_MACROPARAM 2210 #define IDC_SAMPLE_LENGTH_NEW 2211 @@ -812,6 +813,11 @@ #define IDC_SPINMOVEMAPPING 2325 #define IDC_BUTTON_HALF 2326 #define IDC_BUTTON_DOUBLE 2327 +#define IDC_GROUPBOX_PITCH_TIME 2328 +#define IDC_TEXT_PITCH 2329 +#define IDC_TEXT_QUALITY 2330 +#define IDC_TEXT_FFT 2331 +#define IDC_TEXT_PERCENT 2332 #define ID_FILE_NEWMOD 32771 #define ID_FILE_NEWXM 32772 #define ID_FILE_NEWS3M 32773 @@ -1043,7 +1049,7 @@ #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 516 #define _APS_NEXT_COMMAND_VALUE 59212 -#define _APS_NEXT_CONTROL_VALUE 2328 +#define _APS_NEXT_CONTROL_VALUE 2333 #define _APS_NEXT_SYMED_VALUE 901 #endif #endif Modified: trunk/OpenMPT/soundlib/Dlsbank.cpp =================================================================== --- trunk/OpenMPT/soundlib/Dlsbank.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Dlsbank.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -1,10 +1,10 @@ /* - * This program is free software; you can redistribute it and 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. + * OpenMPT * + * Dlsbank.cpp + * * Authors: Olivier Lapicque <oli...@jp...> + * OpenMPT devs */ /////////////////////////////////////////////////////////////////////////// Modified: trunk/OpenMPT/soundlib/Fastmix.cpp =================================================================== --- trunk/OpenMPT/soundlib/Fastmix.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Fastmix.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -1,10 +1,10 @@ /* - * This program is free software; you can redistribute it and 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. + * OpenMPT * + * Fastmix.cpp + * * Authors: Olivier Lapicque <oli...@jp...> + * OpenMPT devs */ #include "stdafx.h" Modified: trunk/OpenMPT/soundlib/LOAD_AMF.CPP =================================================================== --- trunk/OpenMPT/soundlib/LOAD_AMF.CPP 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/LOAD_AMF.CPP 2008-09-07 22:13:53 UTC (rev 223) @@ -165,7 +165,7 @@ -BOOL CSoundFile::ReadAMF(LPCBYTE lpStream, DWORD dwMemLength) +BOOL CSoundFile::ReadAMF(LPCBYTE lpStream, const DWORD dwMemLength) //----------------------------------------------------------- { const AMFFILEHEADER *pfh = (AMFFILEHEADER *)lpStream; @@ -251,7 +251,8 @@ MODINSTRUMENT *psmp = &Ins[iData+1]; if (psmp->nLength) { - dwMemPos += ReadSample(psmp, RS_PCM8S, (LPCSTR)(lpStream+dwMemPos), dwMemLength); + if(dwMemPos > dwMemLength) return FALSE; + dwMemPos += ReadSample(psmp, RS_PCM8S, (LPCSTR)(lpStream+dwMemPos), dwMemLength - dwMemPos); } } return TRUE; Modified: trunk/OpenMPT/soundlib/Load_it.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_it.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Load_it.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -1,10 +1,10 @@ /* - * This program is free software; you can redistribute it and 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. + * OpenMPT * + * Load_it.cpp + * * Authors: Olivier Lapicque <oli...@jp...> + * OpenMPT devs */ #include "stdafx.h" @@ -473,8 +473,13 @@ DWORD streamPos = 0; DWORD version; - if(dwMemLength < 12) return FALSE; + // Macro used to make sure that given amount of bytes can be read. + // Returns FALSE from this function if reading is not possible. + #define ASSERT_CAN_READ(x) \ + if( streamPos > dwMemLength || x > dwMemLength - streamPos ) return FALSE; + ASSERT_CAN_READ(12); + // Check file ID memcpy(&id,lpStream+streamPos,sizeof(DWORD)); @@ -494,7 +499,8 @@ streamPos += sizeof(DWORD); // name string - if (streamPos+len<=dwMemLength && len<=sizeof(m_szNames[0])) { + ASSERT_CAN_READ(len); + if (len<=sizeof(m_szNames[0])) { memcpy(m_szNames[0],lpStream+streamPos,len); streamPos += len; m_szNames[0][sizeof(m_szNames[0])-1] = '\0'; @@ -504,7 +510,7 @@ // Song comments // comment string length - if(streamPos + 4 > dwMemLength) return FALSE; + ASSERT_CAN_READ(4); memcpy(&id,lpStream+streamPos,sizeof(DWORD)); streamPos += sizeof(DWORD); if(id > uint16_max) return FALSE; @@ -519,13 +525,15 @@ m_lpszSongComments = NULL; // m_lpszSongComments - if (m_lpszSongComments && id && streamPos + id <= dwMemLength) { + if (m_lpszSongComments && id) + { + ASSERT_CAN_READ(id); memcpy(&m_lpszSongComments[0],lpStream+streamPos,id); streamPos += id; } // Song global config - if(streamPos + 5*4 > dwMemLength) return FALSE; + ASSERT_CAN_READ(5*4); // m_dwSongFlags memcpy(&id,lpStream+streamPos,sizeof(DWORD)); @@ -555,7 +563,7 @@ streamPos += sizeof(DWORD); // Song channels data - if(streamPos + 2*4 > dwMemLength) return FALSE; + ASSERT_CAN_READ(2*4); // m_nChannels memcpy(&id,lpStream+streamPos,sizeof(DWORD)); @@ -571,9 +579,8 @@ // Channels' data for(i=0; i<m_nChannels; i++){ + ASSERT_CAN_READ(3*4 + len); - if(streamPos + 3*4 + len > dwMemLength) return FALSE; - // ChnSettings[i].nPan memcpy(&id,lpStream+streamPos,sizeof(DWORD)); ChnSettings[i].nPan = id; @@ -596,23 +603,24 @@ // Song mix plugins // size of mix plugins data - if(streamPos + 4 > dwMemLength) return FALSE; + ASSERT_CAN_READ(4); memcpy(&id,lpStream+streamPos,sizeof(DWORD)); streamPos += sizeof(DWORD); // mix plugins - if(id > dwMemLength - streamPos) return FALSE; + ASSERT_CAN_READ(id); streamPos += LoadMixPlugins(lpStream+streamPos, id); // Song midi config // midi cfg data length - if(streamPos + 4 > dwMemLength) return FALSE; + ASSERT_CAN_READ(4); memcpy(&id,lpStream+streamPos,sizeof(DWORD)); streamPos += sizeof(DWORD); // midi cfg - if (id<=sizeof(m_MidiCfg) && id+streamPos<=dwMemLength) { + ASSERT_CAN_READ(id); + if (id<=sizeof(m_MidiCfg)) { memcpy(&m_MidiCfg,lpStream+streamPos,id); streamPos += id; } @@ -620,14 +628,14 @@ // Song Instruments // m_nInstruments - if(streamPos + 4 > dwMemLength) return FALSE; + ASSERT_CAN_READ(4); memcpy(&id,lpStream+streamPos,sizeof(DWORD)); m_nInstruments = id; - if(m_nInstruments > 256) return FALSE; + if(m_nInstruments > MAX_INSTRUMENTS) return FALSE; streamPos += sizeof(DWORD); // path string length (=_MAX_PATH) - if(streamPos + 4 > dwMemLength) return FALSE; + ASSERT_CAN_READ(4); memcpy(&id,lpStream+streamPos,sizeof(DWORD)); len = id; if(len > _MAX_PATH) return FALSE; @@ -635,35 +643,30 @@ // instruments' paths for(i=0; i<m_nInstruments; i++){ - if (len+streamPos<=dwMemLength) - { - memcpy(&m_szInstrumentPath[i][0],lpStream+streamPos,len); - streamPos += len; - } - else return FALSE; + ASSERT_CAN_READ(len); + memcpy(&m_szInstrumentPath[i][0],lpStream+streamPos,len); + streamPos += len; } // Song Orders // size of order array (=MAX_ORDERS) - if(streamPos + 4 > dwMemLength) return FALSE; + ASSERT_CAN_READ(4); memcpy(&id,lpStream+streamPos,sizeof(DWORD)); size = id; if(size > MAX_ORDERS) return FALSE; streamPos += sizeof(DWORD); // order data - if (size+streamPos<=dwMemLength) - { - Order.ReadAsByte(lpStream+streamPos, size, dwMemLength-streamPos); - streamPos += size; - } - else return FALSE; + ASSERT_CAN_READ(size); + Order.ReadAsByte(lpStream+streamPos, size, dwMemLength-streamPos); + streamPos += size; + // Song Patterns - if(streamPos + 12 > dwMemLength) return FALSE; + ASSERT_CAN_READ(3*4); // number of patterns (=MAX_PATTERNS) memcpy(&id,lpStream+streamPos,sizeof(DWORD)); size = id; @@ -684,6 +687,7 @@ if (len<=MAX_PATTERNNAME && m_nPatternNames<=MAX_PATTERNS) { m_lpszPatternNames = new char[m_nPatternNames * len]; + ASSERT_CAN_READ(m_nPatternNames * len); memcpy(&m_lpszPatternNames[0],lpStream+streamPos,m_nPatternNames * len); } else return FALSE; @@ -691,9 +695,10 @@ streamPos += m_nPatternNames * len; // modcommand data length - if(streamPos + 4 > dwMemLength) return FALSE; + ASSERT_CAN_READ(4); memcpy(&id,lpStream+streamPos,sizeof(DWORD)); n = id; + if(n != 6) return FALSE; streamPos += sizeof(DWORD); for(UINT npat=0; npat<size; npat++){ @@ -702,9 +707,9 @@ if(Patterns[npat]) { FreePattern(Patterns[npat]); Patterns[npat] = NULL; } // PatternSize[npat] - if(streamPos + 4 > dwMemLength) return FALSE; + ASSERT_CAN_READ(4); memcpy(&id,lpStream+streamPos,sizeof(DWORD)); - if(id > 1024) return FALSE; + if(id > MAX_PATTERN_ROWS) return FALSE; Patterns[npat].Resize(id); streamPos += sizeof(DWORD); @@ -736,14 +741,14 @@ ITSAMPLESTRUCT pis; // Read original number of samples - if(streamPos + 4 > dwMemLength) return FALSE; + ASSERT_CAN_READ(4); memcpy(&id,lpStream+streamPos,sizeof(DWORD)); if(id > MAX_SAMPLES) return FALSE; m_nSamples = id; streamPos += sizeof(DWORD); // Read number of embeded samples - if(streamPos + 4 > dwMemLength) return FALSE; + ASSERT_CAN_READ(4); memcpy(&id,lpStream+streamPos,sizeof(DWORD)); if(id > MAX_SAMPLES) return FALSE; n = id; @@ -752,7 +757,7 @@ // Read samples for(i=0; i<n; i++){ - if(streamPos + 4 + sizeof(ITSAMPLESTRUCT) + 4 > dwMemLength) return FALSE; + ASSERT_CAN_READ(4 + sizeof(ITSAMPLESTRUCT) + 4); // Sample id number memcpy(&id,lpStream+streamPos,sizeof(DWORD)); @@ -841,7 +846,7 @@ __int16 fsize = 0; BYTE * ptr = (BYTE *)(lpStream + streamPos); - if (streamPos + 4 <= dwMemLength) { + if (streamPos <= dwMemLength - 4) { fcode = (*((__int32 *)ptr)); } @@ -903,6 +908,8 @@ } return TRUE; + + #undef ASSERT_CAN_READ } // -! NEW_FEATURE#0023 Modified: trunk/OpenMPT/soundlib/Load_mid.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_mid.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Load_mid.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -1,10 +1,10 @@ /* - * This program is free software; you can redistribute it and 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. + * OpenMPT * + * Load_mid.cpp + * * Authors: Olivier Lapicque <oli...@jp...> + * OpenMPT devs */ ////////////////////////////////////////////// Modified: trunk/OpenMPT/soundlib/Load_xm.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_xm.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Load_xm.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -404,6 +404,8 @@ penv->nPan = 128; penv->nPPC = 5*12; SetDefaultInstrumentValues(penv); + penv->nPluginVelocityHandling = PLUGIN_VELOCITYHANDLING_CHANNEL; + penv->nPluginVolumeHandling = PLUGIN_VOLUMEHANDLING_IGNORE; if (xmsh.vtype & 1) penv->dwFlags |= ENV_VOLUME; if (xmsh.vtype & 2) penv->dwFlags |= ENV_VOLSUSTAIN; if (xmsh.vtype & 4) penv->dwFlags |= ENV_VOLLOOP; Modified: trunk/OpenMPT/soundlib/Mmcmp.cpp =================================================================== --- trunk/OpenMPT/soundlib/Mmcmp.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Mmcmp.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -1,9 +1,8 @@ /* - * This program is free software; you can redistribute it and 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. + * OpenMPT * + * Mmcmp.cpp + * * Authors: Olivier Lapicque <oli...@jp...> */ Modified: trunk/OpenMPT/soundlib/Mmx_mix.cpp =================================================================== --- trunk/OpenMPT/soundlib/Mmx_mix.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Mmx_mix.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -1,10 +1,11 @@ /* - * This program is free software; you can redistribute it and 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. + * OpenMPT * + * Mmx_mix.cpp + * * Authors: Olivier Lapicque <oli...@jp...> + * OpenMPT devs + * * Name Date Description * Olivier Lapicque --/--/-- Creation * Trevor Nunes 26/01/04 encapsulated MMX,AMD,SSE with #define flags Modified: trunk/OpenMPT/soundlib/Sampleio.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sampleio.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Sampleio.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -1,10 +1,10 @@ /* - * This program is free software; you can redistribute it and 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. + * OpenMPT * + * Sampleio.cpp + * * Authors: Olivier Lapicque <oli...@jp...> + * OpenMPT devs */ #include "stdafx.h" Modified: trunk/OpenMPT/soundlib/Snd_dsp.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_dsp.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Snd_dsp.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -1,10 +1,10 @@ /* - * This program is free software; you can redistribute it and 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. + * OpenMPT * + * Snd_dsp.cpp + * * Authors: Olivier Lapicque <oli...@jp...> + * OpenMPT devs */ #include "stdafx.h" Modified: trunk/OpenMPT/soundlib/Snd_eq.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_eq.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Snd_eq.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -1,10 +1,10 @@ /* - * This program is free software; you can redistribute it and 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. + * OpenMPT * + * Snd_eq.cpp + * * Authors: Olivier Lapicque <oli...@jp...> + * OpenMPT devs * * Name Date Description * Modified: trunk/OpenMPT/soundlib/Snd_flt.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_flt.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Snd_flt.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -1,10 +1,10 @@ /* - * This program is free software; you can redistribute it and 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. + * OpenMPT * + * Snd_flt.cpp + * * Authors: Olivier Lapicque <oli...@jp...> + * OpenMPT devs */ #include "stdafx.h" Modified: trunk/OpenMPT/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -1,10 +1,10 @@ /* - * This program is free software; you can redistribute it and 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. + * OpenMPT * + * Snd_fx.cpp + * * Authors: Olivier Lapicque <oli...@jp...> + * OpenMPT devs */ #include "stdafx.h" Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -1,10 +1,10 @@ /* - * This program is free software; you can redistribute it and 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. + * OpenMPT * + * Sndfile.cpp + * * Authors: Olivier Lapicque <oli...@jp...> + * OpenMPT devs */ #include "stdafx.h" @@ -19,6 +19,8 @@ #include <vector> #include <algorithm> +#define str_SampleAllocationError (GetStrI18N(_TEXT("Sample allocation error"))) +#define str_Error (GetStrI18N(_TEXT("Error"))) #ifndef NO_COPYRIGHT #ifndef NO_MMCMP_SUPPORT @@ -1891,10 +1893,12 @@ UINT CSoundFile::ReadSample(MODINSTRUMENT *pIns, UINT nFlags, LPCSTR lpMemFile, DWORD dwMemLength, const WORD format) //----------------------------------------------------------------------------------------------------------------------- { + if(pIns->nLength > MAX_SAMPLE_LENGTH) + pIns->nLength = MAX_SAMPLE_LENGTH; + UINT len = 0, mem = pIns->nLength+6; if ((!pIns) || (pIns->nLength < 4) || (!lpMemFile)) return 0; - if (pIns->nLength > MAX_SAMPLE_LENGTH) pIns->nLength = MAX_SAMPLE_LENGTH; pIns->uFlags &= ~(CHN_16BIT|CHN_STEREO); if (nFlags & RSF_16BIT) { @@ -1906,11 +1910,24 @@ mem *= 2; pIns->uFlags |= CHN_STEREO; } + if ((pIns->pSample = AllocateSample(mem)) == NULL) { pIns->nLength = 0; return 0; } + + // Check that allocated memory size is not less than what the modinstrument itself + // thinks it is. + if( mem < pIns->GetSampleSizeInBytes() ) + { + pIns->nLength = 0; + FreeSample(pIns->pSample); + pIns->pSample = NULL; + MessageBox(0, str_SampleAllocationError, str_Error, MB_ICONERROR); + return 0; + } + switch(nFlags) { // 1: 8-bit unsigned PCM data Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Sndfile.h 2008-09-07 22:13:53 UTC (rev 223) @@ -1,11 +1,12 @@ /* - * This program is free software; you can redistribute it and 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. + * OpenMPT * + * Sndfile.h + * * Authors: Olivier Lapicque <oli...@jp...> + * OpenMPT devs */ + #include "../mptrack/SoundFilePlayConfig.h" #include "tuning.h" #include "mod_specifications.h" @@ -30,7 +31,8 @@ #define MOD_AMIGAC2 0x1AB // -> CODE#0006 // -> DESC="misc quantity changes" -#define MAX_SAMPLE_LENGTH 0x10000000 // 0x04000000 (64MB -> now 256MB) +#define MAX_SAMPLE_LENGTH 0x10000000 // 0x04000000 (64MB -> now 256MB). + // Note: Sample size in bytes can be more than 256 MB. // -! BEHAVIOUR_CHANGE#0006 #define MAX_SAMPLE_RATE 100000 #define MAX_ORDERS 256 @@ -45,7 +47,8 @@ //#else // -> CODE#0006 // -> DESC="misc quantity changes" -#define MAX_CHANNELS 256 //200 //Note: MAX_BASECHANNELS defines max pattern channels +#define MAX_CHANNELS 256 //200 //Note: This is the maximum number of sound channels, + // see MAX_BASECHANNELS for max pattern channels. // -! BEHAVIOUR_CHANGE#0006 //#endif // -> CODE#0006 @@ -1050,7 +1053,7 @@ BOOL ReadDMF(LPCBYTE lpStream, DWORD dwMemLength); BOOL ReadPTM(LPCBYTE lpStream, DWORD dwMemLength); BOOL ReadDBM(LPCBYTE lpStream, DWORD dwMemLength); - BOOL ReadAMF(LPCBYTE lpStream, DWORD dwMemLength); + BOOL ReadAMF(LPCBYTE lpStream, const DWORD dwMemLength); BOOL ReadMT2(LPCBYTE lpStream, DWORD dwMemLength); BOOL ReadPSM(LPCBYTE lpStream, DWORD dwMemLength); BOOL ReadJ2B(LPCBYTE lpStream, DWORD dwMemLength); Modified: trunk/OpenMPT/soundlib/Sndmix.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndmix.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Sndmix.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -1,10 +1,10 @@ /* - * This program is free software; you can redistribute it and 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. + * OpenMPT * + * Sndmix.cpp + * * Authors: Olivier Lapicque <oli...@jp...> + * OpenMPT devs */ #include "stdafx.h" Modified: trunk/OpenMPT/soundlib/Tables.cpp =================================================================== --- trunk/OpenMPT/soundlib/Tables.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Tables.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -1,10 +1,10 @@ /* - * This program is free software; you can redistribute it and 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. + * OpenMPT * + * Tables.cpp + * * Authors: Olivier Lapicque <oli...@jp...> + * OpenMPT devs * * Name Date Description: * Olivier Lapicque --/--/-- Creator Modified: trunk/OpenMPT/soundlib/Waveform.cpp =================================================================== --- trunk/OpenMPT/soundlib/Waveform.cpp 2008-08-24 20:33:31 UTC (rev 222) +++ trunk/OpenMPT/soundlib/Waveform.cpp 2008-09-07 22:13:53 UTC (rev 223) @@ -1,10 +1,10 @@ /* - * This program is free software; you can redistribute it and 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. + * OpenMPT * + * Waveform.cpp + * * Authors: Olivier Lapicque <oli...@jp...> + * OpenMPT devs */ #include "stdafx.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |