From: <sag...@us...> - 2014-05-03 21:29:52
|
Revision: 4035 http://sourceforge.net/p/modplug/code/4035 Author: saga-games Date: 2014-05-03 21:29:42 +0000 (Sat, 03 May 2014) Log Message: ----------- [Fix] Ctrl+Enter could lead to crashes in previous build. [Fix] With new installations (and probably also upgraded ones), it was possible that OpenMPT was internally rendering at a different sample rate than the sound device was outputting (https://forum.openmpt.org/index.php?topic=5265.0). The current fix changes the default mix rate for sound device structs to 44KHz (was 48Khz) to be compatible with the default mix rate in the mixer. The problem is that somehow the 48KHz were not propagated to the mixer, so of course this is only a quick'n'easy fix for the new OpenMPT and still needs to be fixed properly. [Doc] Updated release note documents. [Mod] OpenMPT: Version is now 1.23.02.00 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/installer/install.iss trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/mptrack/manual_generator/run.sh trunk/OpenMPT/mptrack/manual_generator/wiki.py trunk/OpenMPT/packageTemplate/History.txt trunk/OpenMPT/packageTemplate/OMPT_1.23_ReleaseNotes.html trunk/OpenMPT/sounddev/SoundDevice.h Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-05-03 15:43:50 UTC (rev 4034) +++ trunk/OpenMPT/common/versionNumber.h 2014-05-03 21:29:42 UTC (rev 4035) @@ -16,8 +16,8 @@ //Version definitions. The only thing that needs to be changed when changing version number. #define VER_MAJORMAJOR 1 #define VER_MAJOR 23 -#define VER_MINOR 01 -#define VER_MINORMINOR 04 +#define VER_MINOR 02 +#define VER_MINORMINOR 00 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/installer/install.iss =================================================================== --- trunk/OpenMPT/installer/install.iss 2014-05-03 15:43:50 UTC (rev 4034) +++ trunk/OpenMPT/installer/install.iss 2014-05-03 21:29:42 UTC (rev 4035) @@ -76,7 +76,7 @@ Source: packageTemplate\readme.txt; DestDir: {app}; Flags: ignoreversion Source: ..\packageTemplate\History.txt; DestDir: {app}; Flags: ignoreversion -Source: ..\packageTemplate\OpenMPT Manual.pdf; DestDir: {app}; Flags: ignoreversion +Source: ..\packageTemplate\OpenMPT Manual.chm; DestDir: {app}; Flags: ignoreversion ; release notes Source: ..\packageTemplate\ReleaseNotesImages\general\*.*; DestDir: {app}\ReleaseNotesImages\general\; Flags: ignoreversion sortfilesbyextension Modified: trunk/OpenMPT/mptrack/View_tre.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp 2014-05-03 15:43:50 UTC (rev 4034) +++ trunk/OpenMPT/mptrack/View_tre.cpp 2014-05-03 21:29:42 UTC (rev 4035) @@ -273,7 +273,7 @@ CModScrollView *view = static_cast<CModScrollView *>(CMainFrame::GetMainFrame()->GetActiveView()); HTREEITEM hItem = GetSelectedItem(); const ModItem modItem = GetModItem(hItem); - if(view && modItem.type == MODITEM_INSLIB_SAMPLE || modItem.type == MODITEM_INSLIB_INSTRUMENT) + if(view && (modItem.type == MODITEM_INSLIB_SAMPLE || modItem.type == MODITEM_INSLIB_INSTRUMENT)) { const mpt::PathString file = InsLibGetFullPath(hItem); const char *className = view->GetRuntimeClass()->m_lpszClassName; Modified: trunk/OpenMPT/mptrack/manual_generator/run.sh =================================================================== --- trunk/OpenMPT/mptrack/manual_generator/run.sh 2014-05-03 15:43:50 UTC (rev 4034) +++ trunk/OpenMPT/mptrack/manual_generator/run.sh 2014-05-03 21:29:42 UTC (rev 4035) @@ -1,4 +1,5 @@ #!/bin/bash rm -rf html/*.* mkdir html -./wiki.py \ No newline at end of file +./wiki.py +tar -cvzf html.tgz html \ No newline at end of file Modified: trunk/OpenMPT/mptrack/manual_generator/wiki.py =================================================================== --- trunk/OpenMPT/mptrack/manual_generator/wiki.py 2014-05-03 15:43:50 UTC (rev 4034) +++ trunk/OpenMPT/mptrack/manual_generator/wiki.py 2014-05-03 21:29:42 UTC (rev 4035) @@ -63,10 +63,11 @@ Full-text search=Yes Language=0x409 English (United States) Title=OpenMPT Manual +Default Window=OpenMPT Default topic=""" + localurl(pages[0]) + """ [WINDOWS] -OpenMPT=,"OpenMPT Manual.hhc",,"" + localurl(pages[0]) + "",,,,,,0x42520,,0x300e,[50,50,750,550],0xb0000,,,,,,0 +OpenMPT=,"OpenMPT Manual.hhc",,""" + localurl(pages[0]) + """,,,,,,0x42520,215,0x300e,[20,20,780,580],0xb0000,,,,,,0 [FILES] style.css Modified: trunk/OpenMPT/packageTemplate/History.txt =================================================================== --- trunk/OpenMPT/packageTemplate/History.txt 2014-05-03 15:43:50 UTC (rev 4034) +++ trunk/OpenMPT/packageTemplate/History.txt 2014-05-03 21:29:42 UTC (rev 4035) @@ -25,6 +25,61 @@ <ks> coda / Ken Snyder +v1.23.02.00 (3 May 2014, revision 4035) +--------------------------------------- +General tab + [Fix] <js> Moving plugins unintentionally broke the plugin chain in many cases (http://bugs.openmpt.org/view.php?id=514). + +Pattern tab + [Imp] <js> Don't require shift key to be pressed when entering numeric effect letters on French keyboards (https://forum.openmpt.org/index.php?topic=5279.0). + [Imp] <js> Channel mute / channel mute on pattern transition shortcuts got extended to cover all channels covered by the selection instead of just the channel where the cursor is. + [Mod] <js> After pasting pattern data, the pasted area is automatically marked (http://bugs.openmpt.org/view.php?id=498). + [Fix] <js> When "loop pattern" was enabled, jumping between patterns could trigger sample syncing while playback was paused. + [Fix] <js> Other small fixes in playback adjustment code when jumping around. + [Fix] <js> Undoing channel deletion didn't work properly. + [Fix] <js> Dragging an order selection also works if the first selection point isn't visible. + +Sample tab + [New] <js> Added sample transpose shortcuts to quickly change the middle-C frequency. + [Fix] <js> Fade operation was broken in 64-bit builds (http://bugs.openmpt.org/view.php?id=507). + [Fix] <js> Crossfading sample loops modified one sampling point too much, which couldn't be undone properly. + [Imp] <js> WAV / FLAC saving: When there's only a sustain loop and no normal loop, ensure that it is treated as a sustain loop after reloading the sample (like it was done in older versions, tx dusthillguy). + [Fix] <js> Load / Save / New shortcuts are now also handled properly when the upper panel is focussed. + [Fix] <js> Adding silence to a sample that's not 8-bit mono broke in OpenMPT 1.23. + +Tree view + [New] <js> In the instrument library, Ctrl+Enter loads the selected instrument into the currently active sample / instrument editor window (http://bugs.openmpt.org/view.php?id=499). + [Imp] <js> Ctrl+Enter starts label editing. + [Fix] <js> Duplicating samples allocated way too much memory in the previous version, which could result in crashes (http://bugs.openmpt.org/view.php?id=505). + +VST::Plugin Bridge + [Fix] <js> Fixed KarmaFX EQ, a couple of VarietyOfSound plugins and possibly others that don't set any specific time flags, but still call audioMasterGetTime. + +Playback + [Imp] <js> For XM files, a new mix mode "Compatible (FT2 Pan Law)" has been added which is the same as the "compatible" mix mode, but this enforces FT2's pan law, while the "normal" compatible mix mode no longer does so. This should make tunes created with OpenMPT 1.22 or older not break drastically anymore if they make use of a lot of panning stuff. + [Fix] <js> Fixed potential crash in 64-bit version when playing certain songs with instrument envelopes (tx xTr1m). + +IT::Compatible Playback Mode + [Fix] <js> Sustained envelopes were released too early if the loop end was hit on exactly the same tick as the note-off event. + +MOD + [Imp] <js> Added ProTracker-style offset when note but no instrument number is specified in ProTracker 1/2 mode (fixes h0ffman's Revision 2014 tracked music entry). + +Module cleanup + [Fix] <js> Rearranging samples broke in the previous version (http://bugs.openmpt.org/view.php?id=497). + +Audio I/O + [Fix] <js> With new installations (and probably also upgraded ones), it was possible that OpenMPT was internally rendering at a different sample rate than the sound device was outputting (https://forum.openmpt.org/index.php?topic=5265.0). + +Misc + [Imp] <js> All parts of the Song Properties dialog are now updated instantly when switching between formats. + [Imp] <js> Made S3M amiga frequency limits option editable from the Song Properties dialog. + [Mod] <js> Changed manual format from PDF to CHM. When opening help from certain dialogs, the relevant manual page is automatically opened. + [Fix] <js> SF2 sample frequency conversion was broken in 64-bit builds (https://bugs.openmpt.org/view.php?id=508). + [Fix] <js> Modifying patterns, samples, etc. should now always update other views of the same type of the same module properly. + [Fix] <js> DefaultTemplate option was looking for the template file in the wrong paths. + + v1.23.01.00 (29 March 2014, revision 3998) ------------------------------------------ General tab @@ -381,7 +436,7 @@ MOD [Fix] <js> EEx + Dxx on the same row causes the target row of Dxx to be skipped in ProTracker (fixes condom_corruption by Travolta). [Fix] <js> When using EEx, there should be only one "first tick" event. Ticks that are multiples of the song speed are longer treated as first ticks. - [Fix] <js> Frequency limiting was not always correct in PT 1.x mode (Fixes black_queen.mod). + [Fix] <js> Frequency limiting was not always correct in ProTracker 1.x mode (Fixes black_queen.mod). [Fix] <js> SoundTracker modules with "hidden" patterns in their order list didn't play properly anymore (probably since v1.22.03, affected e.g. Bad Dudes soundtrack). Other formats @@ -1452,7 +1507,7 @@ MOD::Loading [New] <js> Heuristic detection for VBlank MODs. Most MODs use the CIA timer instead of VBlank timing, but some don't. - [New] <js> Heuristic detection for PT 1.x playback mode: If there is pattern data that looks like it needs on-the-fly sample swapping, PT 1.x mode is enabled. + [New] <js> Heuristic detection for ProTracker 1.x playback mode: If there is pattern data that looks like it needs on-the-fly sample swapping, ProTracker 1.x mode is enabled. [New] <js> Heuristic detection for MODs with 7-bit panning, which is then automatically converted to 8-Bit panning. [Fix] <js> Tentative fix for MODs with short loops at the sample start that were most likely not intended. @@ -2195,7 +2250,7 @@ [Fix] <js> Don't ignore last pattern anymore if an XM file has no instruments. XM::Saving - [Imp] <js> Compatibility export: Export cuts off channels > 32. + [Imp] <js> Compatibility export: Only save up to 32 channels. [Imp] <js> Setting "OpenMPT <version number>" in the "made with" field (as any other tracker put their signature in here as well). [Fix] <js> Always save with a channel number that's a multiple of two so FT2 will load the file correctly. [Fix] <js> F20 won't turn into G20 anymore. @@ -2212,14 +2267,14 @@ [Fix] <js> Tempo slides won't exceed 255 BPM in compatible mode. [Fix] <js> In compatibility mode, retrigger with vxx on the same channel will always reset the retriggered note's volume. [Fix] <js> More compatible handling of Kxx effect. - [Fix] <js> Pattern loops are now handled correctly (using compatibility switch). + [Fix] <js> Pattern loops are now handled correctly. [Fix] <js> Out of range global volume, local global volume slides. MOD [Imp] <js> Module Creation: MOD files have 4 channels by default. [Imp] <js> Moved loop length check from compatibility export to normal save. There you go, Amiga users! :) [Fix] <js> Module Creation / Loading: Sane default volume settings for MOD / S3M files again (128 global volume, 48 sample volume). - [Fix] <js> Inserting more than 128 orders in MOD format is not possible anymore. + [Fix] <js> Inserting more than the allowed 128 orders in MOD format is not possible anymore. MOD::Loading [Fix] <js> Last pattern was not loading in .MODs that have no samples. @@ -2904,10 +2959,9 @@ [Fix] <rf> More fixes to plugs that try to get tempo before we've had a chance to init them properly. [Fix] <rf> Backed out first attempt at reducing hangs on stop (from rev. 1.13.2.10) - it was pointless. I think 1.13.2.11 really solved it though. [Fix] <rf> Fixed minor imprecision in \xx slide calculations. - [Fix] <rf> Minor GUI refresh fixes (tx xtr1m). + [Fix] <rf> Minor GUI refresh fixes (tx xTr1m). - v1.17RC1 (revision 1.13.2.12) ----------------------------- [Fix] <rf> Fix to plugs that try to get tempo before we've had a chance to init them properly. Modified: trunk/OpenMPT/packageTemplate/OMPT_1.23_ReleaseNotes.html =================================================================== --- trunk/OpenMPT/packageTemplate/OMPT_1.23_ReleaseNotes.html 2014-05-03 15:43:50 UTC (rev 4034) +++ trunk/OpenMPT/packageTemplate/OMPT_1.23_ReleaseNotes.html 2014-05-03 21:29:42 UTC (rev 4035) @@ -107,14 +107,14 @@ <h3>General</h3> <ul> - <li>OpenMPT is now available as a native <strong>64-bit application</strong>!</li> + <li>OpenMPT is now available as native <strong>64-bit application</strong>!</li> <li><strong>Redo</strong> functionality for the pattern and sample editor.</li> - <li>A <strong>tempo tap</strong> button to quickly tap in the desired beats per minutes instead of guessing them.</li> - <li>Reduced <strong>clicks on badly looped samples</strong> when interpolation is turned on.</li> + <li>A <strong>tempo tap</strong> to quickly tap in the desired beats per minutes instead of guessing them.</li> + <li>Reduced <strong>clicks on looped samples</strong> when interpolation is turned on.</li> <li>Sound device settings are now <strong>remembered per device</strong>.</li> <li>Codec export settings are now remembered between sessions.</li> <li>Added options to open the sound device right at the program start and keep playing silence when stopping sound.</li> - <li>Support for <strong>unicode paths</strong> almost everywhere (just some internal settings that are written to the settings file might not be saved if the settings folder contains non-ANSI characters).</li> + <li>Support for <strong>unicode paths</strong> almost everywhere (just some internal settings that are written to the settings file might not be written correctly if the settings folder contains non-ANSI characters).</li> <li>OpenMPT (32-bit) is now <strong>large address aware</strong>, so more than 2 GB of RAM can be used for samples and plugins on systems where it's available.</li> <li>Restructured the settings dialog into some more logical divisions.</li> <li>Missing shortcuts from the default keyboard layout are now automatically added to other keyboard layouts.</li> @@ -129,7 +129,7 @@ <h3>Pattern Editor</h3> <ul> <li>Experimental new feature: Seeking in a module tries to <strong>keep sample sync</strong>, i.e. notes that are still playing from a previous pattern can still be heard. This can be enabled from the general options.</li> - <li>The <strong>Note Properites Dialog</strong> has been simplified from three tabs into one bigger dialog, with much better support for PC events.</li> + <li>The <strong>Note Properties Dialog</strong> has been simplified from three tabs into one bigger dialog, with much better support for PC events.</li> <li>Effect letter input should now work better on <strong>non-latin keyboard layouts</strong>, such as cyrillic.</li> </ul> @@ -138,6 +138,7 @@ <li><strong>Double-clicking the instrument library path</strong> (first item in the lower view) opens a folder browser dialog to quickly browse to a new location.</li> <li>The instrument library is now <strong>refreshed automatically</strong> when there are changes in the folder (e.g. adding new files).</li> <li>Backspace can now be used to <strong>go up one directory</strong> in the instrument library.</li> + <li>In the instrument library, Ctrl+Enter loads the selected instrument into the currently active sample / instrument editor window.</li> </ul> <h3>Plugins</h3> @@ -180,10 +181,10 @@ <i>This list has mostly been copied over from the old OpenMPT 1.17 RC2 release notes, so this not very comprehensive... :-)</i> </p> <ul> - <li>The plugin bridge is new and hasn't been tested very much yet. It is known that some plugins don't work in it at all (e.g. KarmaFX Equalizer). Custom plugin GUIs won't work in Wine. Please report any other issues you may be having with the plugin bridge!</li> + <li>The plugin bridge is new and hasn't been tested very much yet. It is known that some plugins don't work in it at all. Custom plugin GUIs are known to not work in Wine. Please report any other issues you may be having with the plugin bridge!</li> <li>Far from perfect VST support (no buses for audio / MIDI routing, only a few tracker effects are supported, etc...)</li> - <li>Previewing samples from the treeview's file browser stops the playing module.</li> - <li>Cannot preview instruments directly from the MIDI Library in the tree view.</li> + <li>Previewing samples from the tree view's file browser stops the playing module.</li> + <li>Cannot preview soundfont instruments directly from the MIDI Library in the tree view.</li> <li>Excessive performance drop when dragging over the graphical parameter editor during playback.</li> <li>The Right Alt (or Alt Gr) key is not handled well by the keyboard configuration.</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> Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2014-05-03 15:43:50 UTC (rev 4034) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2014-05-03 21:29:42 UTC (rev 4035) @@ -257,7 +257,7 @@ : hWnd(NULL) , LatencyMS(100) , UpdateIntervalMS(5) - , Samplerate(48000) + , Samplerate(44100) , Channels(2) , sampleFormat(SampleFormatFloat32) , ExclusiveMode(false) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-05-04 09:02:44
|
Revision: 4037 http://sourceforge.net/p/modplug/code/4037 Author: manxorist Date: 2014-05-04 09:02:37 +0000 (Sun, 04 May 2014) Log Message: ----------- [Fix] Always propagate the current actual sound device samplerate to the global mixer samplerate. Revert sound device default samplerate to 48000 (reverts part of r4035 ). [Mod] OpenMPT: Version is now 1.23.02.01 Revision Links: -------------- http://sourceforge.net/p/modplug/code/4035 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/sounddev/SoundDevice.h Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-05-03 21:33:05 UTC (rev 4036) +++ trunk/OpenMPT/common/versionNumber.h 2014-05-04 09:02:37 UTC (rev 4037) @@ -17,7 +17,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 23 #define VER_MINOR 02 -#define VER_MINORMINOR 00 +#define VER_MINORMINOR 01 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2014-05-03 21:33:05 UTC (rev 4036) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2014-05-04 09:02:37 UTC (rev 4037) @@ -828,7 +828,8 @@ } gpSoundDevice->SetMessageReceiver(this); gpSoundDevice->SetSource(this); - if(!gpSoundDevice->Open(TrackerSettings::Instance().GetSoundDeviceSettings(deviceID))) + SoundDeviceSettings deviceSettings = TrackerSettings::Instance().GetSoundDeviceSettings(deviceID); + if(!gpSoundDevice->Open(deviceSettings)) { Reporting::Error("Unable to open sound device: Could not open sound device."); return false; @@ -839,8 +840,8 @@ Reporting::Error("Unable to open sound device: Unknown sample format."); return false; } - SoundDeviceSettings deviceSettings = TrackerSettings::Instance().GetSoundDeviceSettings(deviceID); deviceSettings.sampleFormat = actualSampleFormat; + TrackerSettings::Instance().MixerSamplerate = gpSoundDevice->GetSettings().Samplerate; TrackerSettings::Instance().SetSoundDeviceSettings(deviceID, deviceSettings); return true; } Modified: trunk/OpenMPT/sounddev/SoundDevice.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.h 2014-05-03 21:33:05 UTC (rev 4036) +++ trunk/OpenMPT/sounddev/SoundDevice.h 2014-05-04 09:02:37 UTC (rev 4037) @@ -257,7 +257,7 @@ : hWnd(NULL) , LatencyMS(100) , UpdateIntervalMS(5) - , Samplerate(44100) + , Samplerate(48000) , Channels(2) , sampleFormat(SampleFormatFloat32) , ExclusiveMode(false) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-05-04 21:39:06
|
Revision: 4039 http://sourceforge.net/p/modplug/code/4039 Author: saga-games Date: 2014-05-04 21:38:57 +0000 (Sun, 04 May 2014) Log Message: ----------- [Doc] Updated release note documents. [Mod] OpenMPT: Version is now 1.23.03.00 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/packageTemplate/History.txt Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-05-04 20:40:56 UTC (rev 4038) +++ trunk/OpenMPT/common/versionNumber.h 2014-05-04 21:38:57 UTC (rev 4039) @@ -16,8 +16,8 @@ //Version definitions. The only thing that needs to be changed when changing version number. #define VER_MAJORMAJOR 1 #define VER_MAJOR 23 -#define VER_MINOR 02 -#define VER_MINORMINOR 01 +#define VER_MINOR 03 +#define VER_MINORMINOR 00 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/packageTemplate/History.txt =================================================================== --- trunk/OpenMPT/packageTemplate/History.txt 2014-05-04 20:40:56 UTC (rev 4038) +++ trunk/OpenMPT/packageTemplate/History.txt 2014-05-04 21:38:57 UTC (rev 4039) @@ -25,6 +25,15 @@ <ks> coda / Ken Snyder +v1.23.03.00 (4 May 2014, revision 4039) +--------------------------------------- +VST / DMO Plugins + [Mod] <js> If an instrument specifies a MIDI program / bank to be used, always re-send this information after restarting playback. Previously, this information was only resent during first play or when it was changed by the user. This fixes some external softsynths controlled through the MIDI I/O plugin. + +Audio I/O + [Fix] <jh> When upgrading from OpenMPT 1.23.01.00 to OpenMPT 1.23.02.00, it was possible that audio was now playing too slow instead of too fast. + + v1.23.02.00 (3 May 2014, revision 4035) --------------------------------------- General tab @@ -33,7 +42,7 @@ Pattern tab [Imp] <js> Don't require shift key to be pressed when entering numeric effect letters on French keyboards (https://forum.openmpt.org/index.php?topic=5279.0). [Imp] <js> Channel mute / channel mute on pattern transition shortcuts got extended to cover all channels covered by the selection instead of just the channel where the cursor is. - [Mod] <js> After pasting pattern data, the pasted area is automatically marked (http://bugs.openmpt.org/view.php?id=498). + [Mod] <js> After pasting pattern data, the pasted area is automatically selected (http://bugs.openmpt.org/view.php?id=498). [Fix] <js> When "loop pattern" was enabled, jumping between patterns could trigger sample syncing while playback was paused. [Fix] <js> Other small fixes in playback adjustment code when jumping around. [Fix] <js> Undoing channel deletion didn't work properly. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-05-06 20:49:48
|
Revision: 4042 http://sourceforge.net/p/modplug/code/4042 Author: saga-games Date: 2014-05-06 20:49:41 +0000 (Tue, 06 May 2014) Log Message: ----------- [Fix] Plugin bridge: Don't crash (in release mode) when a plugin sends an opcode that isn't expected to have ptr != 0 (https://bugs.openmpt.org/view.php?id=519) [Imp] VST: When trying to load a plugin where both the 32-bit and 64-bit version are registered in OpenMPT, prefer the native version. [Mod] OpenMPT: Version is now 1.23.03.01 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/pluginBridge/Bridge.cpp trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-05-05 19:51:41 UTC (rev 4041) +++ trunk/OpenMPT/common/versionNumber.h 2014-05-06 20:49:41 UTC (rev 4042) @@ -17,7 +17,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 23 #define VER_MINOR 03 -#define VER_MINORMINOR 00 +#define VER_MINORMINOR 01 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/pluginBridge/Bridge.cpp =================================================================== --- trunk/OpenMPT/pluginBridge/Bridge.cpp 2014-05-05 19:51:41 UTC (rev 4041) +++ trunk/OpenMPT/pluginBridge/Bridge.cpp 2014-05-06 20:49:41 UTC (rev 4042) @@ -983,7 +983,10 @@ break; default: +#ifdef _DEBUG if(ptr != nullptr) __debugbreak(); +#endif + break; } if(ptrOut != 0) Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp =================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.cpp 2014-05-05 19:51:41 UTC (rev 4041) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.cpp 2014-05-06 20:49:41 UTC (rev 4042) @@ -479,7 +479,7 @@ VSTPluginLib *pFound = nullptr; // Find plugin in library - int match = 0; + int8 match = 0; // "Match quality" of found plugin. Higher value = better match. for(const_iterator p = begin(); p != end(); p++) { VSTPluginLib *plug = *p; @@ -490,15 +490,20 @@ if(matchID && matchName) { pFound = plug; - break; + if(plug->IsNative(false)) + { + break; + } + // If the plugin isn't native, first check if a native version can be found. + match = 3; } else if(matchID && match < 2) { + pFound = plug; match = 2; - pFound = plug; } else if(matchName && match < 1) { + pFound = plug; match = 1; - pFound = plug; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-05-14 09:43:49
|
Revision: 4051 http://sourceforge.net/p/modplug/code/4051 Author: manxorist Date: 2014-05-14 09:43:38 +0000 (Wed, 14 May 2014) Log Message: ----------- [New] build: Support libunmo3 for linopenmpt unix builds. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/common/BuildSettings.h Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2014-05-13 10:37:34 UTC (rev 4050) +++ trunk/OpenMPT/Makefile 2014-05-14 09:43:38 UTC (rev 4051) @@ -52,6 +52,7 @@ # (defaults are 0): # # NO_ZLIB=1 Avoid using zlib, even if found +# USE_MO3=1 Support dynamic loading of unmo3 shared library # # # Build flags for openmpt123 (provide on each `make` invocation) @@ -264,6 +265,12 @@ endif endif +ifeq ($(USE_MO3),1) +CPPFLAGS_MO3 := -DMPT_WITH_MO3 +LDLIBS_MO3 := -ldl +else +endif + ifeq ($(USE_SDL),1) #LDLIBS += -lsdl ifeq ($(shell pkg-config --exists sdl && echo yes),yes) @@ -313,9 +320,9 @@ endif endif -CPPFLAGS += $(CPPFLAGS_ZLIB) -LDFLAGS += $(LDFLAGS_ZLIB) -LDLIBS += $(LDLIBS_ZLIB) +CPPFLAGS += $(CPPFLAGS_ZLIB) $(CPPFLAGS_MO3) +LDFLAGS += $(LDFLAGS_ZLIB) $(LDFLAGS_MO3) +LDLIBS += $(LDLIBS_ZLIB) $(LDLIBS_MO3) CPPFLAGS_OPENMPT123 += $(CPPFLAGS_SDL) $(CPPFLAGS_PORTAUDIO) $(CPPFLAGS_FLAC) $(CPPFLAGS_WAVPACK) $(CPPFLAGS_SNDFILE) LDFLAGS_OPENMPT123 += $(LDFLAGS_SDL) $(LDFLAGS_PORTAUDIO) $(LDFLAGS_FLAC) $(LDFLAGS_WAVPACK) $(LDFLAGS_SNDFILE) Modified: trunk/OpenMPT/common/BuildSettings.h =================================================================== --- trunk/OpenMPT/common/BuildSettings.h 2014-05-13 10:37:34 UTC (rev 4050) +++ trunk/OpenMPT/common/BuildSettings.h 2014-05-14 09:43:38 UTC (rev 4051) @@ -163,9 +163,11 @@ #define NO_ASIO #define NO_VST #define NO_PORTAUDIO -#if !defined(_WIN32) || (defined(_WIN32) && !defined(_M_IX86)) +#if !defined(MPT_WITH_MO3) && !(MPT_COMPILER_MSVC) +#ifndef NO_MO3 #define NO_MO3 #endif +#endif #define NO_DSOUND #define NO_FLAC #if !defined(MPT_WITH_ZLIB) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-05-23 01:08:35
|
Revision: 4057 http://sourceforge.net/p/modplug/code/4057 Author: saga-games Date: 2014-05-23 01:08:30 +0000 (Fri, 23 May 2014) Log Message: ----------- [Fix] VST: When trying to play a VST with no instrument assigned yet, prevent notes from being stuck after closing the instrument creation confirmation. [Fix] Tree view: It was not possible to drag&drop drums from sound banks (http://bugs.openmpt.org/view.php?id=536, x64 only) [Mod] OpenMPT: Version is now 1.23.03.02 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/AbstractVstEditor.cpp trunk/OpenMPT/mptrack/View_tre.cpp Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-05-17 16:54:04 UTC (rev 4056) +++ trunk/OpenMPT/common/versionNumber.h 2014-05-23 01:08:30 UTC (rev 4057) @@ -17,7 +17,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 23 #define VER_MINOR 03 -#define VER_MINORMINOR 01 +#define VER_MINORMINOR 02 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2014-05-17 16:54:04 UTC (rev 4056) +++ trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2014-05-23 01:08:30 UTC (rev 4057) @@ -355,7 +355,7 @@ KeyEventType kT = ih->GetKeyEventType(nFlags); // If we successfully mapped to a command and plug does not listen for keypresses, no need to pass message on. - if(ih->KeyEvent(kCtxVSTGUI, nChar, nRepCnt, nFlags, kT, (CWnd*)this) != kcNull) + if(ih->KeyEvent(kCtxVSTGUI, nChar, nRepCnt, nFlags, kT, this) != kcNull) { return true; } @@ -460,7 +460,10 @@ return false; } else { - return CreateInstrument(); + CreateInstrument(); + // Return true since we don't want to trigger the note for which the instrument has been validated yet. + // Otherwise, the note might hang forever because the key-up event will go missing. + return false; } } else { Modified: trunk/OpenMPT/mptrack/View_tre.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp 2014-05-17 16:54:04 UTC (rev 4056) +++ trunk/OpenMPT/mptrack/View_tre.cpp 2014-05-23 01:08:30 UTC (rev 4057) @@ -1140,13 +1140,13 @@ hRootParent = GetParentRootItem(hItem); } - DWORD_PTR itemData = GetItemData(hItem); - DWORD_PTR rootItemData = GetItemData(hRootParent); + uint32 itemData = static_cast<uint32>(GetItemData(hItem)); + uint32 rootItemData = static_cast<uint32>(GetItemData(hRootParent)); // Midi Library if(hRootParent == m_hMidiLib && hRootParent != hItem && !IsSampleBrowser()) { - return ModItem(static_cast<ModItemType>(itemData >> MIDILIB_SHIFT), static_cast<uint32>(itemData & MIDILIB_MASK)); + return ModItem(static_cast<ModItemType>(itemData >> MIDILIB_SHIFT), itemData & MIDILIB_MASK); } // Instrument Library if(hRootParent == m_hInsLib || (IsSampleBrowser() && hItem != m_hInsLib)) @@ -1196,7 +1196,7 @@ } } - ModItem modItem(MODITEM_NULL, (uint32)itemData); + ModItem modItem(MODITEM_NULL, itemData); if (hItemParent == pInfo->hPatterns) { // Pattern @@ -1220,7 +1220,7 @@ // DLS banks if(itemData < m_tiDLS.size() && hItem == m_tiDLS[itemData]) - return ModItem(MODITEM_DLSBANK_FOLDER, (uint32)itemData); + return ModItem(MODITEM_DLSBANK_FOLDER, itemData); // DLS Instruments if(hRootParent != nullptr) @@ -1402,7 +1402,7 @@ case MODITEM_MIDIINSTRUMENT: { MIDILIBSTRUCT &midiLib = CTrackApp::GetMidiLibrary(); - if(modItemID < 256 && !midiLib.MidiMap[modItemID].empty()) + if(modItemID < CountOf(midiLib.MidiMap) && !midiLib.MidiMap[modItemID].empty()) { CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); if (pMainFrm) pMainFrm->PlaySoundFile(midiLib.MidiMap[modItemID], static_cast<ModCommand::NOTE>(nParam)); @@ -1410,8 +1410,7 @@ } return TRUE; - default: - if (modItem.type == MODITEM_DLSBANK_INSTRUMENT) + case MODITEM_DLSBANK_INSTRUMENT: { const DlsItem &item = *static_cast<const DlsItem *>(&modItem); CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-05-24 17:05:50
|
Revision: 4062 http://sourceforge.net/p/modplug/code/4062 Author: saga-games Date: 2014-05-24 17:05:42 +0000 (Sat, 24 May 2014) Log Message: ----------- [Fix] Sample tab: When removing DC offset from a sample, the wrong volume variable on channels currently playing the modified sample was modified. [Int] Make mptrack depend on the plugin bridge so that it always definitely get recompiled if e.g. version number changes. Modified Paths: -------------- trunk/OpenMPT/mptrack/MPTRACK_10.sln trunk/OpenMPT/soundlib/modsmp_ctrl.cpp Modified: trunk/OpenMPT/mptrack/MPTRACK_10.sln =================================================================== --- trunk/OpenMPT/mptrack/MPTRACK_10.sln 2014-05-24 07:59:34 UTC (rev 4061) +++ trunk/OpenMPT/mptrack/MPTRACK_10.sln 2014-05-24 17:05:42 UTC (rev 4062) @@ -1,6 +1,9 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual Studio 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mptrack", "mptrack_10.vcxproj", "{21D95071-FB97-4E69-B3B1-050D0D4A5021}" + ProjectSection(ProjectDependencies) = postProject + {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10} = {8D55AB6B-DAB3-4EFB-9169-7EAF995D5C10} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flac", "..\build\gen\flac.vcxproj", "{E599F5AA-F9A3-46CC-8DB0-C8DEFCEB90C5}" EndProject Modified: trunk/OpenMPT/soundlib/modsmp_ctrl.cpp =================================================================== --- trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2014-05-24 07:59:34 UTC (rev 4061) +++ trunk/OpenMPT/soundlib/modsmp_ctrl.cpp 2014-05-24 17:05:42 UTC (rev 4062) @@ -495,12 +495,16 @@ { CriticalSection cs; - smp.nGlobalVol = MIN((uint16)(smp.nGlobalVol / dAmplify), 64); + smp.nGlobalVol = std::min((uint16)(smp.nGlobalVol / dAmplify), uint16(64)); for (CHANNELINDEX i = 0; i < MAX_CHANNELS; i++) { if(sndFile.m_PlayState.Chn[i].pModSample == &smp) { - sndFile.m_PlayState.Chn[i].nGlobalVol = smp.nGlobalVol; + sndFile.m_PlayState.Chn[i].nInsVol = smp.nGlobalVol; + if(sndFile.m_PlayState.Chn[i].pModInstrument) + { + sndFile.m_PlayState.Chn[i].nInsVol = (smp.nGlobalVol * sndFile.m_PlayState.Chn[i].pModInstrument->nGlobalVol) >> 6; + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-05-26 13:02:40
|
Revision: 4065 http://sourceforge.net/p/modplug/code/4065 Author: manxorist Date: 2014-05-26 13:02:31 +0000 (Mon, 26 May 2014) Log Message: ----------- [Ref] Silence 2 64bit warnings. Modified Paths: -------------- trunk/OpenMPT/common/misc_util.cpp trunk/OpenMPT/sounddev/SoundDevice.cpp Modified: trunk/OpenMPT/common/misc_util.cpp =================================================================== --- trunk/OpenMPT/common/misc_util.cpp 2014-05-26 08:10:52 UTC (rev 4064) +++ trunk/OpenMPT/common/misc_util.cpp 2014-05-26 13:02:31 UTC (rev 4065) @@ -417,7 +417,7 @@ //---------------------------------- { std::vector<OLECHAR> tmp(256); - ::StringFromGUID2(guid, &tmp[0], tmp.size()); + ::StringFromGUID2(guid, &tmp[0], static_cast<int>(tmp.size())); return &tmp[0]; } Modified: trunk/OpenMPT/sounddev/SoundDevice.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.cpp 2014-05-26 08:10:52 UTC (rev 4064) +++ trunk/OpenMPT/sounddev/SoundDevice.cpp 2014-05-26 13:02:31 UTC (rev 4065) @@ -174,7 +174,7 @@ WaveFormat.Format.wFormatTag = m_Settings.sampleFormat.IsFloat() ? WAVE_FORMAT_IEEE_FLOAT : WAVE_FORMAT_PCM; WaveFormat.Format.nChannels = (WORD)m_Settings.Channels; WaveFormat.Format.nSamplesPerSec = m_Settings.Samplerate; - WaveFormat.Format.nAvgBytesPerSec = m_Settings.GetBytesPerSecond(); + WaveFormat.Format.nAvgBytesPerSec = (DWORD)m_Settings.GetBytesPerSecond(); WaveFormat.Format.nBlockAlign = (WORD)m_Settings.GetBytesPerFrame(); WaveFormat.Format.wBitsPerSample = (WORD)m_Settings.sampleFormat.GetBitsPerSample(); WaveFormat.Format.cbSize = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-05-31 16:58:44
|
Revision: 4073 http://sourceforge.net/p/modplug/code/4073 Author: manxorist Date: 2014-05-31 16:58:08 +0000 (Sat, 31 May 2014) Log Message: ----------- [Fix] Namespace the whole internal codebase in a separate OpenMPT:: namespace for libopenmpt. This allows applications to statically link against libopenmpt without risking duplicate symbols. In particular, this allows static linking of both, libopenmpt and the older libmodplug, in the same binary. Namespacing is wrapped in three macros, OPENMPT_NAMESPACE, OPENMPT_NAMESPACE_BEGIN and OPENMPT_NAMESPACE_END. OpenMPT itself is also modified to support namespaced compilation. As this causes all symbols in the debugger (and potentially other code analysis tools (e.g. doxygen)) to be prefixed with "OpenMPT::" (which can be kind of annoying), OpenMPT currently defines these macros empty, the code thereby continues to reside in the global namespace for OpenMPT. Compilaion has been verified to work in namespaced form for OpenMPT (see BuildSettings.h, MidiInOut.h, MidiInOutEditor.h and Bridge.cpp for places where to adjust the namespace). [Ref] Small related cleanups. Modified Paths: -------------- trunk/OpenMPT/common/AudioCriticalSection.cpp trunk/OpenMPT/common/AudioCriticalSection.h trunk/OpenMPT/common/BuildSettings.h trunk/OpenMPT/common/FlagSet.h trunk/OpenMPT/common/Logging.cpp trunk/OpenMPT/common/Logging.h trunk/OpenMPT/common/Profiler.cpp trunk/OpenMPT/common/Profiler.h trunk/OpenMPT/common/StringFixer.h trunk/OpenMPT/common/misc_util.cpp trunk/OpenMPT/common/misc_util.h trunk/OpenMPT/common/mptFstream.h trunk/OpenMPT/common/mptPathString.cpp trunk/OpenMPT/common/mptPathString.h trunk/OpenMPT/common/mptString.cpp trunk/OpenMPT/common/mptString.h trunk/OpenMPT/common/mutex.h trunk/OpenMPT/common/serialization_utils.cpp trunk/OpenMPT/common/serialization_utils.h trunk/OpenMPT/common/thread.h trunk/OpenMPT/common/typedefs.cpp trunk/OpenMPT/common/typedefs.h trunk/OpenMPT/common/version.cpp trunk/OpenMPT/common/version.h trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/include/unrar/openmpt-callback.hpp trunk/OpenMPT/libopenmpt/libopenmpt_ext.cpp trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp trunk/OpenMPT/libopenmpt/libopenmpt_test.cpp trunk/OpenMPT/mptrack/AboutDialog.cpp trunk/OpenMPT/mptrack/AboutDialog.h trunk/OpenMPT/mptrack/AbstractVstEditor.cpp trunk/OpenMPT/mptrack/AbstractVstEditor.h trunk/OpenMPT/mptrack/AppendModule.cpp trunk/OpenMPT/mptrack/AutoSaver.cpp trunk/OpenMPT/mptrack/AutoSaver.h trunk/OpenMPT/mptrack/Autotune.cpp trunk/OpenMPT/mptrack/Autotune.h trunk/OpenMPT/mptrack/CImageListEx.cpp trunk/OpenMPT/mptrack/CImageListEx.h trunk/OpenMPT/mptrack/CTreeCtrl.h trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp trunk/OpenMPT/mptrack/ChannelManagerDlg.h trunk/OpenMPT/mptrack/Childfrm.cpp trunk/OpenMPT/mptrack/Childfrm.h trunk/OpenMPT/mptrack/CleanupSong.cpp trunk/OpenMPT/mptrack/CleanupSong.h trunk/OpenMPT/mptrack/CloseMainDialog.cpp trunk/OpenMPT/mptrack/CloseMainDialog.h trunk/OpenMPT/mptrack/ColourEdit.cpp trunk/OpenMPT/mptrack/ColourEdit.h trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/CommandSet.h trunk/OpenMPT/mptrack/CreditStatic.cpp trunk/OpenMPT/mptrack/CreditStatic.h trunk/OpenMPT/mptrack/Ctrl_com.cpp trunk/OpenMPT/mptrack/Ctrl_com.h trunk/OpenMPT/mptrack/Ctrl_gen.cpp trunk/OpenMPT/mptrack/Ctrl_gen.h trunk/OpenMPT/mptrack/Ctrl_ins.cpp trunk/OpenMPT/mptrack/Ctrl_ins.h trunk/OpenMPT/mptrack/Ctrl_pat.cpp trunk/OpenMPT/mptrack/Ctrl_pat.h trunk/OpenMPT/mptrack/Ctrl_seq.cpp trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/mptrack/Ctrl_smp.h trunk/OpenMPT/mptrack/DefaultVstEditor.cpp trunk/OpenMPT/mptrack/DefaultVstEditor.h trunk/OpenMPT/mptrack/Draw_pat.cpp trunk/OpenMPT/mptrack/EffectInfo.cpp trunk/OpenMPT/mptrack/EffectInfo.h trunk/OpenMPT/mptrack/EffectVis.cpp trunk/OpenMPT/mptrack/EffectVis.h trunk/OpenMPT/mptrack/ExceptionHandler.cpp trunk/OpenMPT/mptrack/ExceptionHandler.h trunk/OpenMPT/mptrack/FileDialog.cpp trunk/OpenMPT/mptrack/FileDialog.h trunk/OpenMPT/mptrack/Globals.cpp trunk/OpenMPT/mptrack/Globals.h trunk/OpenMPT/mptrack/InputHandler.cpp trunk/OpenMPT/mptrack/InputHandler.h trunk/OpenMPT/mptrack/KeyConfigDlg.cpp trunk/OpenMPT/mptrack/KeyConfigDlg.h trunk/OpenMPT/mptrack/MIDIMacroDialog.cpp trunk/OpenMPT/mptrack/MIDIMacroDialog.h trunk/OpenMPT/mptrack/MIDIMapping.cpp trunk/OpenMPT/mptrack/MIDIMapping.h trunk/OpenMPT/mptrack/MIDIMappingDialog.cpp trunk/OpenMPT/mptrack/MIDIMappingDialog.h trunk/OpenMPT/mptrack/MPTHacks.cpp trunk/OpenMPT/mptrack/MPTrackUtil.cpp trunk/OpenMPT/mptrack/MPTrackUtil.h trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mainbar.cpp trunk/OpenMPT/mptrack/Mainbar.h trunk/OpenMPT/mptrack/Mainfrm.h trunk/OpenMPT/mptrack/MemoryMappedFile.cpp trunk/OpenMPT/mptrack/MemoryMappedFile.h trunk/OpenMPT/mptrack/Mod2wave.cpp trunk/OpenMPT/mptrack/ModConvert.cpp trunk/OpenMPT/mptrack/ModConvert.h trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/Moddoc.h trunk/OpenMPT/mptrack/Modedit.cpp trunk/OpenMPT/mptrack/Moptions.cpp trunk/OpenMPT/mptrack/Moptions.h trunk/OpenMPT/mptrack/MoveFXSlotDialog.cpp trunk/OpenMPT/mptrack/MoveFXSlotDialog.h trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/mptrack/Mpdlgs.h trunk/OpenMPT/mptrack/Mpt_midi.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/Mptrack.h trunk/OpenMPT/mptrack/Notification.h trunk/OpenMPT/mptrack/PNG.cpp trunk/OpenMPT/mptrack/PNG.h trunk/OpenMPT/mptrack/PSRatioCalc.cpp trunk/OpenMPT/mptrack/PSRatioCalc.h trunk/OpenMPT/mptrack/PatternClipboard.cpp trunk/OpenMPT/mptrack/PatternClipboard.h trunk/OpenMPT/mptrack/PatternCursor.h trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp trunk/OpenMPT/mptrack/PatternEditorDialogs.h trunk/OpenMPT/mptrack/PatternGotoDialog.cpp trunk/OpenMPT/mptrack/PatternGotoDialog.h trunk/OpenMPT/mptrack/Reporting.cpp trunk/OpenMPT/mptrack/Reporting.h trunk/OpenMPT/mptrack/SampleEditorDialogs.cpp trunk/OpenMPT/mptrack/SampleEditorDialogs.h trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.cpp trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.h trunk/OpenMPT/mptrack/SelectPluginDialog.cpp trunk/OpenMPT/mptrack/SelectPluginDialog.h trunk/OpenMPT/mptrack/Settings.cpp trunk/OpenMPT/mptrack/Settings.h trunk/OpenMPT/mptrack/StreamEncoder.cpp trunk/OpenMPT/mptrack/StreamEncoder.h trunk/OpenMPT/mptrack/StreamEncoderFLAC.cpp trunk/OpenMPT/mptrack/StreamEncoderFLAC.h trunk/OpenMPT/mptrack/StreamEncoderMP3.cpp trunk/OpenMPT/mptrack/StreamEncoderMP3.h trunk/OpenMPT/mptrack/StreamEncoderOpus.cpp trunk/OpenMPT/mptrack/StreamEncoderOpus.h trunk/OpenMPT/mptrack/StreamEncoderVorbis.cpp trunk/OpenMPT/mptrack/StreamEncoderVorbis.h trunk/OpenMPT/mptrack/StreamEncoderWAV.cpp trunk/OpenMPT/mptrack/StreamEncoderWAV.h trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/mptrack/TrackerSettings.h trunk/OpenMPT/mptrack/TuningDialog.cpp trunk/OpenMPT/mptrack/TuningDialog.h trunk/OpenMPT/mptrack/Undo.cpp trunk/OpenMPT/mptrack/Undo.h trunk/OpenMPT/mptrack/UpdateCheck.cpp trunk/OpenMPT/mptrack/UpdateCheck.h trunk/OpenMPT/mptrack/VSTEditor.cpp trunk/OpenMPT/mptrack/VSTEditor.h trunk/OpenMPT/mptrack/View_gen.cpp trunk/OpenMPT/mptrack/View_gen.h trunk/OpenMPT/mptrack/View_ins.cpp trunk/OpenMPT/mptrack/View_ins.h trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/View_pat.h trunk/OpenMPT/mptrack/View_smp.cpp trunk/OpenMPT/mptrack/View_smp.h trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/mptrack/View_tre.h trunk/OpenMPT/mptrack/VstPresets.cpp trunk/OpenMPT/mptrack/VstPresets.h trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/mptrack/Vstplug.h trunk/OpenMPT/mptrack/dlg_misc.cpp trunk/OpenMPT/mptrack/dlg_misc.h trunk/OpenMPT/mptrack/mod2midi.cpp trunk/OpenMPT/mptrack/mod2midi.h trunk/OpenMPT/mptrack/mod2wave.h trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp trunk/OpenMPT/mptrack/tuningRatioMapWnd.h trunk/OpenMPT/mptrack/view_com.cpp trunk/OpenMPT/mptrack/view_com.h trunk/OpenMPT/pluginBridge/AEffectWrapper.h trunk/OpenMPT/pluginBridge/Bridge.cpp trunk/OpenMPT/pluginBridge/Bridge.h trunk/OpenMPT/pluginBridge/BridgeCommon.h trunk/OpenMPT/pluginBridge/BridgeWrapper.cpp trunk/OpenMPT/pluginBridge/BridgeWrapper.h trunk/OpenMPT/plugins/MidiInOut/MidiInOut.cpp trunk/OpenMPT/plugins/MidiInOut/MidiInOut.h trunk/OpenMPT/plugins/MidiInOut/MidiInOut.vcxproj trunk/OpenMPT/plugins/MidiInOut/MidiInOut.vcxproj.filters trunk/OpenMPT/plugins/MidiInOut/MidiInOutEditor.cpp trunk/OpenMPT/plugins/MidiInOut/MidiInOutEditor.h trunk/OpenMPT/plugins/common/Button.h trunk/OpenMPT/plugins/common/CheckBox.h trunk/OpenMPT/plugins/common/ComboBox.h trunk/OpenMPT/plugins/common/EditBox.h trunk/OpenMPT/plugins/common/Label.h trunk/OpenMPT/plugins/common/Window.h trunk/OpenMPT/plugins/common/WindowBase.h trunk/OpenMPT/sounddev/SoundDevice.cpp trunk/OpenMPT/sounddev/SoundDevice.h trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp trunk/OpenMPT/sounddev/SoundDeviceASIO.h trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp trunk/OpenMPT/sounddev/SoundDeviceDirectSound.h trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp trunk/OpenMPT/sounddev/SoundDevicePortAudio.h trunk/OpenMPT/sounddev/SoundDeviceThread.cpp trunk/OpenMPT/sounddev/SoundDeviceThread.h trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp trunk/OpenMPT/sounddev/SoundDeviceWaveout.h trunk/OpenMPT/sounddsp/AGC.cpp trunk/OpenMPT/sounddsp/AGC.h trunk/OpenMPT/sounddsp/DSP.cpp trunk/OpenMPT/sounddsp/DSP.h trunk/OpenMPT/sounddsp/EQ.cpp trunk/OpenMPT/sounddsp/EQ.h trunk/OpenMPT/sounddsp/Reverb.cpp trunk/OpenMPT/sounddsp/Reverb.h trunk/OpenMPT/soundlib/AudioReadTarget.h trunk/OpenMPT/soundlib/ChunkReader.h trunk/OpenMPT/soundlib/Dither.cpp trunk/OpenMPT/soundlib/Dither.h trunk/OpenMPT/soundlib/Dlsbank.cpp trunk/OpenMPT/soundlib/Dlsbank.h trunk/OpenMPT/soundlib/Endianness.h trunk/OpenMPT/soundlib/Fastmix.cpp trunk/OpenMPT/soundlib/FileReader.h trunk/OpenMPT/soundlib/FloatMixer.h trunk/OpenMPT/soundlib/ITCompression.cpp trunk/OpenMPT/soundlib/ITCompression.h trunk/OpenMPT/soundlib/ITTools.cpp trunk/OpenMPT/soundlib/ITTools.h trunk/OpenMPT/soundlib/IntMixer.h trunk/OpenMPT/soundlib/Load_669.cpp trunk/OpenMPT/soundlib/Load_amf.cpp trunk/OpenMPT/soundlib/Load_ams.cpp trunk/OpenMPT/soundlib/Load_dbm.cpp trunk/OpenMPT/soundlib/Load_digi.cpp trunk/OpenMPT/soundlib/Load_dmf.cpp trunk/OpenMPT/soundlib/Load_dsm.cpp trunk/OpenMPT/soundlib/Load_far.cpp trunk/OpenMPT/soundlib/Load_gdm.cpp trunk/OpenMPT/soundlib/Load_imf.cpp trunk/OpenMPT/soundlib/Load_it.cpp trunk/OpenMPT/soundlib/Load_itp.cpp trunk/OpenMPT/soundlib/Load_mdl.cpp trunk/OpenMPT/soundlib/Load_med.cpp trunk/OpenMPT/soundlib/Load_mid.cpp trunk/OpenMPT/soundlib/Load_mo3.cpp trunk/OpenMPT/soundlib/Load_mod.cpp trunk/OpenMPT/soundlib/Load_mt2.cpp trunk/OpenMPT/soundlib/Load_mtm.cpp trunk/OpenMPT/soundlib/Load_okt.cpp trunk/OpenMPT/soundlib/Load_psm.cpp trunk/OpenMPT/soundlib/Load_ptm.cpp trunk/OpenMPT/soundlib/Load_s3m.cpp trunk/OpenMPT/soundlib/Load_stm.cpp trunk/OpenMPT/soundlib/Load_ult.cpp trunk/OpenMPT/soundlib/Load_umx.cpp trunk/OpenMPT/soundlib/Load_wav.cpp trunk/OpenMPT/soundlib/Load_xm.cpp trunk/OpenMPT/soundlib/Loaders.h trunk/OpenMPT/soundlib/MIDIEvents.cpp trunk/OpenMPT/soundlib/MIDIEvents.h trunk/OpenMPT/soundlib/MIDIMacros.cpp trunk/OpenMPT/soundlib/MIDIMacros.h trunk/OpenMPT/soundlib/Message.cpp trunk/OpenMPT/soundlib/Message.h trunk/OpenMPT/soundlib/Mixer.h trunk/OpenMPT/soundlib/MixerInterface.h trunk/OpenMPT/soundlib/MixerLoops.cpp trunk/OpenMPT/soundlib/MixerLoops.h trunk/OpenMPT/soundlib/MixerSettings.cpp trunk/OpenMPT/soundlib/MixerSettings.h trunk/OpenMPT/soundlib/Mmcmp.cpp trunk/OpenMPT/soundlib/ModChannel.cpp trunk/OpenMPT/soundlib/ModChannel.h trunk/OpenMPT/soundlib/ModInstrument.cpp trunk/OpenMPT/soundlib/ModInstrument.h trunk/OpenMPT/soundlib/ModSample.cpp trunk/OpenMPT/soundlib/ModSample.h trunk/OpenMPT/soundlib/ModSequence.cpp trunk/OpenMPT/soundlib/ModSequence.h trunk/OpenMPT/soundlib/Resampler.h trunk/OpenMPT/soundlib/RowVisitor.cpp trunk/OpenMPT/soundlib/RowVisitor.h trunk/OpenMPT/soundlib/S3MTools.cpp trunk/OpenMPT/soundlib/S3MTools.h trunk/OpenMPT/soundlib/SampleFormat.h trunk/OpenMPT/soundlib/SampleFormatConverters.h trunk/OpenMPT/soundlib/SampleFormats.cpp trunk/OpenMPT/soundlib/SampleIO.cpp trunk/OpenMPT/soundlib/SampleIO.h trunk/OpenMPT/soundlib/Snd_defs.h 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/SoundFilePlayConfig.cpp trunk/OpenMPT/soundlib/SoundFilePlayConfig.h trunk/OpenMPT/soundlib/Tables.cpp trunk/OpenMPT/soundlib/Tables.h trunk/OpenMPT/soundlib/Tagging.cpp trunk/OpenMPT/soundlib/Tagging.h trunk/OpenMPT/soundlib/WAVTools.cpp trunk/OpenMPT/soundlib/WAVTools.h trunk/OpenMPT/soundlib/Wav.h trunk/OpenMPT/soundlib/WindowedFIR.cpp trunk/OpenMPT/soundlib/WindowedFIR.h trunk/OpenMPT/soundlib/XMTools.cpp trunk/OpenMPT/soundlib/XMTools.h trunk/OpenMPT/soundlib/load_j2b.cpp trunk/OpenMPT/soundlib/mod_specifications.cpp trunk/OpenMPT/soundlib/mod_specifications.h trunk/OpenMPT/soundlib/modcommand.cpp trunk/OpenMPT/soundlib/modcommand.h trunk/OpenMPT/soundlib/modsmp_ctrl.cpp trunk/OpenMPT/soundlib/modsmp_ctrl.h trunk/OpenMPT/soundlib/pattern.cpp trunk/OpenMPT/soundlib/pattern.h trunk/OpenMPT/soundlib/patternContainer.cpp trunk/OpenMPT/soundlib/patternContainer.h trunk/OpenMPT/soundlib/plugins/DmoToVst.cpp trunk/OpenMPT/soundlib/plugins/PlugInterface.h trunk/OpenMPT/soundlib/plugins/PluginEventQueue.h trunk/OpenMPT/soundlib/plugins/PluginManager.cpp trunk/OpenMPT/soundlib/plugins/PluginMixBuffer.h trunk/OpenMPT/soundlib/tuning.cpp trunk/OpenMPT/soundlib/tuning.h trunk/OpenMPT/soundlib/tuningCollection.cpp trunk/OpenMPT/soundlib/tuningbase.cpp trunk/OpenMPT/soundlib/tuningbase.h trunk/OpenMPT/soundlib/tuningcollection.h trunk/OpenMPT/test/TestToolsLib.cpp trunk/OpenMPT/test/TestToolsLib.h trunk/OpenMPT/test/TestToolsTracker.h trunk/OpenMPT/test/test.cpp trunk/OpenMPT/test/test.h trunk/OpenMPT/unarchiver/archive.h trunk/OpenMPT/unarchiver/unarchiver.cpp trunk/OpenMPT/unarchiver/unarchiver.h trunk/OpenMPT/unarchiver/ungzip.cpp trunk/OpenMPT/unarchiver/ungzip.h trunk/OpenMPT/unarchiver/unlha.cpp trunk/OpenMPT/unarchiver/unlha.h trunk/OpenMPT/unarchiver/unrar.cpp trunk/OpenMPT/unarchiver/unrar.h trunk/OpenMPT/unarchiver/unzip.cpp trunk/OpenMPT/unarchiver/unzip.h Modified: trunk/OpenMPT/common/AudioCriticalSection.cpp =================================================================== --- trunk/OpenMPT/common/AudioCriticalSection.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/AudioCriticalSection.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -11,8 +11,11 @@ #include "../common/AudioCriticalSection.h" +OPENMPT_NAMESPACE_BEGIN + #ifdef MODPLUG_TRACKER CRITICAL_SECTION g_csAudio; int g_csAudioLockCount = 0; #endif +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/AudioCriticalSection.h =================================================================== --- trunk/OpenMPT/common/AudioCriticalSection.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/AudioCriticalSection.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -9,13 +9,10 @@ #pragma once +OPENMPT_NAMESPACE_BEGIN + #ifdef MODPLUG_TRACKER -#define WIN32_LEAN_AND_MEAN -#define VC_EXTRALEAN -#define NOMINMAX -#include <windows.h> - extern CRITICAL_SECTION g_csAudio; extern int g_csAudioLockCount; @@ -86,3 +83,5 @@ }; #endif // MODPLUG_TRACKER + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/BuildSettings.h =================================================================== --- trunk/OpenMPT/common/BuildSettings.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/BuildSettings.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -288,6 +288,46 @@ +#if defined(MODPLUG_TRACKER) +#ifndef MPT_NO_NAMESPACE +#define MPT_NO_NAMESPACE +#endif +#endif + +#if defined(MPT_NO_NAMESPACE) + +#ifdef OPENMPT_NAMESPACE +#undef OPENMPT_NAMESPACE +#endif +#define OPENMPT_NAMESPACE + +#ifdef OPENMPT_NAMESPACE_BEGIN +#undef OPENMPT_NAMESPACE_BEGIN +#endif +#define OPENMPT_NAMESPACE_BEGIN + +#ifdef OPENMPT_NAMESPACE_END +#undef OPENMPT_NAMESPACE_END +#endif +#define OPENMPT_NAMESPACE_END + +#else + +#ifndef OPENMPT_NAMESPACE +#define OPENMPT_NAMESPACE OpenMPT +#endif + +#ifndef OPENMPT_NAMESPACE_BEGIN +#define OPENMPT_NAMESPACE_BEGIN namespace OPENMPT_NAMESPACE { +#endif +#ifndef OPENMPT_NAMESPACE_END +#define OPENMPT_NAMESPACE_END } +#endif + +#endif + + + #if MPT_COMPILER_MSVC #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #endif Modified: trunk/OpenMPT/common/FlagSet.h =================================================================== --- trunk/OpenMPT/common/FlagSet.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/FlagSet.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -12,6 +12,8 @@ #include <string> +OPENMPT_NAMESPACE_BEGIN + template <typename enum_t, typename store_t = enum_t> class FlagSet { @@ -171,3 +173,6 @@ inline enum_t &operator &= (enum_t &a, enum_t b) { a = (a & b); return a; } \ inline enum_t &operator |= (enum_t &a, enum_t b) { a = (a | b); return a; } \ inline enum_t operator ~ (enum_t a) { return static_cast<enum_t>(~(+a)); } + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/Logging.cpp =================================================================== --- trunk/OpenMPT/common/Logging.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/Logging.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -16,6 +16,9 @@ #include <cstring> +OPENMPT_NAMESPACE_BEGIN + + //#define LOG_TO_FILE @@ -196,3 +199,6 @@ } // namespace log } // namespace mpt + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/Logging.h =================================================================== --- trunk/OpenMPT/common/Logging.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/Logging.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -10,6 +10,9 @@ #pragma once +OPENMPT_NAMESPACE_BEGIN + + enum LogLevel { /*LogDebug = 1,*/ @@ -62,7 +65,7 @@ Context(const Context &c); }; // class Context -#define MPT_LOG_CURRENTCONTEXT() ::mpt::log::Context( __FILE__ , __LINE__ , __FUNCTION__ ) +#define MPT_LOG_CURRENTCONTEXT() mpt::log::Context( __FILE__ , __LINE__ , __FUNCTION__ ) class Logger @@ -76,7 +79,7 @@ void operator () (const std::wstring &text); }; -#define Log ::mpt::log::Logger(MPT_LOG_CURRENTCONTEXT()) +#define Log mpt::log::Logger(MPT_LOG_CURRENTCONTEXT()) #else // !NO_LOGGING @@ -90,7 +93,7 @@ inline void operator () (const std::wstring & /*text*/ ) {} }; -#define Log if(true) {} else ::mpt::log::Logger() // completely compile out arguments to Log() so that they do not even get evaluated +#define Log if(true) {} else mpt::log::Logger() // completely compile out arguments to Log() so that they do not even get evaluated #endif // NO_LOGGING @@ -98,3 +101,6 @@ } // namespace log } // namespace mpt + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/Profiler.cpp =================================================================== --- trunk/OpenMPT/common/Profiler.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/Profiler.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -12,6 +12,9 @@ #include "Profiler.h" +OPENMPT_NAMESPACE_BEGIN + + #ifdef USE_PROFILER @@ -209,3 +212,6 @@ #endif // USE_PROFILER + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/Profiler.h =================================================================== --- trunk/OpenMPT/common/Profiler.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/Profiler.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -16,6 +16,9 @@ #include <vector> +OPENMPT_NAMESPACE_BEGIN + + #if defined(MODPLUG_TRACKER) //#define USE_PROFILER @@ -117,3 +120,6 @@ #endif // USE_PROFILER + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/StringFixer.h =================================================================== --- trunk/OpenMPT/common/StringFixer.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/StringFixer.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -16,6 +16,8 @@ #include <cstring> #include <string.h> +OPENMPT_NAMESPACE_BEGIN + namespace mpt { namespace String { @@ -416,3 +418,4 @@ } } // namespace mpt::String +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/misc_util.cpp =================================================================== --- trunk/OpenMPT/common/misc_util.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/misc_util.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -27,6 +27,9 @@ #endif +OPENMPT_NAMESPACE_BEGIN + + template<typename T> inline T ConvertStrToHelper(const std::string &str) { @@ -1042,3 +1045,6 @@ #endif // MPT_WITH_DYNBIND + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/misc_util.h =================================================================== --- trunk/OpenMPT/common/misc_util.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/misc_util.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -23,6 +23,9 @@ #include <time.h> +OPENMPT_NAMESPACE_BEGIN + + bool ConvertStrToBool(const std::string &str); signed char ConvertStrToSignedChar(const std::string &str); unsigned char ConvertStrToUnsignedChar(const std::string &str); @@ -830,3 +833,5 @@ #endif // MPT_WITH_DYNBIND + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/mptFstream.h =================================================================== --- trunk/OpenMPT/common/mptFstream.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/mptFstream.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -14,6 +14,8 @@ #include "../common/mptString.h" #include "../common/mptPathString.h" +OPENMPT_NAMESPACE_BEGIN + #if defined(MPT_WITH_PATHSTRING) namespace mpt @@ -197,3 +199,4 @@ #endif // MPT_WITH_PATHSTRING +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/mptPathString.cpp =================================================================== --- trunk/OpenMPT/common/mptPathString.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/mptPathString.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -11,6 +11,9 @@ #include "mptPathString.h" +OPENMPT_NAMESPACE_BEGIN + + #if defined(MPT_WITH_PATHSTRING) #if defined(MODPLUG_TRACKER) @@ -309,3 +312,5 @@ #endif // MPT_WITH_PATHSTRING + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/mptPathString.h =================================================================== --- trunk/OpenMPT/common/mptPathString.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/mptPathString.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -13,6 +13,8 @@ #include <cstdio> #include <stdio.h> +OPENMPT_NAMESPACE_BEGIN + #if defined(MPT_WITH_PATHSTRING) //#define MPT_DEPRECATED_PATH @@ -248,3 +250,4 @@ #endif // MPT_WITH_PATHSTRING +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/mptString.cpp =================================================================== --- trunk/OpenMPT/common/mptString.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/mptString.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -35,6 +35,9 @@ #endif +OPENMPT_NAMESPACE_BEGIN + + namespace mpt { @@ -1489,3 +1492,6 @@ } // namespace mpt + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/mptString.h =================================================================== --- trunk/OpenMPT/common/mptString.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/mptString.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -19,6 +19,9 @@ #include <cstring> +OPENMPT_NAMESPACE_BEGIN + + namespace mpt { @@ -1091,3 +1094,5 @@ } } } // namespace mpt::String + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/mutex.h =================================================================== --- trunk/OpenMPT/common/mutex.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/mutex.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -10,12 +10,16 @@ #pragma once #ifdef MODPLUG_TRACKER - #define WIN32_LEAN_AND_MEAN #define VC_EXTRALEAN #define NOMINMAX #include <windows.h> +#endif // MODPLUG_TRACKER +OPENMPT_NAMESPACE_BEGIN + +#ifdef MODPLUG_TRACKER + namespace Util { // compatible with c++11 std::mutex, can eventually be replaced without touching any usage site @@ -53,3 +57,5 @@ } // namespace Util #endif // MODPLUG_TRACKER + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/serialization_utils.cpp =================================================================== --- trunk/OpenMPT/common/serialization_utils.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/serialization_utils.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -20,6 +20,9 @@ #include "misc_util.h" +OPENMPT_NAMESPACE_BEGIN + + namespace srlztn { @@ -868,3 +871,5 @@ } // namespace srlztn + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/serialization_utils.h =================================================================== --- trunk/OpenMPT/common/serialization_utils.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/serialization_utils.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -26,6 +26,8 @@ #include "../common/typedefs.h" +OPENMPT_NAMESPACE_BEGIN + namespace srlztn //SeRiaLiZaTioN { @@ -600,3 +602,6 @@ } //namespace srlztn. + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/thread.h =================================================================== --- trunk/OpenMPT/common/thread.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/thread.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -9,6 +9,8 @@ #pragma once +OPENMPT_NAMESPACE_BEGIN + namespace mpt { @@ -67,3 +69,5 @@ #endif // !WIN32 } // namespace mpt + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/typedefs.cpp =================================================================== --- trunk/OpenMPT/common/typedefs.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/typedefs.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -13,6 +13,9 @@ #include "Logging.h" +OPENMPT_NAMESPACE_BEGIN + + #if !defined(MODPLUG_TRACKER) && defined(MPT_ASSERT_HANDLER_NEEDED) noinline void AssertHandler(const char *file, int line, const char *function, const char *expr, const char *msg) @@ -29,3 +32,5 @@ #endif // !MODPLUG_TRACKER && MPT_ASSERT_HANDLER_NEEDED + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/typedefs.h =================================================================== --- trunk/OpenMPT/common/typedefs.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/typedefs.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -12,6 +12,10 @@ +OPENMPT_NAMESPACE_BEGIN + + + #if MPT_COMPILER_MSVC #pragma warning(error : 4309) // Treat "truncation of constant value"-warning as error. #endif @@ -129,13 +133,17 @@ #if defined(_MFC_VER) typedef CMemoryException * MPTMemoryException; #else +OPENMPT_NAMESPACE_END #include <new> +OPENMPT_NAMESPACE_BEGIN typedef std::bad_alloc & MPTMemoryException; #endif +OPENMPT_NAMESPACE_END #include <memory> +OPENMPT_NAMESPACE_BEGIN #if MPT_COMPILER_MSVC && MPT_MSVC_BEFORE(2010,0) #define MPT_SHARED_PTR std::tr1::shared_ptr #else @@ -240,7 +248,9 @@ #endif +OPENMPT_NAMESPACE_END #include <cstdarg> +OPENMPT_NAMESPACE_BEGIN #if MPT_COMPILER_MSVC #ifndef va_copy #define va_copy(dst, src) do { (dst) = (src); } while (0) @@ -254,7 +264,9 @@ #if MPT_COMPILER_MSVC && MPT_MSVC_BEFORE(2010,0) +OPENMPT_NAMESPACE_END #include "stdint.h" +OPENMPT_NAMESPACE_BEGIN typedef int8_t int8; typedef int16_t int16; @@ -267,7 +279,9 @@ #else +OPENMPT_NAMESPACE_END #include <cstdint> +OPENMPT_NAMESPACE_BEGIN typedef std::int8_t int8; typedef std::int16_t int16; @@ -282,7 +296,9 @@ #ifdef ANDROID +OPENMPT_NAMESPACE_END #include <stdint.h> +OPENMPT_NAMESPACE_BEGIN // Android NDK appears to provide a different (and incomplete) <stdint.h> when compiling C++. // Provide these macros ourselves if they are not defined by here. @@ -453,3 +469,6 @@ #define MPT_UNREFERENCED_PARAMETER(x) (void)(x) #endif + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/version.cpp =================================================================== --- trunk/OpenMPT/common/version.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/version.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -17,6 +17,8 @@ #include "versionNumber.h" #include "svn_version.h" +OPENMPT_NAMESPACE_BEGIN + namespace MptVersion { const VersionNum num = MPT_VERSION_NUMERIC; @@ -416,3 +418,5 @@ } } // namespace MptVersion + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/version.h =================================================================== --- trunk/OpenMPT/common/version.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/version.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -13,6 +13,9 @@ #include <string> +OPENMPT_NAMESPACE_BEGIN + + //Creates version number from version parts that appears in version string. //For example MAKE_VERSION_NUMERIC(1,17,02,28) gives version number of //version 1.17.02.28. @@ -91,3 +94,6 @@ std::string GetContactString(); } //namespace MptVersion + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/common/versionNumber.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -10,6 +10,8 @@ #pragma once +OPENMPT_NAMESPACE_BEGIN + #define VER_HELPER_STRINGIZE(x) #x #define VER_STRINGIZE(x) VER_HELPER_STRINGIZE(x) @@ -24,3 +26,5 @@ //Numerical value of the version. #define MPT_VERSION_NUMERIC MAKE_VERSION_NUMERIC(VER_MAJORMAJOR,VER_MAJOR,VER_MINOR,VER_MINORMINOR) + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/include/unrar/openmpt-callback.hpp =================================================================== --- trunk/OpenMPT/include/unrar/openmpt-callback.hpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/include/unrar/openmpt-callback.hpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -1,7 +1,7 @@ /* * openmpt-callback.hpp * -------------------- - * Purpose: Wrapper functions for FileReader, so that it can be used easily in UnRAR. + * Purpose: Wrapper functions for file reading. * Notes : (currently none) * Authors: OpenMPT Devs * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. @@ -9,22 +9,20 @@ #pragma once -class FileReader; - struct RARFileCallbacks { - typedef size_t (CALLBACK *RAR_READRAW) (FileReader &file, char *data, size_t size); - typedef bool (CALLBACK *RAR_SEEK) (FileReader &file, size_t offset); - typedef size_t (CALLBACK *RAR_GETPOSITION) (FileReader &file); - typedef size_t (CALLBACK *RAR_GETLENGTH) (FileReader &file); + typedef size_t (CALLBACK *RAR_READRAW) (void *file, char *data, size_t size); + typedef bool (CALLBACK *RAR_SEEK) (void *file, size_t offset); + typedef size_t (CALLBACK *RAR_GETPOSITION) (void *file); + typedef size_t (CALLBACK *RAR_GETLENGTH) (void *file); RAR_READRAW ReadRaw; RAR_SEEK Seek; RAR_GETPOSITION GetPosition; RAR_GETLENGTH GetLength; - FileReader &file; + void *file; - RARFileCallbacks(RAR_READRAW readFunc, RAR_SEEK seekFunc, RAR_GETPOSITION getPosFunc, RAR_GETLENGTH getLenFunc, FileReader &f) + RARFileCallbacks(RAR_READRAW readFunc, RAR_SEEK seekFunc, RAR_GETPOSITION getPosFunc, RAR_GETLENGTH getLenFunc, void *f) : ReadRaw(readFunc), Seek(seekFunc), GetPosition(getPosFunc), GetLength(getLenFunc), file(f) { } }; Modified: trunk/OpenMPT/libopenmpt/libopenmpt_ext.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_ext.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/libopenmpt/libopenmpt_ext.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -11,6 +11,8 @@ #include "soundlib/Sndfile.h" +using namespace OpenMPT; + #ifndef NO_LIBOPENMPT_CXX namespace openmpt { Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -29,6 +29,8 @@ #include "soundlib/AudioReadTarget.h" #include "soundlib/FileReader.h" +using namespace OpenMPT; + namespace openmpt { namespace version { Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -17,9 +17,11 @@ #include <ostream> // forward declarations +namespace OpenMPT { class FileReader; class CSoundFile; class Dither; +} // namespace OpenMPT namespace openmpt { @@ -55,8 +57,8 @@ std::shared_ptr<log_interface> m_Log; std::unique_ptr<log_forwarder> m_LogForwarder; double m_currentPositionSeconds; - std::unique_ptr<CSoundFile> m_sndFile; - std::unique_ptr<Dither> m_Dither; + std::unique_ptr<OpenMPT::CSoundFile> m_sndFile; + std::unique_ptr<OpenMPT::Dither> m_Dither; float m_Gain; bool m_ctl_load_skip_samples; bool m_ctl_load_skip_patterns; @@ -69,8 +71,8 @@ void apply_mixer_settings( std::int32_t samplerate, int channels ); void apply_libopenmpt_defaults(); void init( const std::map< std::string, std::string > & ctls ); - void load( CSoundFile & sndFile, const FileReader & file ); - void load( const FileReader & file ); + void load( OpenMPT::CSoundFile & sndFile, const OpenMPT::FileReader & file ); + void load( const OpenMPT::FileReader & file ); std::size_t read_wrapper( std::size_t count, std::int16_t * left, std::int16_t * right, std::int16_t * rear_left, std::int16_t * rear_right ); std::size_t read_wrapper( std::size_t count, float * left, float * right, float * rear_left, float * rear_right ); std::size_t read_interleaved_wrapper( std::size_t count, std::size_t channels, std::int16_t * interleaved ); Modified: trunk/OpenMPT/libopenmpt/libopenmpt_test.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_test.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/libopenmpt/libopenmpt_test.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -19,6 +19,8 @@ #include <clocale> +using namespace OpenMPT; + #if defined( LIBOPENMPT_BUILD_TEST ) #if defined(WIN32) && defined(UNICODE) @@ -33,13 +35,13 @@ try { // run test with "C" / classic() locale - mpt::Test::DoTests(); + Test::DoTests(); // try setting the C locale to the user locale setlocale( LC_ALL, "" ); // run all tests again with a set C locale - mpt::Test::DoTests(); + Test::DoTests(); // try to set the C and C++ locales to the user locale try { @@ -50,7 +52,7 @@ } // and now, run all tests once again - mpt::Test::DoTests(); + Test::DoTests(); } catch ( const std::exception & e ) { std::cerr << "TEST ERROR: exception: " << ( e.what() ? e.what() : "" ) << std::endl; Modified: trunk/OpenMPT/mptrack/AboutDialog.cpp =================================================================== --- trunk/OpenMPT/mptrack/AboutDialog.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/AboutDialog.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -4,6 +4,10 @@ #include "PNG.h" #include "../common/version.h" + +OPENMPT_NAMESPACE_BEGIN + + CRippleBitmap *CRippleBitmap::instance = nullptr; CAboutDlg *CAboutDlg::instance = nullptr; @@ -243,3 +247,6 @@ return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/AboutDialog.h =================================================================== --- trunk/OpenMPT/mptrack/AboutDialog.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/AboutDialog.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -2,6 +2,8 @@ #include "CreditStatic.h" +OPENMPT_NAMESPACE_BEGIN + namespace PNG { struct Bitmap; } //=============================== @@ -55,4 +57,6 @@ virtual BOOL OnInitDialog(); virtual void OnOK(); virtual void OnCancel(); -}; \ No newline at end of file +}; + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -24,6 +24,10 @@ #include <sstream> + +OPENMPT_NAMESPACE_BEGIN + + #ifndef NO_VST #define PRESETS_PER_COLUMN 32 @@ -918,4 +922,7 @@ return m_nLearnMacro; } -#endif // NO_VST \ No newline at end of file +#endif // NO_VST + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.h =================================================================== --- trunk/OpenMPT/mptrack/AbstractVstEditor.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/AbstractVstEditor.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -15,6 +15,8 @@ #include <vector> #include "../soundlib/Snd_defs.h" +OPENMPT_NAMESPACE_BEGIN + class CVstPlugin; class CAbstractVstEditor: public CDialog @@ -103,5 +105,6 @@ }; //end rewbs.defaultPlugGUI +OPENMPT_NAMESPACE_END + #endif // NO_VST - Modified: trunk/OpenMPT/mptrack/AppendModule.cpp =================================================================== --- trunk/OpenMPT/mptrack/AppendModule.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/AppendModule.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -12,6 +12,9 @@ #include "Moddoc.h" +OPENMPT_NAMESPACE_BEGIN + + // Add samples, instruments, plugins and patterns from another module to the current module void CModDoc::AppendModule(const CSoundFile &source) //-------------------------------------------------- @@ -296,4 +299,7 @@ targetPat.WriteEffect(EffectWriter(CMD_PATTERNBREAK, 0).Row(copyRows - 1).Retry(EffectWriter::rmTryNextRow)); } } -} \ No newline at end of file +} + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/AutoSaver.cpp =================================================================== --- trunk/OpenMPT/mptrack/AutoSaver.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/AutoSaver.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -21,6 +21,9 @@ #include <stdlib.h> +OPENMPT_NAMESPACE_BEGIN + + /////////////////////////////////////////////////////////////////////////////////////// // AutoSaver.cpp : implementation file /////////////////////////////////////////////////////////////////////////////////////// @@ -473,3 +476,6 @@ return CPropertyPage::OnKillActive(); } + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/AutoSaver.h =================================================================== --- trunk/OpenMPT/mptrack/AutoSaver.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/AutoSaver.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -12,6 +12,8 @@ #include "resource.h" +OPENMPT_NAMESPACE_BEGIN + class CModDoc; class CAutoSaver @@ -98,3 +100,6 @@ BOOL OnSetActive(); }; + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Autotune.cpp =================================================================== --- trunk/OpenMPT/mptrack/Autotune.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/Autotune.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -19,6 +19,9 @@ #endif +OPENMPT_NAMESPACE_BEGIN + + // The more bins, the more autocorrelations are done and the more precise the result is. #define BINS_PER_NOTE 32 #define MIN_SAMPLE_LENGTH 2 @@ -386,3 +389,6 @@ { CDialog::OnCancel(); } + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Autotune.h =================================================================== --- trunk/OpenMPT/mptrack/Autotune.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/Autotune.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -13,6 +13,8 @@ #include "../soundlib/Snd_defs.h" #include "resource.h" +OPENMPT_NAMESPACE_BEGIN + //============ class Autotune //============ @@ -79,3 +81,6 @@ virtual void DoDataExchange(CDataExchange* pDX); }; + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/CImageListEx.cpp =================================================================== --- trunk/OpenMPT/mptrack/CImageListEx.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/CImageListEx.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -13,6 +13,10 @@ #include "CImageListEx.h" #include "PNG.h" + +OPENMPT_NAMESPACE_BEGIN + + bool CImageListEx::Create(UINT resourceID, int cx, int cy, int nInitial, int nGrow, CDC *dc, bool disabled) { PNG::Bitmap *bitmap = PNG::ReadPNG(MAKEINTRESOURCE(resourceID)); @@ -92,3 +96,6 @@ delete bitmap; return true; } + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/CImageListEx.h =================================================================== --- trunk/OpenMPT/mptrack/CImageListEx.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/CImageListEx.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -10,8 +10,12 @@ #pragma once +OPENMPT_NAMESPACE_BEGIN + class CImageListEx : public CImageList { public: bool Create(UINT resourceID, int cx, int cy, int nInitial, int nGrow, CDC *dc, bool disabled = false); -}; \ No newline at end of file +}; + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/CTreeCtrl.h =================================================================== --- trunk/OpenMPT/mptrack/CTreeCtrl.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/CTreeCtrl.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -11,6 +11,9 @@ #pragma once +OPENMPT_NAMESPACE_BEGIN + + class CTreeCtrlW : public CTreeCtrl { public: @@ -123,3 +126,6 @@ using CTreeCtrl::SetItemText; using CTreeCtrl::InsertItem; }; + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp =================================================================== --- trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -15,6 +15,9 @@ #include "ChannelManagerDlg.h" +OPENMPT_NAMESPACE_BEGIN + + /////////////////////////////////////////////////////////// // CChannelManagerDlg @@ -1175,3 +1178,6 @@ OnRButtonDown(nFlags, point); CDialog::OnRButtonDblClk(nFlags, point); } + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/ChannelManagerDlg.h =================================================================== --- trunk/OpenMPT/mptrack/ChannelManagerDlg.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/ChannelManagerDlg.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -10,6 +10,8 @@ #pragma once +OPENMPT_NAMESPACE_BEGIN + #define CM_BT_LEFT 1 #define CM_BT_RIGHT 2 #define CM_NB_COLS 8 @@ -92,3 +94,5 @@ afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point); afx_msg void OnRButtonDblClk(UINT nFlags, CPoint point); }; + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Childfrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/Childfrm.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/Childfrm.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -18,13 +18,16 @@ #include "view_gen.h" #include ".\childfrm.h" - #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif + +OPENMPT_NAMESPACE_BEGIN + + ///////////////////////////////////////////////////////////////////////////// // @@ -452,3 +455,5 @@ } //end rewbs.customKeysAutoEffects + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Childfrm.h =================================================================== --- trunk/OpenMPT/mptrack/Childfrm.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/Childfrm.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -10,11 +10,13 @@ #pragma once +#include "PatternCursor.h" + +OPENMPT_NAMESPACE_BEGIN + class CModControlDlg; class CChildFrame; -#include "PatternCursor.h" - typedef struct _GENERALVIEWSTATE { DWORD cbStruct; @@ -152,3 +154,6 @@ //{{AFX_INSERT_LOCATION}} // Microsoft Developer Studio will insert additional declarations immediately before the previous line. + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/CleanupSong.cpp =================================================================== --- trunk/OpenMPT/mptrack/CleanupSong.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/CleanupSong.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -16,6 +16,10 @@ #include "CleanupSong.h" #include "../common/StringFixer.h" + +OPENMPT_NAMESPACE_BEGIN + + // Default checkbox state bool CModCleanupDlg::m_bCheckBoxes[CU_MAX_CLEANUP_OPTIONS] = { @@ -906,3 +910,6 @@ { return modDoc.GetSoundFile()->Order.MergeSequences(); } + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/CleanupSong.h =================================================================== --- trunk/OpenMPT/mptrack/CleanupSong.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/CleanupSong.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -10,6 +10,8 @@ #pragma once +OPENMPT_NAMESPACE_BEGIN + //================================== class CModCleanupDlg: public CDialog //================================== @@ -87,4 +89,6 @@ afx_msg void OnVerifyMutualExclusive(); //}}AFX_MSG DECLARE_MESSAGE_MAP() -}; \ No newline at end of file +}; + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/CloseMainDialog.cpp =================================================================== --- trunk/OpenMPT/mptrack/CloseMainDialog.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/CloseMainDialog.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -16,6 +16,9 @@ #include "CloseMainDialog.h" +OPENMPT_NAMESPACE_BEGIN + + BEGIN_MESSAGE_MAP(CloseMainDialog, CDialog) ON_COMMAND(IDC_BUTTON1, OnSaveAll) ON_COMMAND(IDC_BUTTON2, OnSaveNone) @@ -160,3 +163,6 @@ m_List.DeleteString(i); } } + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/CloseMainDialog.h =================================================================== --- trunk/OpenMPT/mptrack/CloseMainDialog.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/CloseMainDialog.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -10,6 +10,8 @@ #pragma once +OPENMPT_NAMESPACE_BEGIN + //=================================== class CloseMainDialog: public CDialog //=================================== @@ -38,3 +40,5 @@ DECLARE_MESSAGE_MAP() }; + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/ColourEdit.cpp =================================================================== --- trunk/OpenMPT/mptrack/ColourEdit.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/ColourEdit.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -11,6 +11,10 @@ #include "stdafx.h" #include "colouredit.h" + +OPENMPT_NAMESPACE_BEGIN + + ///////////////////////////////////////////////////////////////////////////// // CColourEdit @@ -58,4 +62,7 @@ { m_crText = rgb; //set text color ref Invalidate(TRUE); //redraw -} \ No newline at end of file +} + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/ColourEdit.h =================================================================== --- trunk/OpenMPT/mptrack/ColourEdit.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/ColourEdit.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -12,6 +12,8 @@ #include "afxwin.h" +OPENMPT_NAMESPACE_BEGIN + class CColourEdit : public CEdit { @@ -33,3 +35,5 @@ DECLARE_MESSAGE_MAP() }; + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/CommandSet.cpp =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/CommandSet.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -20,6 +20,10 @@ #include <sstream> + +OPENMPT_NAMESPACE_BEGIN + + #define ENABLE_LOGGING 0 #if(ENABLE_LOGGING) @@ -1998,4 +2002,7 @@ return conflict; } -//end rewbs.customKeys \ No newline at end of file +//end rewbs.customKeys + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/CommandSet.h =================================================================== --- trunk/OpenMPT/mptrack/CommandSet.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/CommandSet.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -11,6 +11,10 @@ #pragma once #include <string> #include "../common/FlagSet.h" +#include <unordered_map> + +OPENMPT_NAMESPACE_BEGIN + struct CModSpecifications; //#define VK_ALT 0x12 @@ -1209,7 +1213,6 @@ static bool IsExtended(UINT code); }; -#include <unordered_map> #if MPT_COMPILER_MSVC && MPT_MSVC_BEFORE(2010,0) typedef std::tr1::unordered_map<KeyCombination, CommandID, KeyCombination::hash> KeyMap; #else @@ -1321,3 +1324,5 @@ bool LoadDefaultKeymap(); }; + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/CreditStatic.cpp =================================================================== --- trunk/OpenMPT/mptrack/CreditStatic.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/CreditStatic.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -16,6 +16,10 @@ static char THIS_FILE[] = __FILE__; #endif + +OPENMPT_NAMESPACE_BEGIN + + #define DISPLAY_TIMER_ID 150 // timer id ///////////////////////////////////////////////////////////////////////////// // CCreditStatic @@ -949,4 +953,7 @@ // Invalidate(); return TRUE; -} \ No newline at end of file +} + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/CreditStatic.h =================================================================== --- trunk/OpenMPT/mptrack/CreditStatic.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/CreditStatic.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -9,6 +9,8 @@ #pragma once +OPENMPT_NAMESPACE_BEGIN + #define DISPLAY_SLOW 0 #define DISPLAY_MEDIUM 1 #define DISPLAY_FAST 2 @@ -118,3 +120,5 @@ //{{AFX_INSERT_LOCATION}} // Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Ctrl_com.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_com.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/Ctrl_com.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -18,6 +18,10 @@ #include "view_com.h" #include "InputHandler.h" + +OPENMPT_NAMESPACE_BEGIN + + BEGIN_MESSAGE_MAP(CCtrlComments, CModControlDlg) //{{AFX_MSG_MAP(CCtrlComments) ON_EN_CHANGE(IDC_EDIT_COMMENTS, OnCommentsChanged) @@ -213,3 +217,6 @@ delete[] p; } } + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Ctrl_com.h =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_com.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/Ctrl_com.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -11,6 +11,8 @@ #pragma once +OPENMPT_NAMESPACE_BEGIN + //======================================== class CCtrlComments: public CModControlDlg //======================================== @@ -42,3 +44,5 @@ //}}AFX_MSG DECLARE_MESSAGE_MAP() }; + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Ctrl_gen.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_gen.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/Ctrl_gen.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -26,6 +26,10 @@ #include "ctrl_gen.h" // -! NEW_FEATURE#0015 + +OPENMPT_NAMESPACE_BEGIN + + BEGIN_MESSAGE_MAP(CCtrlGeneral, CModControlDlg) //{{AFX_MSG_MAP(CCtrlGeneral) ON_WM_VSCROLL() @@ -685,3 +689,5 @@ m_nDisplayedVu = m_nVuMeter; } + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Ctrl_gen.h =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_gen.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/Ctrl_gen.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -11,6 +11,8 @@ #pragma once +OPENMPT_NAMESPACE_BEGIN + //========================= class CVuMeter: public CWnd //========================= @@ -99,3 +101,5 @@ //}}AFX_MSG DECLARE_MESSAGE_MAP() }; + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -26,6 +26,10 @@ #include "MemoryMappedFile.h" #include "FileDialog.h" + +OPENMPT_NAMESPACE_BEGIN + + #pragma warning(disable:4244) //conversion from 'type1' to 'type2', possible loss of data ///////////////////////////////////////////////////////////////////////// @@ -2854,3 +2858,6 @@ ModInstrument *pIns = m_sndFile.Instruments[m_nInstrument]; if ((pIns) && (pIns->nMixPlug <= MAX_MIXPLUGINS)) m_CbnMixPlug.SetCurSel(pIns->nMixPlug); } + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Ctrl_ins.h =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_ins.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/Ctrl_ins.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -11,6 +11,8 @@ #pragma once +OPENMPT_NAMESPACE_BEGIN + class CNoteMapWnd; class CCtrlInstruments; @@ -193,3 +195,5 @@ //}}AFX_MSG DECLARE_MESSAGE_MAP() }; + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -24,6 +24,9 @@ #include "MIDIMacroDialog.h" +OPENMPT_NAMESPACE_BEGIN + + ////////////////////////////////////////////////////////////// // CCtrlPatterns @@ -1266,3 +1269,5 @@ } } + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Ctrl_pat.h =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/Ctrl_pat.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -14,6 +14,8 @@ #include "globals.h" #include "PatternCursor.h" +OPENMPT_NAMESPACE_BEGIN + class COrderList; class CCtrlPatterns; @@ -263,3 +265,5 @@ afx_msg BOOL OnMouseWheel(UINT nFlags, short zDelta, CPoint pt); afx_msg BOOL OnToolTip(UINT id, NMHDR *pTTTStruct, LRESULT *pResult); }; + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -19,6 +19,9 @@ #include "PatternClipboard.h" +OPENMPT_NAMESPACE_BEGIN + + // Little helper function to avoid copypasta static bool IsSelectionKeyPressed() { return CMainFrame::GetInputHandler()->SelectionPressed(); } static bool IsCtrlKeyPressed() { return CMainFrame::GetInputHandler()->CtrlPressed(); } @@ -1446,3 +1449,6 @@ sndFile.m_lockOrderStart = sndFile.m_lockOrderEnd = ORDERINDEX_INVALID; InvalidateRect(NULL, FALSE); } + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -31,15 +31,18 @@ #include "../soundlib/FileReader.h" #include "../soundlib/SampleFormatConverters.h" #include "FileDialog.h" - #ifdef _DEBUG - #define new DEBUG_NEW +#include <math.h> #endif #ifdef _DEBUG -#include <math.h> +#define new DEBUG_NEW #endif + +OPENMPT_NAMESPACE_BEGIN + + #define FLOAT_ERROR 1.0e-20f // Float point comparison @@ -3241,4 +3244,7 @@ } } } -} \ No newline at end of file +} + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Ctrl_smp.h =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/Ctrl_smp.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -13,6 +13,8 @@ #include "../soundlib/SampleIO.h" +OPENMPT_NAMESPACE_BEGIN + //======================================= class CCtrlSamples: public CModControlDlg //======================================= @@ -133,3 +135,5 @@ //}}AFX_MSG DECLARE_MESSAGE_MAP() }; + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/DefaultVstEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/DefaultVstEditor.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/DefaultVstEditor.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -13,6 +13,10 @@ #include "../soundlib/Sndfile.h" #include "Vstplug.h" + +OPENMPT_NAMESPACE_BEGIN + + #ifndef NO_VST @@ -548,3 +552,6 @@ } #endif // NO_VST + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/DefaultVstEditor.h =================================================================== --- trunk/OpenMPT/mptrack/DefaultVstEditor.h 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/DefaultVstEditor.h 2014-05-31 16:58:08 UTC (rev 4073) @@ -10,17 +10,19 @@ #pragma once +#ifndef NO_VST + +#include "mptrack.h" +#include "AbstractVstEditor.h" + +OPENMPT_NAMESPACE_BEGIN + enum { PARAM_RESOLUTION = 1000, NUM_PLUGINEDITOR_PARAMETERS = 8, // Parameters on screen }; -#ifndef NO_VST - -#include "mptrack.h" -#include "AbstractVstEditor.h" - //=================== class ParamControlSet //=================== @@ -101,5 +103,6 @@ }; +OPENMPT_NAMESPACE_END + #endif // NO_VST - Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Draw_pat.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/Draw_pat.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -23,6 +23,10 @@ #include "EffectInfo.h" #include <string> + +OPENMPT_NAMESPACE_BEGIN + + // Headers #define ROWHDR_WIDTH 32 // Row header #define COLHDR_HEIGHT 16 // Column header @@ -1763,3 +1767,5 @@ ::ReleaseDC(m_hWnd, hdc); } + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/EffectInfo.cpp =================================================================== --- trunk/OpenMPT/mptrack/EffectInfo.cpp 2014-05-31 12:42:46 UTC (rev 4072) +++ trunk/OpenMPT/mptrack/EffectInfo.cpp 2014-05-31 16:58:08 UTC (rev 4073) @@ -14,6 +14,10 @@ #include "../soundlib/Sndfile.h" #include "../soundlib/Tables.h" + +OPENMPT_NAMESPACE_BEGIN + + /////////////////////////////////////////////////////////////////////////// // Effects description @@ -958,3 +962,6 @@ } return (gVolCmdInfo[ndx].supportedFormats & sndFile.GetType()) != 0; } + + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/Effect... [truncated message content] |
From: <man...@us...> - 2014-06-01 08:48:34
|
Revision: 4077 http://sourceforge.net/p/modplug/code/4077 Author: manxorist Date: 2014-06-01 08:48:22 +0000 (Sun, 01 Jun 2014) Log Message: ----------- [Ref] Speedup compilation of libopenmpt on windows by about 10% by including windows.h only in files in common/ instead of everywhere. Modified Paths: -------------- trunk/OpenMPT/common/BuildSettings.h trunk/OpenMPT/common/misc_util.cpp trunk/OpenMPT/common/misc_util.h trunk/OpenMPT/common/mptFstream.h trunk/OpenMPT/common/mptPathString.cpp trunk/OpenMPT/common/mptPathString.h trunk/OpenMPT/common/mptString.cpp trunk/OpenMPT/common/stdafx.h trunk/OpenMPT/common/typedefs.h trunk/OpenMPT/libopenmpt/libopenmpt_test.cpp trunk/OpenMPT/soundlib/Load_mo3.cpp trunk/OpenMPT/test/test.cpp Modified: trunk/OpenMPT/common/BuildSettings.h =================================================================== --- trunk/OpenMPT/common/BuildSettings.h 2014-05-31 18:45:08 UTC (rev 4076) +++ trunk/OpenMPT/common/BuildSettings.h 2014-06-01 08:48:22 UTC (rev 4077) @@ -281,9 +281,8 @@ #define MPT_WITH_CHARSET_LOCALE // PathString requires locale charset #endif -#if !defined(MODPLUG_TRACKER) && defined(MPT_WITH_DYNBIND) -// For library builds, windows.h is only required for LoadLibrary. -//#define NO_WINDOWS_H +#if MPT_OS_WINDOWS && defined(MODPLUG_TRACKER) +#define MPT_USE_WINDOWS_H #endif @@ -332,7 +331,7 @@ #define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers #endif -#if defined(_WIN32) && !defined(NO_WINDOWS_H) +#if defined(_WIN32) #if MPT_COMPILER_MSVC && MPT_MSVC_AT_LEAST(2010,0) #define _WIN32_WINNT 0x0501 // _WIN32_WINNT_WINXP Modified: trunk/OpenMPT/common/misc_util.cpp =================================================================== --- trunk/OpenMPT/common/misc_util.cpp 2014-05-31 18:45:08 UTC (rev 4076) +++ trunk/OpenMPT/common/misc_util.cpp 2014-06-01 08:48:22 UTC (rev 4077) @@ -22,6 +22,10 @@ #endif #endif +#if MPT_OS_WINDOWS +#include <windows.h> +#endif + #if defined(MODPLUG_TRACKER) #include <mmsystem.h> #endif @@ -619,7 +623,7 @@ -#if defined(WIN32) +#if MPT_OS_WINDOWS namespace mpt { @@ -719,7 +723,7 @@ } // namespace Windows } // namespace mpt -#endif // WIN32 +#endif // MPT_OS_WINDOWS #if defined(MPT_WITH_DYNBIND) Modified: trunk/OpenMPT/common/misc_util.h =================================================================== --- trunk/OpenMPT/common/misc_util.h 2014-05-31 18:45:08 UTC (rev 4076) +++ trunk/OpenMPT/common/misc_util.h 2014-06-01 08:48:22 UTC (rev 4077) @@ -674,7 +674,7 @@ } // namespace Util -#if defined(WIN32) +#if MPT_OS_WINDOWS namespace mpt { @@ -725,7 +725,7 @@ } // namespace Windows } // namespace mpt -#endif // WIN32 +#endif // MPT_OS_WINDOWS #if defined(MPT_WITH_DYNBIND) Modified: trunk/OpenMPT/common/mptFstream.h =================================================================== --- trunk/OpenMPT/common/mptFstream.h 2014-05-31 18:45:08 UTC (rev 4076) +++ trunk/OpenMPT/common/mptFstream.h 2014-06-01 08:48:22 UTC (rev 4077) @@ -31,7 +31,7 @@ #elif MPT_COMPILER_GCC -#if defined(WIN32) +#if MPT_OS_WINDOWS // GCC C++ library has no wchar_t overloads #define MPT_FSTREAM_DO_CONVERSIONS #define MPT_FSTREAM_DO_CONVERSIONS_ANSI @@ -111,7 +111,7 @@ { MPT_FSTREAM_OPEN(filename.c_str(), mode); } -#if defined(WIN32) +#if MPT_OS_WINDOWS MPT_DEPRECATED_PATH void open(const wchar_t * filename, std::ios_base::openmode mode = std::ios_base::in | std::ios_base::out) { MPT_FSTREAM_OPEN(filename, mode); @@ -146,7 +146,7 @@ { MPT_FSTREAM_OPEN(filename.c_str(), mode); } -#if defined(WIN32) +#if MPT_OS_WINDOWS MPT_DEPRECATED_PATH void open(const wchar_t * filename, std::ios_base::openmode mode = std::ios_base::in) { MPT_FSTREAM_OPEN(filename, mode); @@ -181,7 +181,7 @@ { MPT_FSTREAM_OPEN(filename.c_str(), mode); } -#if defined(WIN32) +#if MPT_OS_WINDOWS MPT_DEPRECATED_PATH void open(const wchar_t * filename, std::ios_base::openmode mode = std::ios_base::out) { MPT_FSTREAM_OPEN(filename, mode); Modified: trunk/OpenMPT/common/mptPathString.cpp =================================================================== --- trunk/OpenMPT/common/mptPathString.cpp 2014-05-31 18:45:08 UTC (rev 4076) +++ trunk/OpenMPT/common/mptPathString.cpp 2014-06-01 08:48:22 UTC (rev 4077) @@ -10,12 +10,31 @@ #include "stdafx.h" #include "mptPathString.h" +#if MPT_OS_WINDOWS +#include <windows.h> +#endif + OPENMPT_NAMESPACE_BEGIN #if defined(MPT_WITH_PATHSTRING) +#if MPT_OS_WINDOWS + +namespace mpt +{ + +int PathString::CompareNoCase(const PathString & a, const PathString & b) +//----------------------------------------------------------------------- +{ + return lstrcmpiW(a.ToWide().c_str(), b.ToWide().c_str()); +} + +} // namespace mpt + +#endif // MPT_OS_WINDOWS + #if defined(MODPLUG_TRACKER) namespace mpt @@ -142,7 +161,7 @@ } -#if defined(WIN32) +#if MPT_OS_WINDOWS #if defined(_MFC_VER) mpt::PathString PathString::TunnelOutofCString(const CString &path) @@ -189,29 +208,29 @@ FILE * mpt_fopen(const mpt::PathString &filename, const char *mode) //----------------------------------------------------------------- { - #if defined(WIN32) + #if MPT_OS_WINDOWS #if defined(MPT_WITH_CHARSET_LOCALE) return _wfopen(filename.AsNative().c_str(), mode ? mpt::ToWide(mpt::CharsetLocale, mode).c_str() : nullptr); #else return _wfopen(filename.AsNative().c_str(), mode ? mpt::ToWide(mpt::CharsetUTF8, mode).c_str() : nullptr); #endif - #else // !WIN32 + #else // !MPT_OS_WINDOWS return fopen(filename.AsNative().c_str(), mode); - #endif // WIN32 + #endif // MPT_OS_WINDOWS } FILE * mpt_fopen(const mpt::PathString &filename, const wchar_t *mode) //-------------------------------------------------------------------- { - #if defined(WIN32) + #if MPT_OS_WINDOWS return _wfopen(filename.AsNative().c_str(), mode); - #else // !WIN32 + #else // !MPT_OS_WINDOWS #if defined(MPT_WITH_CHARSET_LOCALE) return fopen(filename.AsNative().c_str(), mode ? mpt::ToLocale(mode).c_str() : nullptr); #else return fopen(filename.AsNative().c_str(), mode ? mpt::To(mpt::CharsetUTF8, mode).c_str() : nullptr); #endif - #endif // WIN32 + #endif // MPT_OS_WINDOWS } Modified: trunk/OpenMPT/common/mptPathString.h =================================================================== --- trunk/OpenMPT/common/mptPathString.h 2014-05-31 18:45:08 UTC (rev 4076) +++ trunk/OpenMPT/common/mptPathString.h 2014-06-01 08:48:22 UTC (rev 4077) @@ -23,11 +23,11 @@ namespace mpt { -#if defined(WIN32) +#if MPT_OS_WINDOWS typedef std::wstring RawPathString; -#else // !WIN32 +#else // !MPT_OS_WINDOWS typedef std::string RawPathString; -#endif // WIN32 +#endif // if MPT_OS_WINDOWS class PathString { @@ -85,11 +85,8 @@ } bool empty() const { return path.empty(); } -#if defined(WIN32) - static int CompareNoCase(const PathString & a, const PathString & b) - { - return lstrcmpiW(a.ToWide().c_str(), b.ToWide().c_str()); - } +#if MPT_OS_WINDOWS + static int CompareNoCase(const PathString & a, const PathString & b); #endif public: @@ -117,7 +114,7 @@ if(empty()) return false; const RawPathString::value_type &c = path[path.length() - 1]; -#if defined(WIN32) +#if MPT_OS_WINDOWS if(c == L'\\' || c == L'/') return true; #else @@ -135,7 +132,7 @@ public: -#if defined(WIN32) +#if MPT_OS_WINDOWS // conversions #if defined(MPT_WITH_CHARSET_LOCALE) @@ -170,7 +167,7 @@ #endif #endif -#else // !WIN32 +#else // !MPT_OS_WINDOWS // conversions #if defined(MPT_WITH_CHARSET_LOCALE) @@ -191,7 +188,7 @@ static PathString FromNative(const RawPathString &path) { return PathString(path); } #endif -#endif // WIN32 +#endif // MPT_OS_WINDOWS }; @@ -202,15 +199,15 @@ } // namespace mpt -#if defined(WIN32) +#if MPT_OS_WINDOWS #define MPT_PATHSTRING(x) mpt::PathString::FromNative( L ## x ) -#else // !WIN32 +#else // !MPT_OS_WINDOWS #define MPT_PATHSTRING(x) mpt::PathString::FromNative( x ) -#endif // WIN32 +#endif // MPT_OS_WINDOWS FILE * mpt_fopen(const mpt::PathString &filename, const char *mode); FILE * mpt_fopen(const mpt::PathString &filename, const wchar_t *mode); Modified: trunk/OpenMPT/common/mptString.cpp =================================================================== --- trunk/OpenMPT/common/mptString.cpp 2014-05-31 18:45:08 UTC (rev 4076) +++ trunk/OpenMPT/common/mptString.cpp 2014-06-01 08:48:22 UTC (rev 4077) @@ -30,6 +30,10 @@ #include <strings.h> // for strncasecmp #endif +#if MPT_OS_WINDOWS +#include <windows.h> +#endif + #if defined(MPT_CHARSET_ICONV) #include <iconv.h> #endif Modified: trunk/OpenMPT/common/stdafx.h =================================================================== --- trunk/OpenMPT/common/stdafx.h 2014-05-31 18:45:08 UTC (rev 4076) +++ trunk/OpenMPT/common/stdafx.h 2014-06-01 08:48:22 UTC (rev 4077) @@ -38,7 +38,7 @@ #endif -#if defined(_WIN32) && !defined(NO_WINDOWS_H) +#if defined(MPT_USE_WINDOWS_H) #include <windows.h> #endif Modified: trunk/OpenMPT/common/typedefs.h =================================================================== --- trunk/OpenMPT/common/typedefs.h 2014-05-31 18:45:08 UTC (rev 4076) +++ trunk/OpenMPT/common/typedefs.h 2014-06-01 08:48:22 UTC (rev 4077) @@ -63,7 +63,7 @@ #define PACKED __declspec(align(1)) #define NEEDS_PRAGMA_PACK #elif MPT_COMPILER_GCC || MPT_COMPILER_CLANG -#if MPT_COMPILER_GCC && defined(WIN32) +#if MPT_COMPILER_GCC && MPT_OS_WINDOWS // Some versions of mingw64 need this when windows-hosted. Strange. #define NEEDS_PRAGMA_PACK #endif @@ -418,17 +418,20 @@ -#if !defined(WIN32) +#if !defined(MPT_USE_WINDOWS_H) // openmpt assumes these type have exact WIN32 semantics +namespace mpt { namespace Legacy { typedef std::uint8_t BYTE; typedef std::uint16_t WORD; typedef std::uint32_t DWORD; typedef std::int32_t LONG; typedef std::uint32_t UINT; +} } // namespace mpt::Legacy +using namespace mpt::Legacy; -#endif // !WIN32 +#endif // !MPT_USE_WINDOWS_H Modified: trunk/OpenMPT/libopenmpt/libopenmpt_test.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_test.cpp 2014-05-31 18:45:08 UTC (rev 4076) +++ trunk/OpenMPT/libopenmpt/libopenmpt_test.cpp 2014-06-01 08:48:22 UTC (rev 4077) @@ -23,7 +23,7 @@ #if defined( LIBOPENMPT_BUILD_TEST ) -#if defined(WIN32) && defined(UNICODE) +#if (defined(_WIN32) || defined(WIN32)) && (defined(_UNICODE) || defined(UNICODE)) #if defined(__GNUC__) // mingw64 does only default to special C linkage for "main", but not for "wmain". extern "C" Modified: trunk/OpenMPT/soundlib/Load_mo3.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_mo3.cpp 2014-05-31 18:45:08 UTC (rev 4076) +++ trunk/OpenMPT/soundlib/Load_mo3.cpp 2014-06-01 08:48:22 UTC (rev 4077) @@ -56,7 +56,7 @@ { // Library loaded successfully. #if MPT_OS_WINDOWS - #define UNMO3_API WINAPI + #define UNMO3_API __stdcall #else #define UNMO3_API #endif Modified: trunk/OpenMPT/test/test.cpp =================================================================== --- trunk/OpenMPT/test/test.cpp 2014-05-31 18:45:08 UTC (rev 4076) +++ trunk/OpenMPT/test/test.cpp 2014-06-01 08:48:22 UTC (rev 4077) @@ -39,6 +39,9 @@ #include <ostream> #include <sstream> #include <stdexcept> +#if MPT_OS_WINDOWS +#include <windows.h> +#endif #ifdef _DEBUG #if MPT_COMPILER_MSVC && defined(_MFC_VER) @@ -1572,7 +1575,7 @@ VERIFY_EQUAL_NONCONT(memcmp(&sampleData[0], &sampleDataNew[0], sampleData.size()), 0); fclose(f); } - #ifdef WIN32 + #if MPT_OS_WINDOWS for(int retry=0; retry<10; retry++) { if(DeleteFileW(filename.AsNative().c_str()) != FALSE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-06-01 10:12:35
|
Revision: 4078 http://sourceforge.net/p/modplug/code/4078 Author: manxorist Date: 2014-06-01 10:12:23 +0000 (Sun, 01 Jun 2014) Log Message: ----------- [Ref] Implement a generic mpt::GetAppPath in misc_util.cpp (exactly the same implementation as in CTrackApp::SetupPaths before). Thereby avoid back-dependency from common/ on mptrack/ . [Ref] Make m_szExePath non-global. Modified Paths: -------------- trunk/OpenMPT/common/misc_util.cpp trunk/OpenMPT/common/misc_util.h trunk/OpenMPT/mptrack/MPTrackUtil.cpp trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/Mptrack.h Modified: trunk/OpenMPT/common/misc_util.cpp =================================================================== --- trunk/OpenMPT/common/misc_util.cpp 2014-06-01 08:48:22 UTC (rev 4077) +++ trunk/OpenMPT/common/misc_util.cpp 2014-06-01 10:12:23 UTC (rev 4078) @@ -751,23 +751,46 @@ #endif -#if !defined(MODPLUG_TRACKER) -// For OpenMPT, this is defined in mptrack/MPTrackUtil.cpp . mpt::PathString GetAppPath() { +#if defined(MODPLUG_TRACKER) + WCHAR exeFileName[MAX_PATH+1]; + MemsetZero(exeFileName); + if(!GetModuleFileNameW(NULL, exeFileName, MAX_PATH)) + { + return mpt::PathString(); + } + return mpt::GetAbsolutePath(mpt::PathString::FromNative(exeFileName).GetDrive() + mpt::PathString::FromNative(exeFileName).GetDir()); +#else return mpt::PathString(); // dummy +#endif } -#endif + mpt::PathString GetSystemPath() { WCHAR path[MAX_PATH+1]; MemsetZero(path); - GetSystemDirectoryW(path, MAX_PATH); + if(!GetSystemDirectoryW(path, MAX_PATH)) + { + return mpt::PathString(); + } return mpt::PathString::FromNative(path) + MPT_PATHSTRING("\\"); } +mpt::PathString GetAbsolutePath(const mpt::PathString &path) +{ + WCHAR fullPathName[MAX_PATH+1]; + MemsetZero(fullPathName); + if(!GetFullPathNameW(path.AsNative().c_str(), MAX_PATH, fullPathName, NULL)) + { + return path; + } + return mpt::PathString::FromNative(fullPathName); +} + + class LibraryHandle { Modified: trunk/OpenMPT/common/misc_util.h =================================================================== --- trunk/OpenMPT/common/misc_util.h 2014-06-01 08:48:22 UTC (rev 4077) +++ trunk/OpenMPT/common/misc_util.h 2014-06-01 10:12:23 UTC (rev 4078) @@ -742,6 +742,9 @@ // Returns the system directory path, e.g. "C:\Windows\System32\" mpt::PathString GetSystemPath(); +// Returns the absolute path for a potentially relative path and removes ".." or "." components. (same as GetFullPathNameW) +mpt::PathString GetAbsolutePath(const mpt::PathString &path); + #endif // MPT_OS_WINDOWS Modified: trunk/OpenMPT/mptrack/MPTrackUtil.cpp =================================================================== --- trunk/OpenMPT/mptrack/MPTrackUtil.cpp 2014-06-01 08:48:22 UTC (rev 4077) +++ trunk/OpenMPT/mptrack/MPTrackUtil.cpp 2014-06-01 10:12:23 UTC (rev 4078) @@ -19,22 +19,6 @@ OPENMPT_NAMESPACE_BEGIN - -namespace mpt -{ - - -// declared in misc_util.h -mpt::PathString GetAppPath() -//-------------------------- -{ - return theApp.GetAppDirPath(); -} - - -} // namespace mpt - - /* * Loads resource. * [in] lpName and lpType: parameters passed to FindResource(). Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2014-06-01 08:48:22 UTC (rev 4077) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2014-06-01 10:12:23 UTC (rev 4078) @@ -2677,11 +2677,11 @@ for(size_t i = 0; i < 2; i++) // 0: app items, 1: user items { // To avoid duplicates, check whether app path and config path are the same. - if (i == 1 && mpt::PathString::CompareNoCase(CTrackApp::GetAppDirPath(), theApp.GetConfigPath()) == 0) + if (i == 1 && mpt::PathString::CompareNoCase(theApp.GetAppDirPath(), theApp.GetConfigPath()) == 0) break; mpt::PathString basePath; - basePath = (i == 0) ? CTrackApp::GetAppDirPath() : theApp.GetConfigPath(); + basePath = (i == 0) ? theApp.GetAppDirPath() : theApp.GetConfigPath(); basePath += pszFolderName; if (Util::sdOs::IsPathFileAvailable(basePath, Util::sdOs::FileModeExists) == false) continue; Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2014-06-01 08:48:22 UTC (rev 4077) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2014-06-01 10:12:23 UTC (rev 4078) @@ -294,8 +294,6 @@ } -mpt::PathString CTrackApp::m_szExePath; - ///////////////////////////////////////////////////////////////////////////// // MPTRACK Command Line options @@ -700,7 +698,7 @@ // copy a config file from the exe directory to the new config dirs mpt::PathString sOldPath; mpt::PathString sNewPath; - sOldPath = m_szExePath; + sOldPath = GetAppDirPath(); sOldPath += sSubDir; sOldPath += sFileName; @@ -727,19 +725,9 @@ void CTrackApp::SetupPaths(bool overridePortable) //----------------------------------------------- { - WCHAR tempExePath[MAX_PATH]; - if(GetModuleFileNameW(NULL, tempExePath, CountOf(tempExePath))) - { - mpt::String::SetNullTerminator(tempExePath); - m_szExePath = mpt::PathString::FromNative(tempExePath).GetDrive(); - m_szExePath += mpt::PathString::FromNative(tempExePath).GetDir(); + m_szExePath = mpt::GetAppPath(); + SetCurrentDirectoryW(m_szExePath.AsNative().c_str()); - WCHAR wcsDir[MAX_PATH]; - GetFullPathNameW(m_szExePath.AsNative().c_str(), CountOf(wcsDir), wcsDir, NULL); - m_szExePath = mpt::PathString::FromNative(wcsDir); - SetCurrentDirectoryW(wcsDir); - } - m_szConfigDirectory = mpt::PathString(); // Try to find a nice directory where we should store our settings (default: %APPDATA%) bool bIsAppDir = overridePortable; @@ -755,7 +743,7 @@ m_szConfigDirectory = mpt::PathString::FromNative(tempConfigDirectory); // Check if the user prefers to use the app's directory - m_szConfigFileName = m_szExePath; // config file + m_szConfigFileName = GetAppDirPath(); // config file m_szConfigFileName += MPT_PATHSTRING("mptrack.ini"); if(GetPrivateProfileIntW(L"Paths", L"UseAppDataDirectory", 1, m_szConfigFileName.AsNative().c_str()) == 0) { @@ -780,7 +768,7 @@ #endif // WIN32 Legacy Stuff } else { - m_szConfigDirectory = m_szExePath; + m_szConfigDirectory = GetAppDirPath(); } // Create tunings dir @@ -796,7 +784,7 @@ { // Import old tunings mpt::PathString sOldTunings; - sOldTunings = m_szExePath; + sOldTunings = GetAppDirPath(); sOldTunings += MPT_PATHSTRING("tunings\\"); if(PathIsDirectoryW(sOldTunings.AsNative().c_str()) != 0) Modified: trunk/OpenMPT/mptrack/Mptrack.h =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.h 2014-06-01 08:48:22 UTC (rev 4077) +++ trunk/OpenMPT/mptrack/Mptrack.h 2014-06-01 10:12:23 UTC (rev 4078) @@ -205,7 +205,7 @@ DWORD m_dwTimeStarted, m_dwLastPluginIdleCall; // Default macro configuration MIDIMacroConfig m_MidiCfg; - static mpt::PathString m_szExePath; + mpt::PathString m_szExePath; mpt::PathString m_szConfigDirectory; mpt::PathString m_szConfigFileName; mpt::PathString m_szPluginCacheFileName; @@ -222,7 +222,7 @@ static VOID SetAsProject(BOOL n) { m_nProject = n; } // -! NEW_FEATURE#0023 - static mpt::PathString GetAppDirPath() {return m_szExePath;} // Returns '\'-ended executable directory path. + mpt::PathString GetAppDirPath() {return m_szExePath;} // Returns '\'-ended executable directory path. static MODTYPE GetDefaultDocType() { return m_nDefaultDocType; } static void SetDefaultDocType(MODTYPE n) { m_nDefaultDocType = n; } static MIDILIBSTRUCT &GetMidiLibrary() { return midiLibrary; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-06-03 07:41:27
|
Revision: 4081 http://sourceforge.net/p/modplug/code/4081 Author: manxorist Date: 2014-06-03 07:41:16 +0000 (Tue, 03 Jun 2014) Log Message: ----------- [Ref] Add MPT_COMPILER_UNION_TYPE_ALIASES macro for MSVC and GCC. [Fix] Only use unions for float<->int type punning if MPT_COMPILER_UNION_TYPE_ALIASES. [Ref] Add MPT_PLATFORM_IEEE_FLOAT which indictaes that the platform uses standard ieee754 floating point (currently always defined). [Ref] Add explicit-endian ieee754 floating point types. When appropriate, only use a tiny wrapper around the native type in order to give compilers better optimization opportunities which hab been lost when introducing uint8_4. [Ref] Avoid endian-ambiguous storing of floating point data in uint8_4. [Ref] Kill uint8_4. [Ref] Kill union FloatInt32. [Imp] Add more float<->int test cases. [Ref] Kill MPT_PLATFORM_FLIPPED_FLOAT_ENDIAN. This is better handled as a special case in EncodeIEE754binary32 and DecodeIEEE754binary32 (when required in the future). [Ref] Tiny cleanups. Modified Paths: -------------- trunk/OpenMPT/common/typedefs.h trunk/OpenMPT/mptrack/VstPresets.cpp trunk/OpenMPT/soundlib/Endianness.h trunk/OpenMPT/soundlib/FileReader.h trunk/OpenMPT/soundlib/SampleFormatConverters.h trunk/OpenMPT/test/test.cpp Modified: trunk/OpenMPT/common/typedefs.h =================================================================== --- trunk/OpenMPT/common/typedefs.h 2014-06-02 17:13:19 UTC (rev 4080) +++ trunk/OpenMPT/common/typedefs.h 2014-06-03 07:41:16 UTC (rev 4081) @@ -34,10 +34,34 @@ +#if MPT_COMPILER_GCC || MPT_COMPILER_MSVC +// Compiler supports type-punning through unions. This is not stricly standard-conforming. +// For GCC, this is documented, for MSVC this is apparently not documented, but we assume it. +#define MPT_COMPILER_UNION_TYPE_ALIASES 1 +#endif + +#ifndef MPT_COMPILER_UNION_TYPE_ALIASES +// Compiler does not support type-punning through unions. std::memcpy is used instead. +// This is the safe fallback and strictly standard-conforming. +// Another standard-compliant alternative would be casting pointers to a character type pointer. +// This results in rather unreadable code and, +// in most cases, compilers generate better code by just inlining the memcpy anyway. +// (see <http://blog.regehr.org/archives/959>). +#define MPT_COMPILER_UNION_TYPE_ALIASES 0 +#endif + + + +// Platform has native IEEE floating point representation. +// (Currently always assumed) +#define MPT_PLATFORM_IEEE_FLOAT 1 + + + #if MPT_COMPILER_MSVC #if MPT_MSVC_BEFORE(2010,0) -#define nullptr 0 +#define nullptr 0 #endif #elif MPT_COMPILER_GCC @@ -369,21 +393,21 @@ explicit int24(int other) { #ifdef MPT_PLATFORM_BIG_ENDIAN - bytes[0] = ((unsigned int)other>>16)&0xff; - bytes[1] = ((unsigned int)other>> 8)&0xff; - bytes[2] = ((unsigned int)other>> 0)&0xff; + bytes[0] = (static_cast<unsigned int>(other)>>16)&0xff; + bytes[1] = (static_cast<unsigned int>(other)>> 8)&0xff; + bytes[2] = (static_cast<unsigned int>(other)>> 0)&0xff; #else - bytes[0] = ((unsigned int)other>> 0)&0xff; - bytes[1] = ((unsigned int)other>> 8)&0xff; - bytes[2] = ((unsigned int)other>>16)&0xff; + bytes[0] = (static_cast<unsigned int>(other)>> 0)&0xff; + bytes[1] = (static_cast<unsigned int>(other)>> 8)&0xff; + bytes[2] = (static_cast<unsigned int>(other)>>16)&0xff; #endif } operator int() const { #ifdef MPT_PLATFORM_BIG_ENDIAN - return ((int8)bytes[0] * 65536) + (bytes[1] * 256) + bytes[2]; + return (static_cast<int8>(bytes[0]) * 65536) + (bytes[1] * 256) + bytes[2]; #else - return ((int8)bytes[2] * 65536) + (bytes[1] * 256) + bytes[0]; + return (static_cast<int8>(bytes[2]) * 65536) + (bytes[1] * 256) + bytes[0]; #endif } }; @@ -392,32 +416,11 @@ #define int24_max (0+0x007fffff) -// 32-bit wrapper for encoding 32-bit floats -struct uint8_4 -{ - uint8 x[4]; - uint8_4() { } - uint8_4(uint8 a, uint8 b, uint8 c, uint8 d) { x[0] = a; x[1] = b; x[2] = c; x[3] = d; } - uint32 GetBE() const { return (x[0] << 24) | (x[1] << 16) | (x[2] << 8) | (x[3] << 0); } - uint32 GetLE() const { return (x[0] << 0) | (x[1] << 8) | (x[2] << 16) | (x[3] << 24); } - uint8_4 & SetBE(uint32 y) { x[0] = (y >> 24)&0xff; x[1] = (y >> 16)&0xff; x[2] = (y >> 8)&0xff; x[3] = (y >> 0)&0xff; return *this; } - uint8_4 & SetLE(uint32 y) { x[0] = (y >> 0)&0xff; x[1] = (y >> 8)&0xff; x[2] = (y >> 16)&0xff; x[3] = (y >> 24)&0xff; return *this; } -}; -STATIC_ASSERT(sizeof(uint8_4) == 4); - - typedef float float32; STATIC_ASSERT(sizeof(float32) == 4); -union FloatInt32 -{ - float32 f; - uint32 i; -}; -STATIC_ASSERT(sizeof(FloatInt32) == 4); - #if !defined(MPT_USE_WINDOWS_H) // openmpt assumes these type have exact WIN32 semantics Modified: trunk/OpenMPT/mptrack/VstPresets.cpp =================================================================== --- trunk/OpenMPT/mptrack/VstPresets.cpp 2014-06-02 17:13:19 UTC (rev 4080) +++ trunk/OpenMPT/mptrack/VstPresets.cpp 2014-06-03 07:41:16 UTC (rev 4081) @@ -265,7 +265,7 @@ void VSTPresets::WriteBE(float v, std::ostream &f) //------------------------------------------------ { - Write(EncodeFloatBE(v), f); + Write(IEEE754binary32BE(v), f); } Modified: trunk/OpenMPT/soundlib/Endianness.h =================================================================== --- trunk/OpenMPT/soundlib/Endianness.h 2014-06-02 17:13:19 UTC (rev 4080) +++ trunk/OpenMPT/soundlib/Endianness.h 2014-06-03 07:41:16 UTC (rev 4081) @@ -105,49 +105,199 @@ #undef bswap16 #undef bswap32 -static forceinline float DecodeFloatNE(uint32 i) + +// 1.0f --> 0x3f800000u +static forceinline uint32 EncodeIEEE754binary32(float32 f) { - FloatInt32 conv; - conv.i = i; - return conv.f; -} -static forceinline uint32 EncodeFloatNE(float f) -{ - FloatInt32 conv; - conv.f = f; - return conv.i; -} -static forceinline float DecodeFloatBE(uint8_4 x) -{ - #if defined(MPT_PLATFORM_FLIPPED_FLOAT_ENDIAN) - return DecodeFloatNE(x.GetLE()); +#if MPT_PLATFORM_IEEE_FLOAT + STATIC_ASSERT(sizeof(uint32) == sizeof(float32)); + #if MPT_COMPILER_UNION_TYPE_ALIASES + union { + float32 f; + uint32 i; + } conv; + conv.f = f; + return conv.i; #else - return DecodeFloatNE(x.GetBE()); + uint32 i = 0; + std::memcpy(&i, &f, sizeof(float32)); + return i; #endif +#else + #error "IEEE754 single precision float support is required (for now)" +#endif } -static forceinline uint8_4 EncodeFloatBE(float f) + +// 0x3f800000u --> 1.0f +static forceinline float32 DecodeIEEE754binary32(uint32 i) { - #if defined(MPT_PLATFORM_FLIPPED_FLOAT_ENDIAN) - return uint8_4().SetLE(EncodeFloatNE(f)); +#if MPT_PLATFORM_IEEE_FLOAT + STATIC_ASSERT(sizeof(uint32) == sizeof(float32)); + #if MPT_COMPILER_UNION_TYPE_ALIASES + union { + uint32 i; + float32 f; + } conv; + conv.i = i; + return conv.f; #else - return uint8_4().SetBE(EncodeFloatNE(f)); + float32 f = 0.0f; + std::memcpy(&f, &i, sizeof(float32)); + return f; #endif +#else + #error "IEEE754 single precision float support is required (for now)" +#endif } -static forceinline float DecodeFloatLE(uint8_4 x) + + +// template parameters are byte indices corresponding to the individual bytes of iee754 in memory +template<std::size_t hihi, std::size_t hilo, std::size_t lohi, std::size_t lolo> +struct IEEE754binary32Emulated { - #if defined(MPT_PLATFORM_FLIPPED_FLOAT_ENDIAN) - return DecodeFloatNE(x.GetBE()); - #else - return DecodeFloatNE(x.GetLE()); - #endif -} -static forceinline uint8_4 EncodeFloatLE(float f) +private: + typedef IEEE754binary32Emulated<hihi,hilo,lohi,lolo> self_t; + uint8 bytes[4]; +public: + forceinline uint8 GetByte(std::size_t i) const + { + return bytes[i]; + } + forceinline IEEE754binary32Emulated() { } + forceinline explicit IEEE754binary32Emulated(float32 f) + { + SetInt32(EncodeIEEE754binary32(f)); + } + // b0...b3 are in memroy order, i.e. depend on the endianness of this type + // little endian: (0x00,0x00,0x80,0x3f) + // big endian: (0x3f,0x80,0x00,0x00) + forceinline explicit IEEE754binary32Emulated(uint8 b0, uint8 b1, uint8 b2, uint8 b3) + { + bytes[0] = b0; + bytes[1] = b1; + bytes[2] = b2; + bytes[3] = b3; + } + forceinline operator float32 () const + { + return DecodeIEEE754binary32(GetInt32()); + } + forceinline self_t & SetInt32(uint32 i) + { + bytes[hihi] = static_cast<uint8>(i >> 24); + bytes[hilo] = static_cast<uint8>(i >> 16); + bytes[lohi] = static_cast<uint8>(i >> 8); + bytes[lolo] = static_cast<uint8>(i >> 0); + return *this; + } + forceinline uint32 GetInt32() const + { + return 0u + | (static_cast<uint32>(bytes[hihi]) << 24) + | (static_cast<uint32>(bytes[hilo]) << 16) + | (static_cast<uint32>(bytes[lohi]) << 8) + | (static_cast<uint32>(bytes[lolo]) << 0) + ; + } + forceinline bool operator == (const self_t &cmp) const + { + return true + && bytes[0] == cmp.bytes[0] + && bytes[1] == cmp.bytes[1] + && bytes[2] == cmp.bytes[2] + && bytes[3] == cmp.bytes[3] + ; + } + forceinline bool operator != (const self_t &cmp) const + { + return !(*this == cmp); + } +}; + +#if MPT_PLATFORM_IEEE_FLOAT + +struct IEEE754binary32Native { - #if defined(MPT_PLATFORM_FLIPPED_FLOAT_ENDIAN) - return uint8_4().SetBE(EncodeFloatNE(f)); - #else - return uint8_4().SetLE(EncodeFloatNE(f)); - #endif -} +private: + float32 value; +public: + forceinline uint8 GetByte(std::size_t i) const + { + #if defined(MPT_PLATFORM_LITTLE_ENDIAN) + return static_cast<uint8>(EncodeIEEE754binary32(value) >> (i*8)); + #elif defined(MPT_PLATFORM_BIG_ENDIAN) + return static_cast<uint8>(EncodeIEEE754binary32(value) >> ((4-1-i)*8)); + #else + STATIC_ASSERT(false); + #endif + } + forceinline IEEE754binary32Native() { } + forceinline explicit IEEE754binary32Native(float32 f) + { + value = f; + } + // b0...b3 are in memroy order, i.e. depend on the endianness of this type + // little endian: (0x00,0x00,0x80,0x3f) + // big endian: (0x3f,0x80,0x00,0x00) + forceinline explicit IEEE754binary32Native(uint8 b0, uint8 b1, uint8 b2, uint8 b3) + { + #if defined(MPT_PLATFORM_LITTLE_ENDIAN) + value = DecodeIEEE754binary32(0u + | (static_cast<uint32>(b0) << 0) + | (static_cast<uint32>(b1) << 8) + | (static_cast<uint32>(b2) << 16) + | (static_cast<uint32>(b3) << 24) + ); + #elif defined(MPT_PLATFORM_BIG_ENDIAN) + value = DecodeIEEE754binary32(0u + | (static_cast<uint32>(b0) << 24) + | (static_cast<uint32>(b1) << 16) + | (static_cast<uint32>(b2) << 8) + | (static_cast<uint32>(b3) << 0) + ); + #else + STATIC_ASSERT(false); + #endif + } + forceinline operator float32 () const + { + return value; + } + forceinline IEEE754binary32Native & SetInt32(uint32 i) + { + value = DecodeIEEE754binary32(i); + return *this; + } + forceinline uint32 GetInt32() const + { + return EncodeIEEE754binary32(value); + } + forceinline bool operator == (const IEEE754binary32Native &cmp) const + { + return value == cmp.value; + } + forceinline bool operator != (const IEEE754binary32Native &cmp) const + { + return value != cmp.value; + } +}; +#if defined(MPT_PLATFORM_LITTLE_ENDIAN) +typedef IEEE754binary32Native IEEE754binary32LE; +typedef IEEE754binary32Emulated<0,1,2,3> IEEE754binary32BE; +#elif defined(MPT_PLATFORM_BIG_ENDIAN) +typedef IEEE754binary32Emulated<3,2,1,0> IEEE754binary32LE; +typedef IEEE754binary32Native IEEE754binary32BE; +#endif + +#else // !MPT_PLATFORM_IEEE_FLOAT + +typedef IEEE754binary32Emulated<3,2,1,0> IEEE754binary32LE; +typedef IEEE754binary32Emulated<0,1,2,3> IEEE754binary32BE; + +#endif // MPT_PLATFORM_IEEE_FLOAT + +STATIC_ASSERT(sizeof(IEEE754binary32LE) == 4); +STATIC_ASSERT(sizeof(IEEE754binary32BE) == 4); + OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/soundlib/FileReader.h =================================================================== --- trunk/OpenMPT/soundlib/FileReader.h 2014-06-02 17:13:19 UTC (rev 4080) +++ trunk/OpenMPT/soundlib/FileReader.h 2014-06-03 07:41:16 UTC (rev 4081) @@ -767,10 +767,10 @@ // If successful, the file cursor is advanced by the size of the float. float ReadFloatLE() { - uint8_4 target; + IEEE754binary32LE target; if(Read(target)) { - return DecodeFloatLE(target); + return target; } else { return 0.0f; @@ -781,10 +781,10 @@ // If successful, the file cursor is advanced by the size of the float. float ReadFloatBE() { - uint8_4 target; + IEEE754binary32BE target; if(Read(target)) { - return DecodeFloatBE(target); + return target; } else { return 0.0f; Modified: trunk/OpenMPT/soundlib/SampleFormatConverters.h =================================================================== --- trunk/OpenMPT/soundlib/SampleFormatConverters.h 2014-06-02 17:13:19 UTC (rev 4080) +++ trunk/OpenMPT/soundlib/SampleFormatConverters.h 2014-06-03 07:41:16 UTC (rev 4081) @@ -166,7 +166,7 @@ static const int input_inc = 4; forceinline output_t operator() (const input_t *inBuf) { - return DecodeFloatLE(uint8_4(uint8(inBuf[loLoByteIndex]), uint8(inBuf[loHiByteIndex]), uint8(inBuf[hiLoByteIndex]), uint8(inBuf[hiHiByteIndex]))); + return IEEE754binary32LE(uint8(inBuf[loLoByteIndex]), uint8(inBuf[loHiByteIndex]), uint8(inBuf[hiLoByteIndex]), uint8(inBuf[hiHiByteIndex])); } }; @@ -179,7 +179,7 @@ float factor; forceinline output_t operator() (const input_t *inBuf) { - return factor * DecodeFloatLE(uint8_4(uint8(inBuf[loLoByteIndex]), uint8(inBuf[loHiByteIndex]), uint8(inBuf[hiLoByteIndex]), uint8(inBuf[hiHiByteIndex]))); + return factor * IEEE754binary32LE(uint8(inBuf[loLoByteIndex]), uint8(inBuf[loHiByteIndex]), uint8(inBuf[hiLoByteIndex]), uint8(inBuf[hiHiByteIndex])); } forceinline DecodeScaledFloat32(float scaleFactor) : factor(scaleFactor) Modified: trunk/OpenMPT/test/test.cpp =================================================================== --- trunk/OpenMPT/test/test.cpp 2014-06-02 17:13:19 UTC (rev 4080) +++ trunk/OpenMPT/test/test.cpp 2014-06-03 07:41:16 UTC (rev 4081) @@ -196,23 +196,6 @@ } -static float AsFloat(uint32 x) -//---------------------------- -{ - FloatInt32 conv; - conv.i = x; - return conv.f; -} - -static uint32 AsInt(float x) -//-------------------------- -{ - FloatInt32 conv; - conv.f = x; - return conv.i; -} - - static void TestFloatFormat(double x, const char * format, mpt::FormatFlags f, std::size_t width = 0, int precision = -1) { #ifdef MODPLUG_TRACKER @@ -284,18 +267,22 @@ //----------------------------- { - VERIFY_EQUAL(0x3f800000u, AsInt(1.0f)); - VERIFY_EQUAL(AsFloat(0x3f800000u), 1.0f); - VERIFY_EQUAL(AsFloat(0x00000000u), 0.0f); - VERIFY_EQUAL(AsFloat(0xbf800000u), -1.0f); - VERIFY_EQUAL(DecodeFloatNE(0x3f800000u), 1.0f); - VERIFY_EQUAL(DecodeFloatLE(uint8_4(0x00,0x00,0x80,0x3f)), 1.0f); - VERIFY_EQUAL(DecodeFloatBE(uint8_4(0x3f,0x80,0x00,0x00)), 1.0f); - VERIFY_EQUAL(EncodeFloatNE(1.0f), 0x3f800000u); - VERIFY_EQUAL(EncodeFloatBE(1.0f).GetBE(), 0x3f800000u); - VERIFY_EQUAL(EncodeFloatLE(1.0f).GetBE(), 0x0000803fu); - VERIFY_EQUAL(EncodeFloatLE(1.0f).GetLE(), 0x3f800000u); - VERIFY_EQUAL(EncodeFloatBE(1.0f).GetLE(), 0x0000803fu); + VERIFY_EQUAL(EncodeIEEE754binary32(1.0f), 0x3f800000u); + VERIFY_EQUAL(EncodeIEEE754binary32(-1.0f), 0xbf800000u); + VERIFY_EQUAL(DecodeIEEE754binary32(0x00000000u), 0.0f); + VERIFY_EQUAL(DecodeIEEE754binary32(0x41840000u), 16.5f); + VERIFY_EQUAL(DecodeIEEE754binary32(0x3faa0000u), 1.328125f); + VERIFY_EQUAL(DecodeIEEE754binary32(0xbfaa0000u), -1.328125f); + VERIFY_EQUAL(DecodeIEEE754binary32(0x3f800000u), 1.0f); + VERIFY_EQUAL(DecodeIEEE754binary32(0x00000000u), 0.0f); + VERIFY_EQUAL(DecodeIEEE754binary32(0xbf800000u), -1.0f); + VERIFY_EQUAL(DecodeIEEE754binary32(0x3f800000u), 1.0f); + VERIFY_EQUAL(IEEE754binary32LE(1.0f).GetInt32(), 0x3f800000u); + VERIFY_EQUAL(IEEE754binary32BE(1.0f).GetInt32(), 0x3f800000u); + VERIFY_EQUAL(IEEE754binary32LE(0x00,0x00,0x80,0x3f), 1.0f); + VERIFY_EQUAL(IEEE754binary32BE(0x3f,0x80,0x00,0x00), 1.0f); + VERIFY_EQUAL(IEEE754binary32LE(1.0f), IEEE754binary32LE(0x00,0x00,0x80,0x3f)); + VERIFY_EQUAL(IEEE754binary32BE(1.0f), IEEE754binary32BE(0x3f,0x80,0x00,0x00)); VERIFY_EQUAL(Stringify(1.5f), "1.5"); VERIFY_EQUAL(Stringify(true), "1"); @@ -2076,11 +2063,11 @@ uint8 *source32 = sourceBuf; for(size_t i = 0; i < 65536; i++) { - uint8_4 floatbits = EncodeFloatBE((static_cast<float>(i) / 65536.0f) - 0.5f); - source32[i * 4 + 0] = floatbits.x[0]; - source32[i * 4 + 1] = floatbits.x[1]; - source32[i * 4 + 2] = floatbits.x[2]; - source32[i * 4 + 3] = floatbits.x[3]; + IEEE754binary32BE floatbits = IEEE754binary32BE((static_cast<float>(i) / 65536.0f) - 0.5f); + source32[i * 4 + 0] = floatbits.GetByte(0); + source32[i * 4 + 1] = floatbits.GetByte(1); + source32[i * 4 + 2] = floatbits.GetByte(2); + source32[i * 4 + 3] = floatbits.GetByte(3); } int16 *truncated16 = static_cast<int16 *>(targetBuf); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-06-09 14:01:12
|
Revision: 4091 http://sourceforge.net/p/modplug/code/4091 Author: manxorist Date: 2014-06-09 14:00:26 +0000 (Mon, 09 Jun 2014) Log Message: ----------- [Var] Set svn:eol-style (and svn:mime-type while at it) for almost all file types used in the code base. This completes r4079 which had already set auto-props for these properties for v1.8 or greater svn clients. As most files historically used CRLF line endings without having a svn:eol-style property set, svn will now convert the line endings internally to LF encoding as we set svn:eol-style=native. This results in full-file or almost-full-file diffs for a majority of the code base. There are NO other changes in this commit. Revision Links: -------------- http://sourceforge.net/p/modplug/code/4079 Modified Paths: -------------- trunk/OpenMPT/README.md trunk/OpenMPT/build/premake4-defaults-DLL.lua trunk/OpenMPT/build/premake4-defaults-EXE.lua trunk/OpenMPT/build/premake4-defaults-LIB.lua trunk/OpenMPT/build/premake4-defaults-shared.lua trunk/OpenMPT/build/premake4-defaults-static.lua trunk/OpenMPT/build/premake4.lua trunk/OpenMPT/common/FlagSet.h trunk/OpenMPT/common/StringFixer.h trunk/OpenMPT/common/misc_util.cpp trunk/OpenMPT/common/misc_util.h trunk/OpenMPT/common/serialization_utils.cpp trunk/OpenMPT/common/serialization_utils.h trunk/OpenMPT/common/thread.h trunk/OpenMPT/common/typedefs.h trunk/OpenMPT/common/version.h trunk/OpenMPT/include/flac/OpenMPT.txt trunk/OpenMPT/include/portaudio/bindings/java/jportaudio.dox trunk/OpenMPT/include/portaudio/doc/src/api_overview.dox trunk/OpenMPT/include/portaudio/doc/src/license.dox trunk/OpenMPT/include/portaudio/doc/src/mainpage.dox trunk/OpenMPT/include/portaudio/doc/src/srcguide.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/blocking_read_write.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/compile_cmake.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/compile_linux.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/compile_mac_coreaudio.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/compile_windows.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/compile_windows_asio_msvc.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/compile_windows_mingw.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/exploring.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/initializing_portaudio.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/open_default_stream.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/querying_devices.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/start_stop_abort.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/terminating_portaudio.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/tutorial_start.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/utility_functions.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/writing_a_callback.dox trunk/OpenMPT/include/premake4.lua trunk/OpenMPT/include/pugixml/docs/samples/character.xml trunk/OpenMPT/include/pugixml/docs/samples/transitions.xml trunk/OpenMPT/include/pugixml/docs/samples/tree.xml trunk/OpenMPT/include/pugixml/docs/samples/weekly-shift_jis.xml trunk/OpenMPT/include/pugixml/scripts/premake4.lua trunk/OpenMPT/include/unrar/OpenMPT.txt trunk/OpenMPT/include/unrar/acknow.txt trunk/OpenMPT/include/unrar/openmpt-callback.hpp trunk/OpenMPT/include/unrar/openmpt.hpp trunk/OpenMPT/include/zlib/contrib/masmx64/inffas8664.c trunk/OpenMPT/include/zlib/contrib/masmx64/readme.txt trunk/OpenMPT/include/zlib/contrib/masmx86/readme.txt trunk/OpenMPT/include/zlib/contrib/vstudio/readme.txt trunk/OpenMPT/installer/packageTemplate/readme.txt trunk/OpenMPT/libopenmpt/dox/changelog.md trunk/OpenMPT/libopenmpt/dox/dependencies.md trunk/OpenMPT/libopenmpt/dox/index.dox trunk/OpenMPT/libopenmpt/dox/quickstart.md trunk/OpenMPT/libopenmpt/dox/tests.md trunk/OpenMPT/libopenmpt/dox/todo.md trunk/OpenMPT/mptrack/AboutDialog.cpp trunk/OpenMPT/mptrack/AboutDialog.h trunk/OpenMPT/mptrack/AppendModule.cpp trunk/OpenMPT/mptrack/AutoSaver.cpp trunk/OpenMPT/mptrack/AutoSaver.h trunk/OpenMPT/mptrack/Autotune.cpp trunk/OpenMPT/mptrack/Autotune.h trunk/OpenMPT/mptrack/CImageListEx.cpp trunk/OpenMPT/mptrack/CImageListEx.h trunk/OpenMPT/mptrack/CTreeCtrl.h trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp trunk/OpenMPT/mptrack/ChannelManagerDlg.h trunk/OpenMPT/mptrack/CleanupSong.cpp trunk/OpenMPT/mptrack/CleanupSong.h trunk/OpenMPT/mptrack/CloseMainDialog.cpp trunk/OpenMPT/mptrack/CloseMainDialog.h trunk/OpenMPT/mptrack/ColourEdit.cpp trunk/OpenMPT/mptrack/ColourEdit.h trunk/OpenMPT/mptrack/EffectInfo.cpp trunk/OpenMPT/mptrack/EffectInfo.h trunk/OpenMPT/mptrack/ExceptionHandler.cpp trunk/OpenMPT/mptrack/ExceptionHandler.h trunk/OpenMPT/mptrack/FileDialog.cpp trunk/OpenMPT/mptrack/FileDialog.h trunk/OpenMPT/mptrack/MIDIMacroDialog.cpp trunk/OpenMPT/mptrack/MIDIMacroDialog.h trunk/OpenMPT/mptrack/MIDIMapping.cpp trunk/OpenMPT/mptrack/MIDIMapping.h trunk/OpenMPT/mptrack/MIDIMappingDialog.cpp trunk/OpenMPT/mptrack/MIDIMappingDialog.h trunk/OpenMPT/mptrack/MPTHacks.cpp trunk/OpenMPT/mptrack/MPTrackUtil.cpp trunk/OpenMPT/mptrack/MPTrackUtil.h trunk/OpenMPT/mptrack/MemoryMappedFile.cpp trunk/OpenMPT/mptrack/MemoryMappedFile.h trunk/OpenMPT/mptrack/ModConvert.cpp trunk/OpenMPT/mptrack/ModConvert.h trunk/OpenMPT/mptrack/MoveFXSlotDialog.cpp trunk/OpenMPT/mptrack/MoveFXSlotDialog.h trunk/OpenMPT/mptrack/Notification.h trunk/OpenMPT/mptrack/PNG.cpp trunk/OpenMPT/mptrack/PNG.h trunk/OpenMPT/mptrack/PatternClipboard.cpp trunk/OpenMPT/mptrack/PatternClipboard.h trunk/OpenMPT/mptrack/PatternCursor.h trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp trunk/OpenMPT/mptrack/PatternEditorDialogs.h trunk/OpenMPT/mptrack/PatternGotoDialog.cpp trunk/OpenMPT/mptrack/PatternGotoDialog.h trunk/OpenMPT/mptrack/SampleEditorDialogs.cpp trunk/OpenMPT/mptrack/SampleEditorDialogs.h trunk/OpenMPT/mptrack/SampleGenerator.cpp trunk/OpenMPT/mptrack/SampleGenerator.h trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.cpp trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.h trunk/OpenMPT/mptrack/SelectPluginDialog.cpp trunk/OpenMPT/mptrack/SelectPluginDialog.h trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/mptrack/TrackerSettings.h trunk/OpenMPT/mptrack/TuningDialog.cpp trunk/OpenMPT/mptrack/TuningDialog.h trunk/OpenMPT/mptrack/Undo.cpp trunk/OpenMPT/mptrack/Undo.h trunk/OpenMPT/mptrack/UpdateCheck.cpp trunk/OpenMPT/mptrack/UpdateCheck.h trunk/OpenMPT/mptrack/VstPresets.cpp trunk/OpenMPT/mptrack/VstPresets.h trunk/OpenMPT/mptrack/manual_generator/readme.txt trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/mptrack/res/originals/readme.txt trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp trunk/OpenMPT/mptrack/tuningRatioMapWnd.h trunk/OpenMPT/packageTemplate/History.txt trunk/OpenMPT/packageTemplate/SoundTouch/COPYING.TXT trunk/OpenMPT/packageTemplate/readme.txt trunk/OpenMPT/pluginBridge/AEffectWrapper.h trunk/OpenMPT/pluginBridge/Bridge.cpp trunk/OpenMPT/pluginBridge/Bridge.h trunk/OpenMPT/pluginBridge/BridgeCommon.h trunk/OpenMPT/pluginBridge/BridgeWrapper.cpp trunk/OpenMPT/pluginBridge/BridgeWrapper.h trunk/OpenMPT/soundlib/ChunkReader.h trunk/OpenMPT/soundlib/Endianness.h trunk/OpenMPT/soundlib/FileReader.h trunk/OpenMPT/soundlib/FloatMixer.h trunk/OpenMPT/soundlib/ITCompression.cpp trunk/OpenMPT/soundlib/ITCompression.h trunk/OpenMPT/soundlib/ITTools.cpp trunk/OpenMPT/soundlib/IntMixer.h trunk/OpenMPT/soundlib/Load_digi.cpp trunk/OpenMPT/soundlib/Load_gdm.cpp trunk/OpenMPT/soundlib/Load_imf.cpp trunk/OpenMPT/soundlib/Load_itp.cpp trunk/OpenMPT/soundlib/Load_mo3.cpp trunk/OpenMPT/soundlib/Loaders.h trunk/OpenMPT/soundlib/MIDIEvents.cpp trunk/OpenMPT/soundlib/MIDIEvents.h trunk/OpenMPT/soundlib/MIDIMacros.cpp trunk/OpenMPT/soundlib/MIDIMacros.h trunk/OpenMPT/soundlib/Message.cpp trunk/OpenMPT/soundlib/Message.h trunk/OpenMPT/soundlib/Mixer.h trunk/OpenMPT/soundlib/MixerInterface.h trunk/OpenMPT/soundlib/ModChannel.cpp trunk/OpenMPT/soundlib/ModChannel.h trunk/OpenMPT/soundlib/ModInstrument.cpp trunk/OpenMPT/soundlib/ModInstrument.h trunk/OpenMPT/soundlib/ModSample.cpp trunk/OpenMPT/soundlib/ModSample.h trunk/OpenMPT/soundlib/ModSequence.cpp trunk/OpenMPT/soundlib/ModSequence.h trunk/OpenMPT/soundlib/RowVisitor.cpp trunk/OpenMPT/soundlib/RowVisitor.h trunk/OpenMPT/soundlib/S3MTools.cpp trunk/OpenMPT/soundlib/S3MTools.h trunk/OpenMPT/soundlib/SampleFormatConverters.h trunk/OpenMPT/soundlib/SampleIO.cpp trunk/OpenMPT/soundlib/SampleIO.h trunk/OpenMPT/soundlib/Snd_defs.h trunk/OpenMPT/soundlib/SoundFilePlayConfig.cpp trunk/OpenMPT/soundlib/SoundFilePlayConfig.h trunk/OpenMPT/soundlib/WAVTools.cpp trunk/OpenMPT/soundlib/WAVTools.h trunk/OpenMPT/soundlib/Wav.h trunk/OpenMPT/soundlib/XMTools.cpp trunk/OpenMPT/soundlib/XMTools.h trunk/OpenMPT/soundlib/mod_specifications.cpp trunk/OpenMPT/soundlib/mod_specifications.h trunk/OpenMPT/soundlib/modcommand.cpp trunk/OpenMPT/soundlib/modcommand.h trunk/OpenMPT/soundlib/modsmp_ctrl.cpp trunk/OpenMPT/soundlib/modsmp_ctrl.h trunk/OpenMPT/soundlib/pattern.cpp trunk/OpenMPT/soundlib/pattern.h trunk/OpenMPT/soundlib/patternContainer.cpp trunk/OpenMPT/soundlib/patternContainer.h trunk/OpenMPT/soundlib/plugins/DmoToVst.cpp trunk/OpenMPT/soundlib/plugins/PlugInterface.h trunk/OpenMPT/soundlib/plugins/PluginEventQueue.h trunk/OpenMPT/soundlib/plugins/PluginManager.cpp trunk/OpenMPT/soundlib/plugins/PluginMixBuffer.h trunk/OpenMPT/soundlib/tuning.cpp trunk/OpenMPT/soundlib/tuning.h trunk/OpenMPT/soundlib/tuningCollection.cpp trunk/OpenMPT/soundlib/tuningbase.cpp trunk/OpenMPT/soundlib/tuningbase.h trunk/OpenMPT/soundlib/tuningcollection.h trunk/OpenMPT/test/test.cpp trunk/OpenMPT/test/test.h trunk/OpenMPT/unarchiver/ungzip.cpp trunk/OpenMPT/unarchiver/ungzip.h trunk/OpenMPT/unarchiver/unzip.cpp trunk/OpenMPT/unarchiver/unzip.h Property Changed: ---------------- trunk/OpenMPT/README.md trunk/OpenMPT/build/gen/UnRAR.vcxproj trunk/OpenMPT/build/gen/UnRAR.vcxproj.filters trunk/OpenMPT/build/gen/UnRAR.vcxproj.user trunk/OpenMPT/build/gen/flac.vcxproj trunk/OpenMPT/build/gen/flac.vcxproj.filters trunk/OpenMPT/build/gen/flac.vcxproj.user trunk/OpenMPT/build/gen/lhasa.vcxproj trunk/OpenMPT/build/gen/lhasa.vcxproj.filters trunk/OpenMPT/build/gen/lhasa.vcxproj.user trunk/OpenMPT/build/gen/miniz.vcxproj trunk/OpenMPT/build/gen/miniz.vcxproj.filters trunk/OpenMPT/build/gen/miniz.vcxproj.user trunk/OpenMPT/build/gen/minizip.vcxproj trunk/OpenMPT/build/gen/minizip.vcxproj.filters trunk/OpenMPT/build/gen/minizip.vcxproj.user trunk/OpenMPT/build/gen/portaudio.vcxproj trunk/OpenMPT/build/gen/portaudio.vcxproj.filters trunk/OpenMPT/build/gen/portaudio.vcxproj.user trunk/OpenMPT/build/gen/portmidi.vcxproj trunk/OpenMPT/build/gen/portmidi.vcxproj.filters trunk/OpenMPT/build/gen/portmidi.vcxproj.user trunk/OpenMPT/build/gen/smbPitchShift.vcxproj trunk/OpenMPT/build/gen/smbPitchShift.vcxproj.filters trunk/OpenMPT/build/gen/smbPitchShift.vcxproj.user trunk/OpenMPT/build/gen/soundtouch.vcxproj trunk/OpenMPT/build/gen/soundtouch.vcxproj.filters trunk/OpenMPT/build/gen/soundtouch.vcxproj.user trunk/OpenMPT/build/gen/zlib.vcxproj trunk/OpenMPT/build/gen/zlib.vcxproj.filters trunk/OpenMPT/build/gen/zlib.vcxproj.user trunk/OpenMPT/build/make/Makefile.config.emscripten trunk/OpenMPT/build/make/test-pre.js trunk/OpenMPT/build/premake4-defaults-DLL.lua trunk/OpenMPT/build/premake4-defaults-EXE.lua trunk/OpenMPT/build/premake4-defaults-LIB.lua trunk/OpenMPT/build/premake4-defaults-shared.lua trunk/OpenMPT/build/premake4-defaults-static.lua trunk/OpenMPT/build/premake4.lua trunk/OpenMPT/common/FlagSet.h trunk/OpenMPT/common/StringFixer.h trunk/OpenMPT/common/misc_util.cpp trunk/OpenMPT/common/misc_util.h trunk/OpenMPT/common/serialization_utils.cpp trunk/OpenMPT/common/serialization_utils.h trunk/OpenMPT/common/stdafx.cpp trunk/OpenMPT/common/stdafx.h trunk/OpenMPT/common/thread.h trunk/OpenMPT/common/typedefs.h trunk/OpenMPT/common/version.h trunk/OpenMPT/include/bladeenc/bladedll.h trunk/OpenMPT/include/flac/OpenMPT.txt 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/alloc.h 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/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/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/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 trunk/OpenMPT/include/foobar2000sdk/foobar2000/ATLHelpers/foobar2000_ATL_helpers.vcxproj trunk/OpenMPT/include/foobar2000sdk/foobar2000/ATLHelpers/foobar2000_ATL_helpers.vcxproj.filters trunk/OpenMPT/include/foobar2000sdk/foobar2000/SDK/foobar2000_SDK.vcxproj trunk/OpenMPT/include/foobar2000sdk/foobar2000/SDK/foobar2000_SDK.vcxproj.filters trunk/OpenMPT/include/foobar2000sdk/foobar2000/foo_sample/foo_sample.vcxproj trunk/OpenMPT/include/foobar2000sdk/foobar2000/foo_sample/foo_sample.vcxproj.filters trunk/OpenMPT/include/foobar2000sdk/foobar2000/foobar2000_component_client/foobar2000_component_client.vcxproj trunk/OpenMPT/include/foobar2000sdk/foobar2000/helpers/foobar2000_sdk_helpers.vcxproj trunk/OpenMPT/include/foobar2000sdk/foobar2000/helpers/foobar2000_sdk_helpers.vcxproj.filters trunk/OpenMPT/include/foobar2000sdk/pfc/pfc.vcxproj trunk/OpenMPT/include/portaudio/bindings/java/c/build/vs2010/PortAudioJNI/PortAudioJNI.vcxproj trunk/OpenMPT/include/portaudio/bindings/java/jportaudio.dox trunk/OpenMPT/include/portaudio/doc/src/api_overview.dox trunk/OpenMPT/include/portaudio/doc/src/license.dox trunk/OpenMPT/include/portaudio/doc/src/mainpage.dox trunk/OpenMPT/include/portaudio/doc/src/srcguide.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/blocking_read_write.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/compile_cmake.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/compile_linux.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/compile_mac_coreaudio.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/compile_windows.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/compile_windows_asio_msvc.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/compile_windows_mingw.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/exploring.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/initializing_portaudio.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/open_default_stream.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/querying_devices.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/start_stop_abort.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/terminating_portaudio.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/tutorial_start.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/utility_functions.dox trunk/OpenMPT/include/portaudio/doc/src/tutorial/writing_a_callback.dox trunk/OpenMPT/include/portmidi/pm_mac/pmdefaults/make/build.xml trunk/OpenMPT/include/premake4.lua trunk/OpenMPT/include/pugixml/docs/samples/character.xml trunk/OpenMPT/include/pugixml/docs/samples/transitions.xml trunk/OpenMPT/include/pugixml/docs/samples/tree.xml trunk/OpenMPT/include/pugixml/docs/samples/weekly-shift_jis.xml trunk/OpenMPT/include/pugixml/docs/samples/weekly-utf-16.xml trunk/OpenMPT/include/pugixml/docs/samples/weekly-utf-8.xml trunk/OpenMPT/include/pugixml/docs/samples/xgconsole.xml trunk/OpenMPT/include/pugixml/scripts/premake4.lua trunk/OpenMPT/include/pugixml/scripts/pugixml_vs2010.vcxproj trunk/OpenMPT/include/pugixml/scripts/pugixml_vs2010_static.vcxproj trunk/OpenMPT/include/smbPitchShift/smbPitchShift.cpp trunk/OpenMPT/include/smbPitchShift/smbPitchShift.h trunk/OpenMPT/include/soundtouch/COPYING.TXT trunk/OpenMPT/include/soundtouch/OpenMPT.txt trunk/OpenMPT/include/soundtouch/README.html trunk/OpenMPT/include/unrar/OpenMPT.txt trunk/OpenMPT/include/unrar/acknow.txt trunk/OpenMPT/include/unrar/arccmt.cpp trunk/OpenMPT/include/unrar/archive.cpp trunk/OpenMPT/include/unrar/archive.hpp trunk/OpenMPT/include/unrar/arcread.cpp trunk/OpenMPT/include/unrar/array.hpp trunk/OpenMPT/include/unrar/blake2s.cpp trunk/OpenMPT/include/unrar/blake2s.hpp trunk/OpenMPT/include/unrar/blake2s_sse.cpp trunk/OpenMPT/include/unrar/blake2sp.cpp trunk/OpenMPT/include/unrar/cmddata.cpp trunk/OpenMPT/include/unrar/cmddata.hpp trunk/OpenMPT/include/unrar/coder.cpp trunk/OpenMPT/include/unrar/coder.hpp trunk/OpenMPT/include/unrar/compress.hpp trunk/OpenMPT/include/unrar/consio.cpp trunk/OpenMPT/include/unrar/consio.hpp trunk/OpenMPT/include/unrar/crc.cpp trunk/OpenMPT/include/unrar/crc.hpp trunk/OpenMPT/include/unrar/crypt.cpp trunk/OpenMPT/include/unrar/crypt.hpp trunk/OpenMPT/include/unrar/crypt1.cpp trunk/OpenMPT/include/unrar/crypt2.cpp trunk/OpenMPT/include/unrar/crypt3.cpp trunk/OpenMPT/include/unrar/crypt5.cpp trunk/OpenMPT/include/unrar/dll.cpp trunk/OpenMPT/include/unrar/dll.hpp trunk/OpenMPT/include/unrar/encname.cpp trunk/OpenMPT/include/unrar/encname.hpp trunk/OpenMPT/include/unrar/errhnd.cpp trunk/OpenMPT/include/unrar/errhnd.hpp trunk/OpenMPT/include/unrar/extinfo.cpp trunk/OpenMPT/include/unrar/extinfo.hpp trunk/OpenMPT/include/unrar/extract.cpp trunk/OpenMPT/include/unrar/extract.hpp trunk/OpenMPT/include/unrar/filcreat.cpp trunk/OpenMPT/include/unrar/filcreat.hpp trunk/OpenMPT/include/unrar/file.cpp trunk/OpenMPT/include/unrar/file.hpp trunk/OpenMPT/include/unrar/filefn.cpp trunk/OpenMPT/include/unrar/filefn.hpp trunk/OpenMPT/include/unrar/filestr.cpp trunk/OpenMPT/include/unrar/filestr.hpp trunk/OpenMPT/include/unrar/find.cpp trunk/OpenMPT/include/unrar/find.hpp trunk/OpenMPT/include/unrar/getbits.cpp trunk/OpenMPT/include/unrar/getbits.hpp trunk/OpenMPT/include/unrar/global.cpp trunk/OpenMPT/include/unrar/global.hpp trunk/OpenMPT/include/unrar/hardlinks.cpp trunk/OpenMPT/include/unrar/hash.cpp trunk/OpenMPT/include/unrar/hash.hpp trunk/OpenMPT/include/unrar/headers.cpp trunk/OpenMPT/include/unrar/headers.hpp trunk/OpenMPT/include/unrar/headers5.hpp trunk/OpenMPT/include/unrar/isnt.cpp trunk/OpenMPT/include/unrar/isnt.hpp trunk/OpenMPT/include/unrar/license.txt trunk/OpenMPT/include/unrar/list.cpp trunk/OpenMPT/include/unrar/list.hpp trunk/OpenMPT/include/unrar/loclang.hpp trunk/OpenMPT/include/unrar/log.cpp trunk/OpenMPT/include/unrar/log.hpp trunk/OpenMPT/include/unrar/match.cpp trunk/OpenMPT/include/unrar/match.hpp trunk/OpenMPT/include/unrar/model.cpp trunk/OpenMPT/include/unrar/model.hpp trunk/OpenMPT/include/unrar/openmpt-callback.hpp trunk/OpenMPT/include/unrar/openmpt.hpp trunk/OpenMPT/include/unrar/options.cpp trunk/OpenMPT/include/unrar/options.hpp trunk/OpenMPT/include/unrar/os.hpp trunk/OpenMPT/include/unrar/pathfn.cpp trunk/OpenMPT/include/unrar/pathfn.hpp trunk/OpenMPT/include/unrar/qopen.cpp trunk/OpenMPT/include/unrar/qopen.hpp trunk/OpenMPT/include/unrar/rar.cpp trunk/OpenMPT/include/unrar/rar.hpp trunk/OpenMPT/include/unrar/rardefs.hpp trunk/OpenMPT/include/unrar/rarlang.hpp trunk/OpenMPT/include/unrar/raros.hpp trunk/OpenMPT/include/unrar/rarpch.cpp trunk/OpenMPT/include/unrar/rartypes.hpp trunk/OpenMPT/include/unrar/rarvm.cpp trunk/OpenMPT/include/unrar/rarvm.hpp trunk/OpenMPT/include/unrar/rarvmtbl.cpp trunk/OpenMPT/include/unrar/rawread.cpp trunk/OpenMPT/include/unrar/rawread.hpp trunk/OpenMPT/include/unrar/rdwrfn.cpp trunk/OpenMPT/include/unrar/rdwrfn.hpp trunk/OpenMPT/include/unrar/readme.txt trunk/OpenMPT/include/unrar/recvol.cpp trunk/OpenMPT/include/unrar/recvol.hpp trunk/OpenMPT/include/unrar/recvol3.cpp trunk/OpenMPT/include/unrar/recvol5.cpp trunk/OpenMPT/include/unrar/resource.cpp trunk/OpenMPT/include/unrar/resource.hpp trunk/OpenMPT/include/unrar/rijndael.cpp trunk/OpenMPT/include/unrar/rijndael.hpp trunk/OpenMPT/include/unrar/rs.cpp trunk/OpenMPT/include/unrar/rs.hpp trunk/OpenMPT/include/unrar/rs16.cpp trunk/OpenMPT/include/unrar/rs16.hpp trunk/OpenMPT/include/unrar/savepos.hpp trunk/OpenMPT/include/unrar/scantree.cpp trunk/OpenMPT/include/unrar/scantree.hpp trunk/OpenMPT/include/unrar/secpassword.cpp trunk/OpenMPT/include/unrar/secpassword.hpp trunk/OpenMPT/include/unrar/sha1.cpp trunk/OpenMPT/include/unrar/sha1.hpp trunk/OpenMPT/include/unrar/sha256.cpp trunk/OpenMPT/include/unrar/sha256.hpp trunk/OpenMPT/include/unrar/smallfn.cpp trunk/OpenMPT/include/unrar/smallfn.hpp trunk/OpenMPT/include/unrar/strfn.cpp trunk/OpenMPT/include/unrar/strfn.hpp trunk/OpenMPT/include/unrar/strlist.cpp trunk/OpenMPT/include/unrar/strlist.hpp trunk/OpenMPT/include/unrar/suballoc.cpp trunk/OpenMPT/include/unrar/suballoc.hpp trunk/OpenMPT/include/unrar/system.cpp trunk/OpenMPT/include/unrar/system.hpp trunk/OpenMPT/include/unrar/threadmisc.cpp trunk/OpenMPT/include/unrar/threadpool.cpp trunk/OpenMPT/include/unrar/threadpool.hpp trunk/OpenMPT/include/unrar/timefn.cpp trunk/OpenMPT/include/unrar/timefn.hpp trunk/OpenMPT/include/unrar/ulinks.cpp trunk/OpenMPT/include/unrar/ulinks.hpp trunk/OpenMPT/include/unrar/unicode.cpp trunk/OpenMPT/include/unrar/unicode.hpp trunk/OpenMPT/include/unrar/unpack.cpp trunk/OpenMPT/include/unrar/unpack.hpp trunk/OpenMPT/include/unrar/unpack15.cpp trunk/OpenMPT/include/unrar/unpack20.cpp trunk/OpenMPT/include/unrar/unpack30.cpp trunk/OpenMPT/include/unrar/unpack50.cpp trunk/OpenMPT/include/unrar/unpack50frag.cpp trunk/OpenMPT/include/unrar/unpack50mt.cpp trunk/OpenMPT/include/unrar/unpackinline.cpp trunk/OpenMPT/include/unrar/uowners.cpp trunk/OpenMPT/include/unrar/version.hpp trunk/OpenMPT/include/unrar/volume.cpp trunk/OpenMPT/include/unrar/volume.hpp trunk/OpenMPT/include/unrar/win32acl.cpp trunk/OpenMPT/include/unrar/win32lnk.cpp trunk/OpenMPT/include/unrar/win32stm.cpp trunk/OpenMPT/include/zlib/adler32.c trunk/OpenMPT/include/zlib/compress.c trunk/OpenMPT/include/zlib/contrib/masmx64/bld_ml64.bat trunk/OpenMPT/include/zlib/contrib/masmx64/inffas8664.c trunk/OpenMPT/include/zlib/contrib/masmx64/readme.txt trunk/OpenMPT/include/zlib/contrib/masmx86/bld_ml32.bat trunk/OpenMPT/include/zlib/contrib/masmx86/readme.txt trunk/OpenMPT/include/zlib/contrib/minizip/MiniZip64_Changes.txt trunk/OpenMPT/include/zlib/contrib/minizip/MiniZip64_info.txt trunk/OpenMPT/include/zlib/contrib/minizip/crypt.h trunk/OpenMPT/include/zlib/contrib/minizip/ioapi.c trunk/OpenMPT/include/zlib/contrib/minizip/ioapi.h trunk/OpenMPT/include/zlib/contrib/minizip/iowin32.c trunk/OpenMPT/include/zlib/contrib/minizip/iowin32.h trunk/OpenMPT/include/zlib/contrib/minizip/miniunz.c trunk/OpenMPT/include/zlib/contrib/minizip/minizip.c trunk/OpenMPT/include/zlib/contrib/minizip/mztools.c trunk/OpenMPT/include/zlib/contrib/minizip/mztools.h trunk/OpenMPT/include/zlib/contrib/minizip/unzip.c trunk/OpenMPT/include/zlib/contrib/minizip/unzip.h trunk/OpenMPT/include/zlib/contrib/minizip/zip.c trunk/OpenMPT/include/zlib/contrib/minizip/zip.h trunk/OpenMPT/include/zlib/contrib/vstudio/readme.txt trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/miniunz.vcxproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/miniunz.vcxproj.filters trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/miniunz.vcxproj.user trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/minizip.vcxproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/minizip.vcxproj.filters trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/minizip.vcxproj.user trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/testzlib.vcxproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/testzlib.vcxproj.filters trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/testzlib.vcxproj.user trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.filters trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/testzlibdll.vcxproj.user trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/zlib.rc trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/zlibstat.vcxproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.filters trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/zlibstat.vcxproj.user trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/zlibvc.sln trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/zlibvc.vcxproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.filters trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/zlibvc.vcxproj.user trunk/OpenMPT/include/zlib/contrib/vstudio/vc11/miniunz.vcxproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc11/minizip.vcxproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc11/testzlib.vcxproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc11/testzlibdll.vcxproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc11/zlib.rc trunk/OpenMPT/include/zlib/contrib/vstudio/vc11/zlibstat.vcxproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc11/zlibvc.sln trunk/OpenMPT/include/zlib/contrib/vstudio/vc11/zlibvc.vcxproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc9/miniunz.vcproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc9/minizip.vcproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc9/testzlib.vcproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc9/testzlibdll.vcproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc9/zlib.rc trunk/OpenMPT/include/zlib/contrib/vstudio/vc9/zlibstat.vcproj trunk/OpenMPT/include/zlib/contrib/vstudio/vc9/zlibvc.sln trunk/OpenMPT/include/zlib/contrib/vstudio/vc9/zlibvc.vcproj trunk/OpenMPT/include/zlib/crc32.c trunk/OpenMPT/include/zlib/crc32.h trunk/OpenMPT/include/zlib/deflate.c trunk/OpenMPT/include/zlib/deflate.h trunk/OpenMPT/include/zlib/gzclose.c trunk/OpenMPT/include/zlib/gzguts.h trunk/OpenMPT/include/zlib/gzlib.c trunk/OpenMPT/include/zlib/gzread.c trunk/OpenMPT/include/zlib/gzwrite.c trunk/OpenMPT/include/zlib/infback.c trunk/OpenMPT/include/zlib/inffast.c trunk/OpenMPT/include/zlib/inffast.h trunk/OpenMPT/include/zlib/inffixed.h trunk/OpenMPT/include/zlib/inflate.c trunk/OpenMPT/include/zlib/inflate.h trunk/OpenMPT/include/zlib/inftrees.c trunk/OpenMPT/include/zlib/inftrees.h trunk/OpenMPT/include/zlib/trees.c trunk/OpenMPT/include/zlib/trees.h trunk/OpenMPT/include/zlib/uncompr.c trunk/OpenMPT/include/zlib/zconf.h trunk/OpenMPT/include/zlib/zlib.h trunk/OpenMPT/include/zlib/zutil.c trunk/OpenMPT/include/zlib/zutil.h trunk/OpenMPT/installer/install-big.bmp trunk/OpenMPT/installer/install-small.bmp trunk/OpenMPT/installer/packageTemplate/readme.txt trunk/OpenMPT/libopenmpt/dox/changelog.md trunk/OpenMPT/libopenmpt/dox/dependencies.md trunk/OpenMPT/libopenmpt/dox/index.dox trunk/OpenMPT/libopenmpt/dox/quickstart.md trunk/OpenMPT/libopenmpt/dox/tests.md trunk/OpenMPT/libopenmpt/dox/todo.md trunk/OpenMPT/libopenmpt/foo_openmpt.vcxproj trunk/OpenMPT/libopenmpt/foo_openmpt.vcxproj.filters trunk/OpenMPT/libopenmpt/in_openmpt.vcxproj trunk/OpenMPT/libopenmpt/in_openmpt.vcxproj.filters trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj.filters trunk/OpenMPT/libopenmpt/libopenmpt_modplug.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt_modplug.vcxproj.filters trunk/OpenMPT/libopenmpt/libopenmpt_settings.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt_settings.vcxproj.filters trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj.filters trunk/OpenMPT/libopenmpt/xmp-openmpt.vcxproj trunk/OpenMPT/libopenmpt/xmp-openmpt.vcxproj.filters trunk/OpenMPT/mptrack/AboutDialog.cpp trunk/OpenMPT/mptrack/AboutDialog.h trunk/OpenMPT/mptrack/AbstractVstEditor.cpp trunk/OpenMPT/mptrack/AbstractVstEditor.h trunk/OpenMPT/mptrack/AppendModule.cpp trunk/OpenMPT/mptrack/AutoSaver.cpp trunk/OpenMPT/mptrack/AutoSaver.h trunk/OpenMPT/mptrack/Autotune.cpp trunk/OpenMPT/mptrack/Autotune.h trunk/OpenMPT/mptrack/CImageListEx.cpp trunk/OpenMPT/mptrack/CImageListEx.h trunk/OpenMPT/mptrack/CTreeCtrl.h trunk/OpenMPT/mptrack/ChannelManagerDlg.cpp trunk/OpenMPT/mptrack/ChannelManagerDlg.h trunk/OpenMPT/mptrack/Childfrm.cpp trunk/OpenMPT/mptrack/Childfrm.h trunk/OpenMPT/mptrack/CleanupSong.cpp trunk/OpenMPT/mptrack/CleanupSong.h trunk/OpenMPT/mptrack/CloseMainDialog.cpp trunk/OpenMPT/mptrack/CloseMainDialog.h trunk/OpenMPT/mptrack/ColourEdit.cpp trunk/OpenMPT/mptrack/ColourEdit.h trunk/OpenMPT/mptrack/CommandSet.cpp trunk/OpenMPT/mptrack/CommandSet.h trunk/OpenMPT/mptrack/CreditStatic.cpp trunk/OpenMPT/mptrack/CreditStatic.h trunk/OpenMPT/mptrack/Ctrl_com.cpp trunk/OpenMPT/mptrack/Ctrl_com.h trunk/OpenMPT/mptrack/Ctrl_gen.cpp trunk/OpenMPT/mptrack/Ctrl_gen.h trunk/OpenMPT/mptrack/Ctrl_ins.cpp trunk/OpenMPT/mptrack/Ctrl_ins.h trunk/OpenMPT/mptrack/Ctrl_pat.cpp trunk/OpenMPT/mptrack/Ctrl_pat.h trunk/OpenMPT/mptrack/Ctrl_seq.cpp trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/mptrack/Ctrl_smp.h trunk/OpenMPT/mptrack/DefaultVstEditor.cpp trunk/OpenMPT/mptrack/DefaultVstEditor.h trunk/OpenMPT/mptrack/Draw_pat.cpp trunk/OpenMPT/mptrack/EffectInfo.cpp trunk/OpenMPT/mptrack/EffectInfo.h trunk/OpenMPT/mptrack/EffectVis.cpp trunk/OpenMPT/mptrack/EffectVis.h trunk/OpenMPT/mptrack/ExceptionHandler.cpp trunk/OpenMPT/mptrack/ExceptionHandler.h trunk/OpenMPT/mptrack/FileDialog.cpp trunk/OpenMPT/mptrack/FileDialog.h trunk/OpenMPT/mptrack/Globals.cpp trunk/OpenMPT/mptrack/Globals.h trunk/OpenMPT/mptrack/InputHandler.cpp trunk/OpenMPT/mptrack/InputHandler.h trunk/OpenMPT/mptrack/KeyConfigDlg.cpp trunk/OpenMPT/mptrack/KeyConfigDlg.h trunk/OpenMPT/mptrack/MIDIMacroDialog.cpp trunk/OpenMPT/mptrack/MIDIMacroDialog.h trunk/OpenMPT/mptrack/MIDIMapping.cpp trunk/OpenMPT/mptrack/MIDIMapping.h trunk/OpenMPT/mptrack/MIDIMappingDialog.cpp trunk/OpenMPT/mptrack/MIDIMappingDialog.h trunk/OpenMPT/mptrack/MPTHacks.cpp trunk/OpenMPT/mptrack/MPTRACK_08.sln trunk/OpenMPT/mptrack/MPTRACK_10.sln trunk/OpenMPT/mptrack/MPTrackUtil.cpp trunk/OpenMPT/mptrack/MPTrackUtil.h trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mainbar.cpp trunk/OpenMPT/mptrack/Mainbar.h trunk/OpenMPT/mptrack/Mainfrm.h trunk/OpenMPT/mptrack/MemoryMappedFile.cpp trunk/OpenMPT/mptrack/MemoryMappedFile.h trunk/OpenMPT/mptrack/Mod2wave.cpp trunk/OpenMPT/mptrack/ModConvert.cpp trunk/OpenMPT/mptrack/ModConvert.h trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/Moddoc.h trunk/OpenMPT/mptrack/Modedit.cpp trunk/OpenMPT/mptrack/Moptions.cpp trunk/OpenMPT/mptrack/Moptions.h trunk/OpenMPT/mptrack/MoveFXSlotDialog.cpp trunk/OpenMPT/mptrack/MoveFXSlotDialog.h trunk/OpenMPT/mptrack/Mpdlgs.cpp trunk/OpenMPT/mptrack/Mpdlgs.h trunk/OpenMPT/mptrack/Mpt_midi.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/Mptrack.h trunk/OpenMPT/mptrack/Notification.h trunk/OpenMPT/mptrack/PNG.cpp trunk/OpenMPT/mptrack/PNG.h trunk/OpenMPT/mptrack/PSRatioCalc.cpp trunk/OpenMPT/mptrack/PSRatioCalc.h trunk/OpenMPT/mptrack/PatternClipboard.cpp trunk/OpenMPT/mptrack/PatternClipboard.h trunk/OpenMPT/mptrack/PatternCursor.h trunk/OpenMPT/mptrack/PatternEditorDialogs.cpp trunk/OpenMPT/mptrack/PatternEditorDialogs.h trunk/OpenMPT/mptrack/PatternGotoDialog.cpp trunk/OpenMPT/mptrack/PatternGotoDialog.h trunk/OpenMPT/mptrack/SampleEditorDialogs.cpp trunk/OpenMPT/mptrack/SampleEditorDialogs.h trunk/OpenMPT/mptrack/SampleGenerator.cpp trunk/OpenMPT/mptrack/SampleGenerator.h trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.cpp trunk/OpenMPT/mptrack/ScaleEnvPointsDlg.h trunk/OpenMPT/mptrack/SelectPluginDialog.cpp trunk/OpenMPT/mptrack/SelectPluginDialog.h trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/mptrack/TrackerSettings.h trunk/OpenMPT/mptrack/TuningDialog.cpp trunk/OpenMPT/mptrack/TuningDialog.h trunk/OpenMPT/mptrack/Undo.cpp trunk/OpenMPT/mptrack/Undo.h trunk/OpenMPT/mptrack/UpdateCheck.cpp trunk/OpenMPT/mptrack/UpdateCheck.h trunk/OpenMPT/mptrack/VSTEditor.cpp trunk/OpenMPT/mptrack/VSTEditor.h trunk/OpenMPT/mptrack/View_gen.cpp trunk/OpenMPT/mptrack/View_gen.h trunk/OpenMPT/mptrack/View_ins.cpp trunk/OpenMPT/mptrack/View_ins.h trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/View_pat.h trunk/OpenMPT/mptrack/View_smp.cpp trunk/OpenMPT/mptrack/View_smp.h trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/mptrack/View_tre.h trunk/OpenMPT/mptrack/VstPresets.cpp trunk/OpenMPT/mptrack/VstPresets.h trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/mptrack/Vstplug.h trunk/OpenMPT/mptrack/dlg_misc.cpp trunk/OpenMPT/mptrack/dlg_misc.h trunk/OpenMPT/mptrack/manual_generator/readme.txt trunk/OpenMPT/mptrack/manual_generator/run.cmd trunk/OpenMPT/mptrack/manual_generator/run.sh trunk/OpenMPT/mptrack/manual_generator/source/bullet.png trunk/OpenMPT/mptrack/manual_generator/source/external.png trunk/OpenMPT/mptrack/manual_generator/source/help.css trunk/OpenMPT/mptrack/manual_generator/wiki.py trunk/OpenMPT/mptrack/mod2midi.cpp trunk/OpenMPT/mptrack/mod2midi.h trunk/OpenMPT/mptrack/mod2wave.h trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/mptrack/mptrack_08.vcproj trunk/OpenMPT/mptrack/mptrack_10.vcxproj trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters trunk/OpenMPT/mptrack/res/COLORS.BMP trunk/OpenMPT/mptrack/res/MPTRACK.ICO trunk/OpenMPT/mptrack/res/bitmap1.bmp trunk/OpenMPT/mptrack/res/envelope_toolbar.png trunk/OpenMPT/mptrack/res/icons.png trunk/OpenMPT/mptrack/res/main_toolbar.png trunk/OpenMPT/mptrack/res/moddoc.ico trunk/OpenMPT/mptrack/res/mptrack.png trunk/OpenMPT/mptrack/res/originals/readme.txt trunk/OpenMPT/mptrack/res/pattern_toolbar.png trunk/OpenMPT/mptrack/res/sample_toolbar.png trunk/OpenMPT/mptrack/res/splashno.png trunk/OpenMPT/mptrack/res/view_pat.bmp trunk/OpenMPT/mptrack/res/vispcnode.bmp trunk/OpenMPT/mptrack/res/vumeters.bmp trunk/OpenMPT/mptrack/resource.h trunk/OpenMPT/mptrack/tuningRatioMapWnd.cpp trunk/OpenMPT/mptrack/tuningRatioMapWnd.h trunk/OpenMPT/mptrack/view_com.cpp trunk/OpenMPT/mptrack/view_com.h trunk/OpenMPT/openmpt123/openmpt123.vcxproj trunk/OpenMPT/openmpt123/openmpt123.vcxproj.filters trunk/OpenMPT/packageTemplate/History.txt trunk/OpenMPT/packageTemplate/OMPT_1.17RC1_ReleaseNotes.html trunk/OpenMPT/packageTemplate/OMPT_1.17RC2_ReleaseNotes.html trunk/OpenMPT/packageTemplate/OMPT_1.18_ReleaseNotes.html trunk/OpenMPT/packageTemplate/OMPT_1.19_ReleaseNotes.html trunk/OpenMPT/packageTemplate/OMPT_1.20_ReleaseNotes.html trunk/OpenMPT/packageTemplate/OMPT_1.21_ReleaseNotes.html trunk/OpenMPT/packageTemplate/OMPT_1.22_ReleaseNotes.html trunk/OpenMPT/packageTemplate/OMPT_1.23_ReleaseNotes.html trunk/OpenMPT/packageTemplate/ReleaseNotesImages/1.18/cleanup.png trunk/OpenMPT/packageTemplate/ReleaseNotesImages/1.18/orderlist.png trunk/OpenMPT/packageTemplate/ReleaseNotesImages/1.18/treeview.png trunk/OpenMPT/packageTemplate/ReleaseNotesImages/1.19/edithistory.png trunk/OpenMPT/packageTemplate/ReleaseNotesImages/1.19/timesignature.png trunk/OpenMPT/packageTemplate/ReleaseNotesImages/1.20/instrument_settings.png trunk/OpenMPT/packageTemplate/ReleaseNotesImages/1.20/modified_files.png trunk/OpenMPT/packageTemplate/ReleaseNotesImages/1.20/quick_channel_settings.png trunk/OpenMPT/packageTemplate/ReleaseNotesImages/1.21/treeview.png trunk/OpenMPT/packageTemplate/ReleaseNotesImages/1.22/clipboardmanager.png trunk/OpenMPT/packageTemplate/ReleaseNotesImages/1.22/soundsettings.png trunk/OpenMPT/packageTemplate/ReleaseNotesImages/1.23/noteproperties.png trunk/OpenMPT/packageTemplate/ReleaseNotesImages/general/modplug.png trunk/OpenMPT/packageTemplate/SoundTouch/COPYING.TXT trunk/OpenMPT/packageTemplate/SoundTouch/README.html trunk/OpenMPT/packageTemplate/mpt.ico trunk/OpenMPT/packageTemplate/open_settings_folder.bat trunk/OpenMPT/packageTemplate/readme.txt trunk/OpenMPT/pluginBridge/AEffectWrapper.h trunk/OpenMPT/pluginBridge/Bridge.cpp trunk/OpenMPT/pluginBridge/Bridge.h trunk/OpenMPT/pluginBridge/BridgeCommon.h trunk/OpenMPT/pluginBridge/BridgeWrapper.cpp trunk/OpenMPT/pluginBridge/BridgeWrapper.h trunk/OpenMPT/pluginBridge/PluginBridge.rc trunk/OpenMPT/pluginBridge/PluginBridge.vcxproj trunk/OpenMPT/pluginBridge/PluginBridge.vcxproj.filters trunk/OpenMPT/plugins/MidiInOut/MidiInOut.cpp trunk/OpenMPT/plugins/MidiInOut/MidiInOut.h trunk/OpenMPT/plugins/MidiInOut/MidiInOut.vcxproj trunk/OpenMPT/plugins/MidiInOut/MidiInOut.vcxproj.filters trunk/OpenMPT/plugins/MidiInOut/MidiInOutEditor.cpp trunk/OpenMPT/plugins/MidiInOut/MidiInOutEditor.h trunk/OpenMPT/plugins/common/Button.h trunk/OpenMPT/plugins/common/CheckBox.h trunk/OpenMPT/plugins/common/ComboBox.h trunk/OpenMPT/plugins/common/EditBox.h trunk/OpenMPT/plugins/common/Label.h trunk/OpenMPT/plugins/common/Window.h trunk/OpenMPT/plugins/common/WindowBase.h trunk/OpenMPT/sounddev/SoundDevice.cpp trunk/OpenMPT/sounddev/SoundDevice.h trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp trunk/OpenMPT/sounddev/SoundDeviceASIO.h trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp trunk/OpenMPT/sounddev/SoundDeviceDirectSound.h trunk/OpenMPT/sounddev/SoundDevicePortAudio.cpp trunk/OpenMPT/sounddev/SoundDevicePortAudio.h trunk/OpenMPT/sounddev/SoundDeviceThread.cpp trunk/OpenMPT/sounddev/SoundDeviceThread.h trunk/OpenMPT/sounddev/SoundDeviceWaveout.cpp trunk/OpenMPT/sounddev/SoundDeviceWaveout.h trunk/OpenMPT/sounddsp/DSP.cpp trunk/OpenMPT/sounddsp/EQ.cpp trunk/OpenMPT/sounddsp/Reverb.cpp trunk/OpenMPT/sounddsp/Reverb.h trunk/OpenMPT/soundlib/ChunkReader.h trunk/OpenMPT/soundlib/Dlsbank.cpp trunk/OpenMPT/soundlib/Dlsbank.h trunk/OpenMPT/soundlib/Endianness.h trunk/OpenMPT/soundlib/Fastmix.cpp trunk/OpenMPT/soundlib/FileReader.h trunk/OpenMPT/soundlib/FloatMixer.h trunk/OpenMPT/soundlib/ITCompression.cpp trunk/OpenMPT/soundlib/ITCompression.h trunk/OpenMPT/soundlib/ITTools.cpp trunk/OpenMPT/soundlib/ITTools.h trunk/OpenMPT/soundlib/IntMixer.h trunk/OpenMPT/soundlib/Load_669.cpp trunk/OpenMPT/soundlib/Load_amf.cpp trunk/OpenMPT/soundlib/Load_ams.cpp trunk/OpenMPT/soundlib/Load_dbm.cpp trunk/OpenMPT/soundlib/Load_digi.cpp trunk/OpenMPT/soundlib/Load_dmf.cpp trunk/OpenMPT/soundlib/Load_dsm.cpp trunk/OpenMPT/soundlib/Load_far.cpp trunk/OpenMPT/soundlib/Load_gdm.cpp trunk/OpenMPT/soundlib/Load_imf.cpp trunk/OpenMPT/soundlib/Load_it.cpp trunk/OpenMPT/soundlib/Load_itp.cpp trunk/OpenMPT/soundlib/Load_mdl.cpp trunk/OpenMPT/soundlib/Load_med.cpp trunk/OpenMPT/soundlib/Load_mid.cpp trunk/OpenMPT/soundlib/Load_mo3.cpp trunk/OpenMPT/soundlib/Load_mod.cpp trunk/OpenMPT/soundlib/Load_mt2.cpp trunk/OpenMPT/soundlib/Load_mtm.cpp trunk/OpenMPT/soundlib/Load_okt.cpp trunk/OpenMPT/soundlib/Load_psm.cpp trunk/OpenMPT/soundlib/Load_ptm.cpp trunk/OpenMPT/soundlib/Load_s3m.cpp trunk/OpenMPT/soundlib/Load_stm.cpp trunk/OpenMPT/soundlib/Load_ult.cpp trunk/OpenMPT/soundlib/Load_umx.cpp trunk/OpenMPT/soundlib/Load_wav.cpp trunk/OpenMPT/soundlib/Load_xm.cpp trunk/OpenMPT/soundlib/Loaders.h trunk/OpenMPT/soundlib/MIDIEvents.cpp trunk/OpenMPT/soundlib/MIDIEvents.h trunk/OpenMPT/soundlib/MIDIMacros.cpp trunk/OpenMPT/soundlib/MIDIMacros.h trunk/OpenMPT/soundlib/Message.cpp trunk/OpenMPT/soundlib/Message.h trunk/OpenMPT/soundlib/Mixer.h trunk/OpenMPT/soundlib/MixerInterface.h trunk/OpenMPT/soundlib/MixerLoops.cpp trunk/OpenMPT/soundlib/Mmcmp.cpp trunk/OpenMPT/soundlib/ModChannel.cpp trunk/OpenMPT/soundlib/ModChannel.h trunk/OpenMPT/soundlib/ModInstrument.cpp trunk/OpenMPT/soundlib/ModInstrument.h trunk/OpenMPT/soundlib/ModSample.cpp trunk/OpenMPT/soundlib/ModSample.h trunk/OpenMPT/soundlib/ModSequence.cpp trunk/OpenMPT/soundlib/ModSequence.h trunk/OpenMPT/soundlib/RowVisitor.cpp trunk/OpenMPT/soundlib/RowVisitor.h trunk/OpenMPT/soundlib/S3MTools.cpp trunk/OpenMPT/soundlib/S3MTools.h trunk/OpenMPT/soundlib/SampleFormatConverters.h trunk/OpenMPT/soundlib/SampleFormats.cpp trunk/OpenMPT/soundlib/SampleIO.cpp trunk/OpenMPT/soundlib/SampleIO.h trunk/OpenMPT/soundlib/Snd_defs.h 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/SoundFilePlayConfig.cpp trunk/OpenMPT/soundlib/SoundFilePlayConfig.h trunk/OpenMPT/soundlib/Tables.cpp trunk/OpenMPT/soundlib/WAVTools.cpp trunk/OpenMPT/soundlib/WAVTools.h trunk/OpenMPT/soundlib/Wav.h trunk/OpenMPT/soundlib/WindowedFIR.cpp trunk/OpenMPT/soundlib/WindowedFIR.h trunk/OpenMPT/soundlib/XMTools.cpp trunk/OpenMPT/soundlib/XMTools.h trunk/OpenMPT/soundlib/load_j2b.cpp trunk/OpenMPT/soundlib/mod_specifications.cpp trunk/OpenMPT/soundlib/mod_specifications.h trunk/OpenMPT/soundlib/modcommand.cpp trunk/OpenMPT/soundlib/modcommand.h trunk/OpenMPT/soundlib/modsmp_ctrl.cpp trunk/OpenMPT/soundlib/modsmp_ctrl.h trunk/OpenMPT/soundlib/pattern.cpp trunk/OpenMPT/soundlib/pattern.h trunk/OpenMPT/soundlib/patternContainer.cpp trunk/OpenMPT/soundlib/patternContainer.h trunk/OpenMPT/soundlib/plugins/DmoToVst.cpp trunk/OpenMPT/soundlib/plugins/PlugInterface.h trunk/OpenMPT/soundlib/plugins/PluginEventQueue.h trunk/OpenMPT/soundlib/plugins/PluginManager.cpp trunk/OpenMPT/soundlib/plugins/PluginMixBuffer.h trunk/OpenMPT/soundlib/tuning.cpp trunk/OpenMPT/soundlib/tuning.h trunk/OpenMPT/soundlib/tuningCollection.cpp trunk/OpenMPT/soundlib/tuningbase.cpp trunk/OpenMPT/soundlib/tuningbase.h trunk/OpenMPT/soundlib/tuningcollection.h trunk/OpenMPT/test/test.cpp trunk/OpenMPT/test/test.h trunk/OpenMPT/unarchiver/ungzip.cpp trunk/OpenMPT/unarchiver/ungzip.h trunk/OpenMPT/unarchiver/unlha.cpp trunk/OpenMPT/unarchiver/unlha.h trunk/OpenMPT/unarchiver/unrar.cpp trunk/OpenMPT/unarchiver/unrar.h trunk/OpenMPT/unarchiver/unzip.cpp trunk/OpenMPT/unarchiver/unzip.h Modified: trunk/OpenMPT/README.md =================================================================== --- trunk/OpenMPT/README.md 2014-06-08 10:22:20 UTC (rev 4090) +++ trunk/OpenMPT/README.md 2014-06-09 14:00:26 UTC (rev 4091) @@ -1,303 +1,303 @@ - -README -====== - -OpenMPT and libopenmpt -====================== - - -How to compile --------------- - - -### OpenMPT - - - Visual Studio 2008/2010 is required. Express versions won't work as they - don't include MFC. - - - The VST 2.4 and ASIO SDKs are needed for compiling with VST and ASIO - support. - - If you don't want this, uncomment `#define NO_VST` and `#define NO_ASIO` in - the file `common/BuildSettings.h`. - - - ASIO: - - If you don't use `#define NO_ASIO`, you will need to put the ASIO SDK - in the `include/ASIOSDK2` folder. The top level directory of the SDK is - already named `ASIOSDK2`, so simply move that directory in the include - folder. - - Please visit - [steinberg.net](http://www.steinberg.net/en/company/developer.html) to - download the SDK. - - - VST: - - If you don't use `#define NO_VST`, you will need to put the VST 2.4 SDK - in the `include/vstsdk2.4` folder. - - Please visit - [steinberg.net](http://www.steinberg.net/en/company/developer.html) to - download the SDK. - - If you need further help with the VST and ASIO SDKs, get in touch with the - main developers. - - - You need the DirectX SDK to enable DirectSound output. If you don't want - this, uncomment `#define NO_DSOUND` in the file `common/BuildSettings.h`. - - - To compile the project, open `mptrack/MPTRACK_08.SLN` (if you're using - VS2008) or `mptrack/MPTRACK_10.SLN` (VS2010) and hit the compile button! :) - - -### libopenmpt and openmpt123 - - - Visual Studio 2010 (express version should work, but this is not tested): - - - The libopenmpt solution is in `libopenmpt/libopenmpt.sln`. - You will need the Winamp 5 SDK and the xmplay SDK if you want to - compile the plugins for these 2 players: - - - Winamp 5 SDK: - - To build libopenmpt as a winamp input plugin, copy the headers in - Winamp/ from `WA5.55_SDK.exe` to include/winamp/. - - Please visit - [winamp.com](http://wiki.winamp.com/wiki/Plug-in_Developer) to - download the SDK. - You can disable in_openmpt in the solution configuration. - - - xmplay SDK: - - To build libopenmpt with xmplay input plugin support, copy the - contents of xmp-sdk.zip into include/xmplay/. - - Please visit [un4seen.com](http://www.un4seen.com/xmplay.html) to - download to SDK. - You can disable xmp-openmpt in the solution configuration. - - - The openmpt123 solution is in `openmpt123/openmpt123.sln`. - - - Makefile - - The makefile supports different build environments and targets via the - `CONFIG=` parameter directly to the make invocation. - Use 'make CONFIG=$newconfig clean' when switching between different configs - because the makefile cleans only intermediates and target that are active - for the current config and no configuration state is kept around across - invocations. - - - mingw-w64: - - The required version should be at least 4.4. Only 4.6 and up are - tested. - - make CONFIG=mingw64-win32 # for win32 - - make CONFIG=mingw64-win64 # for win64 - - - gcc or clang (on Unix-like systems, including Mac OS X with MacPorts): - - The minimum required compiler versions are: - - - gcc 4.4 - - - clang 3.0 - - The Makefile requires pkg-config for native builds. - For sound output in openmpt123, PortAudio or SDL is required. - openmpt123 can optionally use libflac, libwavpack and libsndfile to - render PCM files to disk. - When using gcc, you should simply do: - - make - - When using clang, it is recommended to do: - - make CONFIG=clang - - The `Makefile` supports some customizations. You might want to read the top - which should get you some possible make settings, like e.g. - `make DYNLINK=0` or similar. Cross compiling or different compiler would - best be implemented via new `Makefile.config.*` files. - - The `Makefile` also supports building doxygen documentation by using - - make doc - - Binaries and documentation can be installed systen-wide with - - make PREFIX=/yourprefix install - make PREFIX=/yourprefix install-doc - - `PREFIX` defaults to `/usr/local`. A `DESTDIR=` parameter is also - supported. - - - Android NDK - - See `build/android_ndk/README.AndroidNDK.txt`. - - - -Coding conventions ------------------- - - -### OpenMPT - -(see below for an example) - -- Functions / methods are "underlined" (The `//------` comment, see below for - an example what it should look like). -- Place curly braces at the beginning of the line, not at the end -- Generally make use of the custom index types like `SAMPLEINDEX` or - `ORDERINDEX` when referring to samples, orders, etc. -- When changing playback behaviour, make sure that you use the function - `CSoundFile::IsCompatibleMode()` so that modules made with previous versions - of MPT still sound correct (if the change is extremely small, this might be - unnecessary) -- `CamelCase` function and variable names are preferred. - -#### OpenMPT code example - -~~~~{.cpp} -void Foo::Bar(int foobar) -//----------------------- -{ - while(true) - { - // some code - } -} -~~~~ - - -### libopenmpt - -**Note:** -**This applies to `libopenmpt/` and `openmpt123/` directories only.** -**Use OpenMPT style (see above) otherwise.** - -The code generally tries to follow these conventions, but they are not -strictly enforced and there are valid reasons to diverge from these -conventions. Using common sense is recommended. - - - In general, the most important thing is to keep style consistent with - directly surrounding code. - - Use C++ std types when possible, prefer `std::size_t` and `std::int32_t` - over `long` or `int`. Do not use C99 std types (e.g. no pure `int32_t`) - - Qualify namespaces explicitly, do not use `using`. - Members of `namespace openmpt` can be named without full namespace - qualification. - - Prefer the C++ version in `namespace std` if the same functionality is - provided by the C standard library as well. Also, include the C++ - version of C standard library headers (e.g. use `<cstdio>` instead of - `<stdio.h>`. - - Do not use ANY locale-dependant C functions. For locale-dependant C++ - functionaly (especially iostream), always imbue the - `std::locale::classic()` locale. - - Prefer kernel_style_names over CamelCaseNames. - - Indentation: - - `{` are placed at the end of the opening line. - - Enclose even single statements in curly braces. - - Avoid placing single statements on the same line as the `if`. - - Opening parentheses are separated from keywords with a space. - - Opening parentheses are not separated from function names. - - Place spaces around operators and inside parentheses. - - Align `:` and `,` when inheriting or initialiasing members in a - constructor. - - The pointer `*` is separated from both the type and the variable name. - - Use tabs for identation, spaces for formatting. - Tabs should only appear at the very beginning of a line. - Do not assume any particular width of the TAB character. If width is - important for formatting reasons, use spaces. - - Use empty lines at will. - - API documentation is done with doxygen. - Use general C doxygen for the C API. - Use QT-style doxygen for the C++ API. - -#### libopenmpt indentation example - -~~~~{.cpp} -namespace openmpt { - -// This is totally meaningless code and just illustrates identation. - -class foo - : public base - , public otherbase -{ - -private: - - std::int32_t x; - std::int16_t y; - -public: - - foo() - : x(0) - , y(-1) - { - return; - } - - int bar() const; - -}; // class foo - -int foo::bar() const { - - for ( int i = 0; i < 23; ++i ) { - swtich ( x ) { - case 2: - something( y ); - break; - default: - something( ( y - 1 ) * 2 ); - break; - } - } - if ( x == 12 ) { - return -1; - } else if ( x == 42 ) { - return 1; - } - return 42; - -} - -} // namespace openmpt -~~~~ - - -A few words from the readme of the original MPT 1.16 source drop by Olivier ---------------------------------------------------------------------------- - -> The sound library was originally written to support VOC/WAV and MOD files under -> DOS, and supported such things as PC-Speaker, SoundBlaster 1/2/Pro, and the -> famous Gravis UltraSound. -> -> It was then ported to Win32 in 1995 (through the Mod95 project, mostly for use -> within Render32). -> -> What does this mean? -> It means the code base is quite old and is showing its age (over 10 years now) -> It means that many things are poorly named (CSoundFile), and not very clean, and -> if I was to rewrite the engine today, it would look much different. -> -> Some tips for future development and cleanup: -> - Probably the main improvement would be to separate the Song, Channel, Mixer -> and Low-level mixing routines in separate interface-based classes. -> - Get rid of globals (many globals creeped up over time, mostly because of the -> hack to allow simultaneous playback of 2 songs in Modplug Player -> ReadMix()). -> This is a major problem for writing a DShow source filter, or any other COM -> object (A DShow source would allow playback of MOD files in WMP, which would be -> much easier than rewriting a different player). -> - The MPT UI code is MFC-based, and I would say is fairly clean (as a rough -> rule, the more recent the code is, the cleaner it is), though the UI code is -> tightly integrated with the implementation (this could make it somewhat more -> difficult to implement such things as a skin-based UI - but hey, if it was easy, -> I probably would have done it already :). + +README +====== + +OpenMPT and libopenmpt +====================== + + +How to compile +-------------- + + +### OpenMPT + + - Visual Studio 2008/2010 is required. Express versions won't work as they + don't include MFC. + + - The VST 2.4 and ASIO SDKs are needed for compiling with VST and ASIO + support. + + If you don't want this, uncomment `#define NO_VST` and `#define NO_ASIO` in + the file `common/BuildSettings.h`. + + - ASIO: + + If you don't use `#define NO_ASIO`, you will need to put the ASIO SDK + in the `include/ASIOSDK2` folder. The top level directory of the SDK is + already named `ASIOSDK2`, so simply move that directory in the include + folder. + + Please visit + [steinberg.net](http://www.steinberg.net/en/company/developer.html) to + download the SDK. + + - VST: + + If you don't use `#define NO_VST`, you will need to put the VST 2.4 SDK + in the `include/vstsdk2.4` folder. + + Please visit + [steinberg.net](http://www.steinberg.net/en/company/developer.html) to + download the SDK. + + If you need further help with the VST and ASIO SDKs, get in touch with the + main developers. + + - You need the DirectX SDK to enable DirectSound output. If you don't want + this, uncomment `#define NO_DSOUND` in the file `common/BuildSettings.h`. + + - To compile the project, open `mptrack/MPTRACK_08.SLN` (if you're using + VS2008) or `mptrack/MPTRACK_10.SLN` (VS2010) and hit the compile button! :) + + +### libopenmpt and openmpt123 + + - Visual Studio 2010 (express version should work, but this is not tested): + + - The libopenmpt solution is in `libopenmpt/libopenmpt.sln`. + You will need the Winamp 5 SDK and the xmplay SDK if you want to + compile the plugins for these 2 players: + + - Winamp 5 SDK: + + To build libopenmpt as a winamp input plugin, copy the headers in + Winamp/ from `WA5.55_SDK.exe` to include/winamp/. + + Please visit + [winamp.com](http://wiki.winamp.com/wiki/Plug-in_Developer) to + download the SDK. + You can disable in_openmpt in the solution configuration. + + - xmplay SDK: + + To build libopenmpt with xmplay input plugin support, copy the + contents of xmp-sdk.zip into include/xmplay/. + + Please visit [un4seen.com](http://www.un4seen.com/xmplay.html) to + download to SDK. + You can disable xmp-openmpt in the solution configuration. + + - The openmpt123 solution is in `openmpt123/openmpt123.sln`. + + - Makefile + + The makefile supports different build environments and targets via the + `CONFIG=` parameter directly to the make invocation. + Use 'make CONFIG=$newconfig clean' when switching between different configs + because the makefile cleans only intermediates and target that are active + for the current config and no configuration state is kept around across + invocations. + + - mingw-w64: + + The required version should be at least 4.4. Only 4.6 and up are + tested. + + make CONFIG=mingw64-win32 # for win32 + + make CONFIG=mingw64-win64 # for win64 + + - gcc or clang (on Unix-like systems, including Mac OS X with MacPorts): + + The minimum required compiler versio... [truncated message content] |
From: <man...@us...> - 2014-06-09 14:11:19
|
Revision: 4093 http://sourceforge.net/p/modplug/code/4093 Author: manxorist Date: 2014-06-09 14:07:30 +0000 (Mon, 09 Jun 2014) Log Message: ----------- [Var] Fixup and also set svn:eol-style on files which did have mixed line endings. Modified Paths: -------------- trunk/OpenMPT/include/soundtouch/README.html trunk/OpenMPT/packageTemplate/SoundTouch/README.html trunk/OpenMPT/pluginBridge/PluginBridge.rc Property Changed: ---------------- trunk/OpenMPT/include/soundtouch/README.html trunk/OpenMPT/packageTemplate/SoundTouch/README.html trunk/OpenMPT/pluginBridge/PluginBridge.rc Modified: trunk/OpenMPT/include/soundtouch/README.html =================================================================== --- trunk/OpenMPT/include/soundtouch/README.html 2014-06-09 14:07:12 UTC (rev 4092) +++ trunk/OpenMPT/include/soundtouch/README.html 2014-06-09 14:07:30 UTC (rev 4093) @@ -1,784 +1,784 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> -<html> -<head> - <title>SoundTouch library README</title> - <meta http-equiv="Content-Type" - content="text/html; charset=windows-1252"> - <meta http-equiv="Content-Language" content="en-us"> - <meta name="author" content="Olli Parviainen"> - <meta name="description" - content="Readme file for SoundTouch audio processing library"> - <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> - <meta name="ProgId" content="FrontPage.Editor.Document"> - <style> <!-- .normal { font-family: Arial } - --></style> -</head> -<body class="normal"> -<hr> -<h1>SoundTouch audio processing library v1.8.0</h1> -<p class="normal">SoundTouch library Copyright \xA9 Olli Parviainen 2001-2014</p> -<hr> -<h2>1. Introduction </h2> -<p>SoundTouch is an open-source audio processing library that allows -changing the sound tempo, pitch and playback rate parameters -independently from each other, i.e.:</p> -<ul> - <li> Sound tempo can be increased or decreased while maintaining the -original pitch </li> - <li> Sound pitch can be increased or decreased while maintaining the -original tempo </li> - <li> Change playback rate that affects both tempo and pitch at the -same time </li> - <li> Choose any combination of tempo/pitch/rate</li> -</ul> -<h3>1.1 Contact information </h3> -<p>Author email: oparviai 'at' iki.fi </p> -<p>SoundTouch WWW page: <a href="http://soundtouch.surina.net">http://soundtouch.surina.net</a></p> -<hr> -<h2>2. Compiling SoundTouch</h2> -<p>Before compiling, notice that you can choose the sample data format -if it's desirable to use floating point sample data instead of 16bit -integers. See section "sample data format" for more information.</p> -<h3>2.1. Building in Microsoft Windows</h3> -<p>Project files for Microsoft Visual C++ are supplied with the source -code package. Go to Microsoft WWW page to download -<a href="http://www.visualstudio.com/en-US/products/visual-studio-express-vs"> -Microsoft Visual Studio Express version for free</a>. -</p> -<p>To build the binaries with Visual C++ compiler, either run -"make-win.bat" script, or open the appropriate project files in source -code directories with Visual Studio. The final executable will appear -under the "SoundTouch\bin" directory. If using the Visual Studio IDE -instead of the make-win.bat script, directories bin and lib may need to -be created manually to the SoundTouch package root for the final -executables. The make-win.bat script creates these directories -automatically. </p> -<h3>2.2. Building in Gnu platforms</h3> -<p>The SoundTouch library compiles in practically any platform -supporting GNU compiler (GCC) tools. SoundTouch requires GCC version 4.3 or later.</p> -<p>To build and install the binaries, run the following commands in -/soundtouch directory:</p> -<table border="0" cellpadding="0" cellspacing="4"> - <tbody> - <tr> - <td style="vertical-align: top;"> - <pre>./bootstrap -</pre> - </td> - <td style="vertical-align: top;">Creates "configure" file with -local autoconf/automake toolset.<br> - </td> - </tr> - <tr valign="top"> - <td> - <pre>./configure -</pre> - </td> - <td> - <p>Configures the SoundTouch package for the local environment. -Notice that "configure" file is not available before running the -"./bootstrap" command as above.<br> - </p> - </td> - </tr> - <tr valign="top"> - <td> - <pre>make -</pre> - </td> - <td> - <p>Builds the SoundTouch library & SoundStretch utility.</p> - </td> - </tr> - <tr valign="top"> - <td> - <pre>make install -</pre> - </td> - <td> - <p>Installs the SoundTouch & BPM libraries to <b>/usr/local/lib</b> -and SoundStretch utility to <b>/usr/local/bin</b>. Please notice that -'root' privileges may be required to install the binaries to the -destination locations.</p> - </td> - </tr> - </tbody> -</table> -<h4><b>2.2.1 Required GNU tools</b> </h4> -<p> <span style="font-weight: bold;">Bash shell</span>, <span - style="font-weight: bold;">GNU C++ compiler</span>, <span - style="font-weight: bold;">libtool</span>, <span - style="font-weight: bold;">autoconf</span> and <span - style="font-weight: bold;">automake</span> tools -are required for compiling the SoundTouch library. These are usually -included with the GNU/Linux distribution, but if not, install these -packages first. For example, Ubuntu Linux can acquire and install -these with the following command:</p> -<pre><b>sudo apt-get install automake autoconf libtool build-essential</b></pre> -<h4><b>2.2.2 Problems with GCC compiler compatibility</b></h4> -<p>At the release time the SoundTouch package has been tested to -compile in GNU/Linux platform. However, If you have problems getting the -SoundTouch library compiled, try disabling optimizations that are specific for -x86 processors by running <b>./configure</b> script with switch -<blockquote> -<pre>--enable-x86-optimizations=no</pre> -</blockquote> - -Alternatively, if you don't use GNU Configure system, edit file "include/STTypes.h" -directly and remove the following definition:<blockquote> - <pre>#define SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS 1</pre> -</blockquote> - -<h4><b>2.2.3 Compiling Shared Library / DLL version</b></h4> - <p> - The GNU compilation does not automatically create a shared-library version of - SoundTouch (.so or .dll). If such is desired, then you can create it as follows - after running the usual compilation:</p> - <blockquote> - <pre>g++ -shared -static -DDLL_EXPORTS -I../../include -o SoundTouch.dll \ - SoundTouchDLL.cpp ../SoundTouch/.libs/libSoundTouch.a -sstrip SoundTouch.dll</pre> -</blockquote> - -<h3>2.1. Building in Android</h3> -<p>Android compilation instructions are within the - source code package, see file "<b>source/Android-lib/README-SoundTouch-Android.html</b>" - in the package.</p> - -<hr> -<h2>3. About implementation & Usage tips <h3>3.1. Supported sample data formats</h3> -<p>The sample data format can be chosen between 16bit signed integer -and 32bit floating point values, the default is 32bit floating point. </p> -<p> In Windows environment, the sample data format is chosen in file -"STTypes.h" by choosing one of the following defines:</p> -<ul> - <li> <span style="font-weight: bold;">#define -SOUNDTOUCH_INTEGER_SAMPLES</span> for 16bit signed integer </li> - <li> <span style="font-weight: bold;">#define </span><span - style="font-weight: bold;">SOUNDTOUCH_</span><span - style="font-weight: bold;">FLOAT_SAMPLES</span> for 32bit floating -point</li> -</ul> -<p> In GNU environment, the floating sample format is used by default, -but integer sample format can be chosen by giving the following switch -to the configure script: </p> -<blockquote> - <pre>./configure --enable-integer-samples</pre> -</blockquote> -<p>The sample data can have either single (mono) or double (stereo) -audio channel. Stereo data is interleaved so that every other data -value is for left channel and every second for right channel. Notice -that while it'd be possible in theory to process stereo sound as two -separate mono channels, this isn't recommended because processing the -channels separately would result in losing the phase coherency between -the channels, which consequently would ruin the stereo effect.</p> -<p>Sample rates between 8000-48000H are supported.</p> -<h3>3.2. Processing latency</h3> -<p>The processing and latency constraints of the SoundTouch library are:</p> -<ul> - <li> Input/output processing latency for the SoundTouch processor is -around 100 ms. This is when time-stretching is used. If the rate -transposing effect alone is used, the latency requirement is much -shorter, see section 'About algorithms'. </li> - <li> Processing CD-quality sound (16bit stereo sound with 44100H -sample rate) in real-time or faster is possible starting from -processors equivalent to Intel Pentium 133Mh or better, if using the -"quick" processing algorithm. If not using the "quick" mode or if -floating point sample data are being used, several times more CPU power -is typically required.</li> -</ul> -<h3>3.3. About algorithms</h3> -<p>SoundTouch provides three seemingly independent effects: tempo, -pitch and playback rate control. These three controls are implemented -as combination of two primary effects, <em>sample rate transposing</em> -and <em>time-stretching</em>.</p> -<p><em>Sample rate transposing</em> affects both the audio stream -duration and pitch. It's implemented simply by converting the original -audio sample stream to the desired duration by interpolating from -the original audio samples. In SoundTouch, linear interpolation with -anti-alias filtering is used. Theoretically a higher-order -interpolation provide better result than 1st order linear -interpolation, but in audio application linear interpolation together -with anti-alias filtering performs subjectively about as well as -higher-order filtering would.</p> -<p><em>Time-stretching </em>means changing the audio stream duration -without affecting it's pitch. SoundTouch uses WSOLA-like -time-stretching routines that operate in the time domain. Compared to -sample rate transposing, time-stretching is a much heavier operation -and also requires a longer processing "window" of sound samples used by -the processing algorithm, thus increasing the algorithm input/output -latency. Typical i/o latency for the SoundTouch time-stretch algorithm -is around 100 ms.</p> -<p>Sample rate transposing and time-stretching are then used together -to produce the tempo, pitch and rate controls:</p> -<ul> - <li> <strong>'Tempo'</strong> control is implemented purely by -time-stretching. </li> - <li> <strong>'Rate</strong>' control is implemented purely by sample -rate transposing. </li> - <li> <strong>'Pitch</strong>' control is implemented as a -combination of time-stretching and sample rate transposing. For -example, to increase pitch the audio stream is first time-stretched to -longer duration (without affecting pitch) and then transposed back to -original duration by sample rate transposing, which simultaneously -reduces duration and increases pitch. The result is original duration -but increased pitch.</li> -</ul> -<h3>3.4 Tuning the algorithm parameters</h3> -<p>The time-stretch algorithm has few parameters that can be tuned to -optimize sound quality for certain application. The current default -parameters have been chosen by iterative if-then analysis (read: "trial -and error") to obtain best subjective sound quality in pop/rock music -processing, but in applications processing different kind of sound the -default parameter set may result into a sub-optimal result.</p> -<p>The time-stretch algorithm default parameter values are set by the -following #defines in file "TDStretch.h":</p> -<blockquote> - <pre>#define DEFAULT_SEQUENCE_MS AUTOMATIC<br>#define DEFAULT_SEEKWINDOW_MS AUTOMATIC<br>#define DEFAULT_OVERLAP_MS 8</pre> -</blockquote> -<p>These parameters affect to the time-stretch algorithm as follows:</p> -<ul> - <li> <strong>DEFAULT_SEQUENCE_MS</strong>: This is the default -length of a single processing sequence in milliseconds which determines -the how the original sound is chopped in the time-stretch algorithm. -Larger values mean fewer sequences are used in processing. In principle -a larger value sounds better when slowing down the tempo, but worse -when increasing the tempo and vice versa. <br> - <br> -By default, this setting value is calculated automatically according to -tempo value.<br> - </li> - <li> <strong>DEFAULT_SEEKWINDOW_MS</strong>: The seeking window -default length in milliseconds is for the algorithm that seeks the best -possible overlapping location. This determines from how wide a sample -"window" the algorithm can use to find an optimal mixing location when -the sound sequences are to be linked back together. <br> - <br> -The bigger this window setting is, the higher the possibility to find a -better mixing position becomes, but at the same time large values may -cause a "drifting" sound artifact because neighboring sequences can be -chosen at more uneven intervals. If there's a disturbing artifact that -sounds as if a constant frequency was drifting around, try reducing -this setting.<br> - <br> -By default, this setting value is calculated automatically according to -tempo value.<br> - </li> - <li> <strong>DEFAULT_OVERLAP_MS</strong>: Overlap length in -milliseconds. When the sound sequences are mixed back together to form -again a continuous sound stream, this parameter defines how much the -ends of the consecutive sequences will overlap with each other.<br> - <br> -This shouldn't be that critical parameter. If you reduce the -DEFAULT_SEQUENCE_MS setting by a large amount, you might wish to try a -smaller value on this.</li> -</ul> -<p>Notice that these parameters can also be set during execution time -with functions "<strong>TDStretch::setParameters()</strong>" and "<strong>SoundTouch::setSetting()</strong>".</p> -<p>The table below summaries how the parameters can be adjusted for -different applications:</p> -<table border="1"> - <tbody> - <tr> - <td valign="top"><strong>Parameter name</strong></td> - <td valign="top"><strong>Default value magnitude</strong></td> - <td valign="top"><strong>Larger value affects...</strong></td> - <td valign="top"><strong>Smaller value affects...</strong></td> - <td valign="top"><strong>Effect to CPU burden</strong></td> - </tr> - <tr> - <td valign="top"> - <pre>SEQUENCE_MS</pre> - </td> - <td valign="top">Default value is relatively large, chosen for -slowing down music tempo</td> - <td valign="top">Larger value is usually better for slowing down -tempo. Growing the value decelerates the "echoing" artifact when -slowing down the tempo.</td> - <td valign="top">Smaller value might be better for speeding up -tempo. Reducing the value accelerates the "echoing" artifact when -slowing down the tempo </td> - <td valign="top">Increasing the parameter value reduces -computation burden</td> - </tr> - <tr> - <td valign="top"> - <pre>SEEKWINDOW_MS</pre> - </td> - <td valign="top">Default value is relatively large, chosen for -slowing down music tempo</td> - <td valign="top">Larger value eases finding a good mixing -position, but may cause a "drifting" artifact</td> - <td valign="top">Smaller reduce possibility to find a good mixing -position, but reduce the "drifting" artifact.</td> - <td valign="top">Increasing the parameter value increases -computation burden</td> - </tr> - <tr> - <td valign="top"> - <pre>OVERLAP_MS</pre> - </td> - <td valign="top">Default value is relatively large, chosen to -suit with above parameters.</td> - <td valign="top"> </td> - <td valign="top">If you reduce the "sequence ms" setting, you -might wish to try a smaller value.</td> - <td valign="top">Increasing the parameter value increases -computation burden</td> - </tr> - </tbody> -</table> -<h3>3.5 Performance Optimizations </h3> -<p><strong>General optimizations:</strong></p> -<p>The time-stretch routine has a 'quick' mode that substantially -speeds up the algorithm but may degrade the sound quality by a small -amount. This mode is activated by calling SoundTouch::setSetting() -function with parameter id of SETTING_USE_QUICKSEEK and value -"1", i.e. </p> -<blockquote> - <p>setSetting(SETTING_USE_QUICKSEEK, 1);</p> -</blockquote> -<p><strong>CPU-specific optimizations:</strong></p> -<ul> - <li> Intel MMX optimized routines are used with compatible CPUs when -16bit integer sample type is used. MMX optimizations are available both -in Win32 and Gnu/x86 platforms. Compatible processors are Intel -PentiumMMX and later; AMD K6-2, Athlon and later. </li> - <li> Intel SSE optimized routines are used with compatible CPUs when -floating point sample type is used. SSE optimizations are currently -implemented for Win32 platform only. Processors compatible with SSE -extension are Intel processors starting from Pentium-III, and AMD -processors starting from Athlon XP. </li> - <li> AMD 3DNow! optimized routines are used with compatible CPUs when -floating point sample type is used, but SSE extension isn't supported . -3DNow! optimizations are currently implemented for Win32 platform only. -These optimizations are used in AMD K6-2 and Athlon (classic) CPU's; -better performing SSE routines are used with AMD processor starting -from Athlon XP. </li> -</ul> -<hr> -<h2><a name="SoundStretch"></a>4. SoundStretch audio processing utility -</h2> -<p>SoundStretch audio processing utility<br> - Copyright (c) Olli Parviainen 2002-2012</p> -<p>SoundStretch is a simple command-line application that can change -tempo, pitch and playback rates of WAV sound files. This program is -intended primarily to demonstrate how the "SoundTouch" library can be -used to process sound in your own program, but it can as well be used -for processing sound files.</p> -<h3>4.1. SoundStretch Usage Instructions</h3> -<p>SoundStretch Usage syntax:</p> -<blockquote> - <pre>soundstretch infilename outfilename [switches]</pre> -</blockquote> -<p>Where: </p> -<table width="100%" border="0" cellpadding="2"> - <tbody> - <tr> - <td valign="top"> - <pre>"infilename"</pre> - </td> - <td valign="top">Name of the input sound data file (in .WAV audio -file format). Give "stdin" as filename to use standard input pipe. </td> - </tr> - <tr> - <td valign="top"> - <pre>"outfilename"</pre> - </td> - <td valign="top">Name of the output sound file where the -resulting sound is saved (in .WAV audio file format). This parameter -may be omitted if you don't want to save the output (e.g. when -only calculating BPM rate with '-bpm' switch). Give "stdout" as -filename to use standard output pipe.</td> - </tr> - <tr> - <td valign="top"> - <pre> [switches]</pre> - </td> - <td valign="top">Are one or more control switches.</td> - </tr> - </tbody> -</table> -<p>Available control switches are:</p> -<table width="100%" border="0" cellpadding="2"> - <tbody> - <tr> - <td valign="top"> - <pre>-tempo=n </pre> - </td> - <td valign="top">Change the sound tempo by n percents (n = -95.0 -.. +5000.0 %) </td> - </tr> - <tr> - <td valign="top"> - <pre>-pitch=n</pre> - </td> - <td valign="top">Change the sound pitch by n semitones (n = -60.0 -.. + 60.0 semitones) </td> - </tr> - <tr> - <td valign="top"> - <pre>-rate=n</pre> - </td> - <td valign="top">Change the sound playback rate by n percents (n -= -95.0 .. +5000.0 %) </td> - </tr> - <tr> - <td valign="top"> - <pre>-bpm=n</pre> - </td> - <td valign="top">Detect the Beats-Per-Minute (BPM) rate of the -sound and adjust the tempo to meet 'n' BPMs. When this switch is -applied, the "-tempo" switch is ignored. If "=n" is omitted, i.e. -switch "-bpm" is used alone, then the BPM rate is estimated and -displayed, but tempo not adjusted according to the BPM value. </td> - </tr> - <tr> - <td valign="top"> - <pre>-quick</pre> - </td> - <td valign="top">Use quicker tempo change algorithm. Gains speed -but loses sound quality. </td> - </tr> - <tr> - <td valign="top"> - <pre>-naa</pre> - </td> - <td valign="top">Don't use anti-alias filtering in sample rate -transposing. Gains speed but loses sound quality. </td> - </tr> - <tr> - <td valign="top"> - <pre>-license</pre> - </td> - <td valign="top">Displays the program license text (LGPL)</td> - </tr> - </tbody> -</table> -<p>Notes:</p> -<ul> - <li> To use standard input/output pipes for processing, give "stdin" -and "stdout" as input/output filenames correspondingly. The standard -input/output pipes will still carry the audio data in .wav audio file -format. </li> - <li> The numerical switches allow both integer (e.g. "-tempo=123") -and decimal (e.g. "-tempo=123.45") numbers. </li> - <li> The "-naa" and/or "-quick" switches can be used to reduce CPU -usage while compromising some sound quality </li> - <li> The BPM detection algorithm works by detecting repeating bass or -drum patterns at low frequencies of <250Hz. A lower-than-expected -BPM figure may be reported for music with uneven or complex bass -patterns. </li> -</ul> -<h3>4.2. SoundStretch usage examples </h3> -<p><strong>Example 1</strong></p> -<p>The following command increases tempo of the sound file -"originalfile.wav" by 12.5% and stores result to file -"destinationfile.wav":</p> -<blockquote> - <pre>soundstretch originalfile.wav destinationfile.wav -tempo=12.5</pre> -</blockquote> -<p><strong>Example 2</strong></p> -<p>The following command decreases the sound pitch (key) of the sound -file "orig.wav" by two semitones and stores the result to file -"dest.wav":</p> -<blockquote> - <pre>soundstretch orig.wav dest.wav -pitch=-2</pre> -</blockquote> -<p><strong>Example 3</strong></p> -<p>The following command processes the file "orig.wav" by decreasing -the sound tempo by 25.3% and increasing the sound pitch (key) by 1.5 -semitones. Resulting .wav audio data is directed to standard output -pipe:</p> -<blockquote> - <pre>soundstretch orig.wav stdout -tempo=-25.3 -pitch=1.5</pre> -</blockquote> -<p><strong>Example 4</strong></p> -<p>The following command detects the BPM rate of the file "orig.wav" -and adjusts the tempo to match 100 beats per minute. Result is stored -to file "dest.wav":</p> -<blockquote> - <pre>soundstretch orig.wav dest.wav -bpm=100</pre> -</blockquote> -<p><strong>Example 5</strong></p> -<p>The following command reads .wav sound data from standard input pipe -and estimates the BPM rate:</p> -<blockquote> - <pre>soundstretch stdin -bpm</pre> -</blockquote> -<hr> -<h2>5. Change History</h2> -<h3>5.1. SoundTouch library Change History </h3> -<p><b>1.8.0:</b></p> -<ul> - <li>Added support for multi-channel audio processing</li> - <li>Added support for <b>cubic</b> and <b>shannon</b> interpolation for rate and pitch shift effects besides - the original <b>linear</b> interpolation, to reduce aliasing at high frequencies due to interpolation. - Cubic interpolation is used as default for floating point processing, and linear interpolation for integer - processing.</li> - <li>Fixed bug in anti-alias filtering that limited stop-band attenuation to -10 dB instead of <-50dB, and - increased filter length from 32 to 64 taps to further reduce aliasing due to frequency folding.</li> - <li>Performance improvements in cross-correlation algorithm</li> - <li>Other bug and compatibility fixes</li> -</ul> -<p><b>1.7.1:</b></p> -<ul> - <li>Added files for Android compilation -</ul> -<p><b>1.7.0:</b></p> -<ul> - <li>Sound quality improvements/li> - <li>Improved flush() to adjust output sound stream duration to match better with - ideal duration</li> - <li>Rewrote x86 cpu feature check to resolve compatibility problems</li> - <li>Configure script automatically checks if CPU supports mmx & sse compatibility for GNU platform, and - the script support now "--enable-x86-optimizations" switch to allow disabling x86-specific optimizations.</li> - <li>Revised #define conditions for 32bit/64bit compatibility</li> - <li>gnu autoconf/automake script compatibility fixes</li> - <li>Tuned beat-per-minute detection algorithm</li> -</ul> -<p><b>1.6.0:</b></p> -<ul> - <li> Added automatic cutoff threshold adaptation to beat detection -routine to better adapt BPM calculation to different types of music </li> - <li> Retired 3DNow! optimization support as 3DNow! is nowadays -obsoleted and assembler code is nuisance to maintain</li> - <li>Retired "configure" file from source code package due to -autoconf/automake versio conflicts, so that it is from now on to be -generated by invoking "boostrap" script that uses locally available -toolchain version for generating the "configure" file</li> - <li>Resolved namespace/label naming conflicts with other libraries by -replacing global labels such as INTEGER_SAMPLES with more specific -SOUNDTOUCH_INTEGER_SAMPLES etc.<br> - </li> - <li>Updated windows build scripts & project files for Visual -Studio 2008 support</li> - <li> Updated SoundTouch.dll API for .NET compatibility</li> - <li> Added API for querying nominal processing input & output -sample batch sizes</li> -</ul> -<p><strong>1.5.0:</strong></p> -<ul> - <li> Added normalization to correlation calculation and improvement -automatic seek/sequence parameter calculation to improve sound quality </li> - <li> Bugfixes: - <ul> - <li> Fixed negative array indexing in quick seek algorithm </li> - <li> FIR autoalias filter running too far in processing buffer </li> - <li> Check against zero sample count in rate transposing </li> - <li> Fix for x86-64 support: Removed pop/push instructions from -the cpu detection algorithm. </li> - <li> Check against empty buffers in FIFOSampleBuffer </li> - <li> Other minor fixes & code cleanup</li> - </ul> - </li> - <li> Fixes in compilation scripts for non-Intel platforms </li> - <li> Added Dynamic-Link-Library (DLL) version of SoundTouch library -build, provided with Delphi/Pascal wrapper for calling the dll routines - </li> - <li> Added #define PREVENT_CLICK_AT_RATE_CROSSOVER that prevents a -click artifact when crossing the nominal pitch from either positive to -negative side or vice versa</li> -</ul> -<p><strong>1.4.1:</strong></p> -<ul> - <li> Fixed a buffer overflow bug in BPM detect algorithm routines if -processing more than 2048 samples at one call </li> -</ul> -<p><strong>1.4.0:</strong></p> -<ul> - <li> Improved sound quality by automatic calculation of time stretch -algorithm processing parameters according to tempo setting </li> - <li> Moved BPM detection routines from SoundStretch application into -SoundTouch library </li> - <li> Bugfixes: Usage of uninitialied variables, GNU build scripts, -compiler errors due to 'const' keyword mismatch. </li> - <li> Source code cleanup</li> -</ul> -<p><strong>1.3.1: </strong> </p> -<ul> - <li> Changed static class declaration to GCC 4.x compiler compatible -syntax. </li> - <li> Enabled MMX/SSE-optimized routines also for GCC compilers. -Earlier the MMX/SSE-optimized routines were written in -compiler-specific inline assembler, now these routines are migrated to -use compiler intrinsic syntax which allows compiling the same -MMX/SSE-optimized source code with both Visual C++ and GCC compilers. </li> - <li> Set floating point as the default sample format and added switch -to the GNU configure script for selecting the other sample format.</li> -</ul> -<p><strong>1.3.0: </strong> </p> -<ul> - <li> Fixed tempo routine output duration inaccuracy due to rounding -error </li> - <li> Implemented separate processing routines for integer and -floating arithmetic to allow improvements to floating point routines -(earlier used algorithms mostly optimized for integer arithmetic also -for floating point samples) </li> - <li> Fixed a bug that distorts sound if sample rate changes during -the sound stream </li> - <li> Fixed a memory leak that appeared in MMX/SSE/3DNow! optimized -routines </li> - <li> Reduced redundant code pieces in MMX/SSE/3DNow! optimized -routines vs. the standard C routines. </li> - <li> MMX routine incompatibility with new gcc compiler versions </li> - <li> Other miscellaneous bug fixes </li> -</ul> -<p><strong>1.2.1: </strong> </p> -<ul> - <li> Added automake/autoconf scripts for GNU platforms (in courtesy -of David Durham) </li> - <li> Fixed SCALE overflow bug in rate transposer routine. </li> - <li> Fixed 64bit address space bugs. </li> - <li> Created a 'soundtouch' namespace for SAMPLETYPE definitions.</li> -</ul> -<p><strong>1.2.0: </strong> </p> -<ul> - <li> Added support for 32bit floating point sample data type with -SSE/3DNow! optimizations for Win32 platform (SSE/3DNow! optimizations -currently not supported in GCC environment) </li> - <li> Replaced 'make-gcc' script for GNU environment by master -Makefile </li> - <li> Added time-stretch routine configurability to SoundTouch main -class </li> - <li> Bugfixes</li> -</ul> -<p><strong>1.1.1: </strong> </p> -<ul> - <li> Moved SoundTouch under lesser GPL license (LGPL). This allows -using SoundTouch library in programs that aren't released under GPL -license. </li> - <li> Changed MMX routine organiation so that MMX optimized routines -are now implemented in classes that are derived from the basic classes -having the standard non-mmx routines. </li> - <li> MMX routines to support gcc version 3. </li> - <li> Replaced windows makefiles by script using the .dsw files </li> -</ul> -<p><strong>1.0.1: </strong> </p> -<ul> - <li> "mmx_gcc.cpp": Added "using namespace std" and removed "return -0" from a function with void return value to fix compiler errors when -compiling the library in Solaris environment. </li> - <li> Moved file "FIFOSampleBuffer.h" to "include" directory to allow -accessing the FIFOSampleBuffer class from external files. </li> -</ul> -<p><strong>1.0: </strong> </p> -<ul> - <li> Initial release </li> -</ul> -<p> </p> -<h3>5.2. SoundStretch application Change History </h3> -<p><b>1.7.0:</b></p> -<ul> - <li>Bugfixes in Wavfile: exception string formatting, avoid getLengthMs() integer - precision overflow, support WAV files using 24/32bit sample format.</li> -</ul> - <p><b>1.5.0:</b></p> -<ul> - <li> Added "-speech" switch to activate algorithm parameters more -suitable for speech processing than the default parameters tuned for -music processing.</li> -</ul> -<p><strong>1.4.0:</strong></p> -<ul> - <li> Moved BPM detection routines from SoundStretch application into -SoundTouch library </li> - <li> Allow using standard input/output pipes as audio processing -input/output streams</li> -</ul> -<p><strong>1.3.0:</strong></p> -<ul> - <li> Simplified accessing WAV files with floating point sample -format. </li> -</ul> -<p><strong>1.2.1: </strong> </p> -<ul> - <li> Fixed 64bit address space bugs.</li> -</ul> -<p><strong>1.2.0: </strong> </p> -<ul> - <li> Added support for 32bit floating point sample data type </li> - <li> Restructured the BPM routines into separate library </li> - <li> Fixed big-endian conversion bugs in WAV file routines (hopefully -:)</li> -</ul> -<p><strong>1.1.1: </strong> </p> -<ul> - <li> Fixed bugs in WAV file reading & added byte-order conversion -for big-endian processors. </li> - <li> Moved SoundStretch source code under 'example' directory to -highlight difference from SoundTouch stuff. </li> - <li> Replaced windows makefiles by script using the .dsw files </li> - <li> Output file name isn't required if output isn't desired (e.g. if -using the switch '-bpm' in plain format only) </li> -</ul> -<p><strong>1.1:</strong></p> -<ul> - <li> Fixed "Release" settings in Microsoft Visual C++ project file -(.dsp) </li> - <li> Added beats-per-minute (BPM) detection routine and command-line -switch "-bpm" </li> -</ul> -<p><strong>1.01: </strong> </p> -<ul> - <li> Initial release </li> -</ul> -<hr> -<h2>6. Acknowledgements </h2> -<p>Kudos for these people who have contributed to development or -submitted bugfixes since SoundTouch v1.3.1: </p> -<ul> - <li> Arthur A</li> - <li> Richard Ash</li> - <li> Stanislav Brabec</li> - <li> Christian Budde</li> - <li> Chris Bryan</li> - <li> Jacek Caban</li> - <li> Brian Cameron</li> - <li> Jason Champion</li> - <li> David Clark</li> - <li> Patrick Colis</li> - <li> Miquel Colon</li> - <li> Justin Frankel</li> - <li> Jason Garland</li> - <li> Takashi Iwai</li> - <li> Yuval Naveh</li> - <li> Paulo Pizarro</li> - <li> Blaise Potard</li> - <li> RJ Ryan</li> - <li> Patrick Colis </li> - <li> Miquel Colon </li> - <li> Sandro Cumerlato</li> - <li> Justin Frankel </li> - <li> Jason Garland </li> - <li> Masa H. </li> - <li> Takashi Iwai </li> - <li> Mathias M\xF6hl</li> - <li> Yuval Naveh </li> - <li> Paulo Pizarro </li> - <li> Blaise Potard</li> - <li> RJ Ryan </li> - <li> John Sheehy</li> - <li> Tim Shuttleworth</li> - <li> John Stumpo</li> - <li> Tim Shuttleworth</li> - <li> Katja Vetter</li> -</ul> -<p>Moral greetings to all other contributors and users also!</p> -<hr> -<h2>7. LICENSE </h2> -<p>SoundTouch audio processing library<br> -Copyright (c) Olli Parviainen</p> -<p>This library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License version 2.1 -as published by the Free Software Foundation.</p> -<p>This library 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 Lesser -General Public License for more details.</p> -<p>You should have received a copy of the GNU Lesser General Public -License along with this library; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p> -<hr><!-- -$Id: README.html 191 2014-01-07 20:26:30Z oparviai $ ---> - <p> - <i>RREADME.html file updated on 7-Jan-2014</i></p> -</body> -</html> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> +<html> +<head> + <title>SoundTouch library README</title> + <meta http-equiv="Content-Type" + content="text/html; charset=windows-1252"> + <meta http-equiv="Content-Language" content="en-us"> + <meta name="author" content="Olli Parviainen"> + <meta name="description" + content="Readme file for SoundTouch audio processing library"> + <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> + <meta name="ProgId" content="FrontPage.Editor.Document"> + <style> <!-- .normal { font-family: Arial } + --></style> +</head> +<body class="normal"> +<hr> +<h1>SoundTouch audio processing library v1.8.0</h1> +<p class="normal">SoundTouch library Copyright \xA9 Olli Parviainen 2001-2014</p> +<hr> +<h2>1. Introduction </h2> +<p>SoundTouch is an open-source audio processing library that allows +changing the sound tempo, pitch and playback rate parameters +independently from each other, i.e.:</p> +<ul> + <li> Sound tempo can be increased or decreased while maintaining the +original pitch </li> + <li> Sound pitch can be increased or decreased while maintaining the +original tempo </li> + <li> Change playback rate that affects both tempo and pitch at the +same time </li> + <li> Choose any combination of tempo/pitch/rate</li> +</ul> +<h3>1.1 Contact information </h3> +<p>Author email: oparviai 'at' iki.fi </p> +<p>SoundTouch WWW page: <a href="http://soundtouch.surina.net">http://soundtouch.surina.net</a></p> +<hr> +<h2>2. Compiling SoundTouch</h2> +<p>Before compiling, notice that you can choose the sample data format +if it's desirable to use floating point sample data instead of 16bit +integers. See section "sample data format" for more information.</p> +<h3>2.1. Building in Microsoft Windows</h3> +<p>Project files for Microsoft Visual C++ are supplied with the source +code package. Go to Microsoft WWW page to download +<a href="http://www.visualstudio.com/en-US/products/visual-studio-express-vs"> +Microsoft Visual Studio Express version for free</a>. +</p> +<p>To build the binaries with Visual C++ compiler, either run +"make-win.bat" script, or open the appropriate project files in source +code directories with Visual Studio. The final executable will appear +under the "SoundTouch\bin" directory. If using the Visual Studio IDE +instead of the make-win.bat script, directories bin and lib may need to +be created manually to the SoundTouch package root for the final +executables. The make-win.bat script creates these directories +automatically. </p> +<h3>2.2. Building in Gnu platforms</h3> +<p>The SoundTouch library compiles in practically any platform +supporting GNU compiler (GCC) tools. SoundTouch requires GCC version 4.3 or later.</p> +<p>To build and install the binaries, run the following commands in +/soundtouch directory:</p> +<table border="0" cellpadding="0" cellspacing="4"> + <tbody> + <tr> + <td style="vertical-align: top;"> + <pre>./bootstrap -</pre> + </td> + <td style="vertical-align: top;">Creates "configure" file with +local autoconf/automake toolset.<br> + </td> + </tr> + <tr valign="top"> + <td> + <pre>./configure -</pre> + </td> + <td> + <p>Configures the SoundTouch package for the local environment. +Notice that "configure" file is not available before running the +"./bootstrap" command as above.<br> + </p> + </td> + </tr> + <tr valign="top"> + <td> + <pre>make -</pre> + </td> + <td> + <p>Builds the SoundTouch library & SoundStretch utility.</p> + </td> + </tr> + <tr valign="top"> + <td> + <pre>make install -</pre> + </td> + <td> + <p>Installs the SoundTouch & BPM libraries to <b>/usr/local/lib</b> +and SoundStretch utility to <b>/usr/local/bin</b>. Please notice that +'root' privileges may be required to install the binaries to the +destination locations.</p> + </td> + </tr> + </tbody> +</table> +<h4><b>2.2.1 Required GNU tools</b> </h4> +<p> <span style="font-weight: bold;">Bash shell</span>, <span + style="font-weight: bold;">GNU C++ compiler</span>, <span + style="font-weight: bold;">libtool</span>, <span + style="font-weight: bold;">autoconf</span> and <span + style="font-weight: bold;">automake</span> tools +are required for compiling the SoundTouch library. These are usually +included with the GNU/Linux distribution, but if not, install these +packages first. For example, Ubuntu Linux can acquire and install +these with the following command:</p> +<pre><b>sudo apt-get install automake autoconf libtool build-essential</b></pre> +<h4><b>2.2.2 Problems with GCC compiler compatibility</b></h4> +<p>At the release time the SoundTouch package has been tested to +compile in GNU/Linux platform. However, If you have problems getting the +SoundTouch library compiled, try disabling optimizations that are specific for +x86 processors by running <b>./configure</b> script with switch +<blockquote> +<pre>--enable-x86-optimizations=no</pre> +</blockquote> + +Alternatively, if you don't use GNU Configure system, edit file "include/STTypes.h" +directly and remove the following definition:<blockquote> + <pre>#define SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS 1</pre> +</blockquote> + +<h4><b>2.2.3 Compiling Shared Library / DLL version</b></h4> + <p> + The GNU compilation does not automatically create a shared-library version of + SoundTouch (.so or .dll). If such is desired, then you can create it as follows + after running the usual compilation:</p> + <blockquote> + <pre>g++ -shared -static -DDLL_EXPORTS -I../../include -o SoundTouch.dll \ + SoundTouchDLL.cpp ../SoundTouch/.libs/libSoundTouch.a +sstrip SoundTouch.dll</pre> +</blockquote> + +<h3>2.1. Building in Android</h3> +<p>Android compilation instructions are within the + source code package, see file "<b>source/Android-lib/README-SoundTouch-Android.html</b>" + in the package.</p> + +<hr> +<h2>3. About implementation & Usage tips <h3>3.1. Supported sample data formats</h3> +<p>The sample data format can be chosen between 16bit signed integer +and 32bit floating point values, the default is 32bit floating point. </p> +<p> In Windows environment, the sample data format is chosen in file +"STTypes.h" by choosing one of the following defines:</p> +<ul> + <li> <span style="font-weight: bold;">#define +SOUNDTOUCH_INTEGER_SAMPLES</span> for 16bit signed integer </li> + <li> <span style="font-weight: bold;">#define </span><span + style="font-weight: bold;">SOUNDTOUCH_</span><span + style="font-weight: bold;">FLOAT_SAMPLES</span> for 32bit floating +point</li> +</ul> +<p> In GNU environment, the floating sample format is used by default, +but integer sample format can be chosen by giving the following switch +to the configure script: </p> +<blockquote> + <pre>./configure --enable-integer-samples</pre> +</blockquote> +<p>The sample data can have either single (mono) or double (stereo) +audio channel. Stereo data is interleaved so that every other data +value is for left channel and every second for right channel. Notice +that while it'd be possible in theory to process stereo sound as two +separate mono channels, this isn't recommended because processing the +channels separately would result in losing the phase coherency between +the channels, which consequently would ruin the stereo effect.</p> +<p>Sample rates between 8000-48000H are supported.</p> +<h3>3.2. Processing latency</h3> +<p>The processing and latency constraints of the SoundTouch library are:</p> +<ul> + <li> Input/output processing latency for the SoundTouch processor is +around 100 ms. This is when time-stretching is used. If the rate +transposing effect alone is used, the latency requirement is much +shorter, see section 'About algorithms'. </li> + <li> Processing CD-quality sound (16bit stereo sound with 44100H +sample rate) in real-time or faster is possible starting from +processors equivalent to Intel Pentium 133Mh or better, if using the +"quick" processing algorithm. If not using the "quick" mode or if +floating point sample data are being used, several times more CPU power +is typically required.</li> +</ul> +<h3>3.3. About algorithms</h3> +<p>SoundTouch provides three seemingly independent effects: tempo, +pitch and playback rate control. These three controls are implemented +as combination of two primary effects, <em>sample rate transposing</em> +and <em>time-stretching</em>.</p> +<p><em>Sample rate transposing</em> affects both the audio stream +duration and pitch. It's implemented simply by converting the original +audio sample stream to the desired duration by interpolating from +the original audio samples. In SoundTouch, linear interpolation with +anti-alias filtering is used. Theoretically a higher-order +interpolation provide better result than 1st order linear +interpolation, but in audio application linear interpolation together +with anti-alias filtering performs subjectively about as well as +higher-order filtering would.</p> +<p><em>Time-stretching </em>means changing the audio stream duration +without affecting it's pitch. SoundTouch uses WSOLA-like +time-stretching routines that operate in the time domain. Compared to +sample rate transposing, time-stretching is a much heavier operation +and also requires a longer processing "window" of sound samples used by +the processing algorithm, thus increasing the algorithm input/output +latency. Typical i/o latency for the SoundTouch time-stretch algorithm +is around 100 ms.</p> +<p>Sample rate transposing and time-stretching are then used together +to produce the tempo, pitch and rate controls:</p> +<ul> + <li> <strong>'Tempo'</strong> control is implemented purely by +time-stretching. </li> + <li> <strong>'Rate</strong>' control is implemented purely by sample +rate transposing. </li> + <li> <strong>'Pitch</strong>' control is implemented as a +combination of time-stretching and sample rate transposing. For +example, to increase pitch the audio stream is first time-stretched to +longer duration (without affecting pitch) and then transposed back to +original duration by sample rate transposing, which simultaneously +reduces duration and increases pitch. The result is original duration +but increased pitch.</li> +</ul> +<h3>3.4 Tuning the algorithm parameters</h3> +<p>The time-stretch algorithm has few parameters that can be tuned to +optimize sound quality for certain application. The current default +parameters have been chosen by iterative if-then analysis (read: "trial +and error") to obtain best subjective sound quality in pop/rock music +processing, but in applications processing different kind of sound the +default parameter set may result into a sub-optimal result.</p> +<p>The time-stretch algorithm default parameter values are set by the +following #defines in file "TDStretch.h":</p> +<blockquote> + <pre>#define DEFAULT_SEQUENCE_MS AUTOMATIC<br>#define DEFAULT_SEEKWINDOW_MS AUTOMATIC<br>#define DEFAULT_OVERLAP_MS 8</pre> +</blockquote> +<p>These parameters affect to the time-stretch algorithm as follows:</p> +<ul> + <li> <strong>DEFAULT_SEQUENCE_MS</strong>: This is the default +length of a single processing sequence in milliseconds which determines +the how the original sound is chopped in the time-stretch algorithm. +Larger values mean fewer sequences are used in processing. In principle +a larger value sounds better when slowing down the tempo, but worse +when increasing the tempo and vice versa. <br> + <br> +By default, this setting value is calculated automatically according to +tempo value.<br> + </li> + <li> <strong>DEFAULT_SEEKWINDOW_MS</strong>: The seeking window +default length in milliseconds is for the algorithm that seeks the best +possible overlapping location. This determines from how wide a sample +"window" the algorithm can use to find an optimal mixing location when +the sound sequences are to be linked back together. <br> + <br> +The bigger this window setting is, the higher the possibility to find a +better mixing position becomes, but at the same time large values may +cause a "drifting" sound artifact because neighboring sequences can be +chosen at more uneven intervals. If there's a disturbing artifact that +sounds as if a constant frequency was drifting around, try reducing +this setting.<br> + <br> +By default, this setting value is calculated automatically according to +tempo value.<br> + </li> + <li> <strong>DEFAULT_OVERLAP_MS</strong>: Overlap length in +milliseconds. When the sound sequences are mixed back together to form +again a continuous sound stream, this parameter defines how much the +ends of the consecutive sequences will overlap with each other.<br> + <br> +This shouldn't be that critical parameter. If you reduce the +DEFAULT_SEQUENCE_MS setting by a large amount, you might wish to try a +smaller value on this.</li> +</ul> +<p>Notice that these parameters can also be set during execution time +with functions "<strong>TDStretch::setParameters()</strong>" and "<strong>SoundTouch::setSetting()</strong>".</p> +<p>The table below summaries how the parameters can be adjusted for +different applications:</p> +<table border="1"> + <tbody> + <tr> + <td valign="top"><strong>Parameter name</strong></td> + <td valign="top"><strong>Default value magnitude</strong></td> + <td valign="top"><strong>Larger value affects...</strong></td> + <td valign="top"><strong>Smaller value affects...</strong></td> + <td valign="top"><strong>Effect to CPU burden</strong></td> + </tr> + <tr> + <td valign="top"> + <pre>SEQUENCE_MS</pre> + </td> + <td valign="top">Default value is relatively large, chosen for +slowing down music tempo</td> + <td valign="top">Larger value is usually better for slowing down +tempo. Growing the value decelerates the "echoing" artifact when +slowing down the tempo.</td> + <td valign="top">Smaller value might be better for speeding up +tempo. Reducing the value accelerates the "echoing" artifact when +slowing down the tempo </td> + <td valign="top">Increasing the parameter value reduces +computation burden</td> + </tr> + <tr> + <td valign="top"> + <pre>SEEKWINDOW_MS</pre> + </td> + <td valign="top">Default value is relatively large, chosen for +slowing down music tempo</td> + <td valign="top">Larger value eases finding a good mixing +position, but may cause a "drifting" artifact</td> + <td valign="top">Smaller reduce possibility to find a good mixing +position, but reduce the "drifting" artifact.</td> + <td valign="top">Increasing the parameter value increases +computation burden</td> + </tr> + <tr> + <td valign="top"> + <pre>OVERLAP_MS</pre> + </td> + <td valign="top">Default value is relatively large, chosen to +suit with above parameters.</td> + <td valign="top"> </td> + <td valign="top">If you reduce the "sequence ms" setting, you +might wish to try a smaller value.</td> + <td valign="top">Increasing the parameter value increases +computation burden</td> + </tr> + </tbody> +</table> +<h3>3.5 Performance Optimizations </h3> +<p><strong>General optimizations:</strong></p> +<p>The time-stretch routine has a 'quick' mode that substantially +speeds up the algorithm but may degrade the sound quality by a small +amount. This mode is activated by calling SoundTouch::setSetting() +function with parameter id of SETTING_USE_QUICKSEEK and value +"1", i.e. </p> +<blockquote> + <p>setSetting(SETTING_USE_QUICKSEEK, 1);</p> +</blockquote> +<p><strong>CPU-specific optimizations:</strong></p> +<ul> + <li> Intel MMX optimized routines are used with compatible CPUs when +16bit integer sample type is used. MMX optimizations are available both +in Win32 and Gnu/x86 platforms. Compatible processors are Intel +PentiumMMX and later; AMD K6-2, Athlon and later. </li> + <li> Intel SSE optimized routines are used with compatible CPUs when +floating point sample type is used. SSE optimizations are currently +implemented for Win32 platform only. Processors compatible with SSE +extension are Intel processors starting from Pentium-III, and AMD +processors starting from Athlon XP. </li> + <li> AMD 3DNow! optimized routines are used with compatible CPUs when +floating point sample type is used, but SSE extension isn't supported . +3DNow! optimizations are currently implemented for Win32 platform only. +These optimizations are used in AMD K6-2 and Athlon (classic) CPU's; +better performing SSE routines are used with AMD processor starting +from Athlon XP. </li> +</ul> +<hr> +<h2><a name="SoundStretch"></a>4. SoundStretch audio processing utility +</h2> +<p>SoundStretch audio processing utility<br> + Copyright (c) Olli Parviainen 2002-2012</p> +<p>SoundStretch is a simple command-line application that can change +tempo, pitch and playback rates of WAV sound files. This program is +intended primarily to demonstrate how the "SoundTouch" library can be +used to process sound in your own program, but it can as well be used +for processing sound files.</p> +<h3>4.1. SoundStretch Usage Instructions</h3> +<p>SoundStretch Usage syntax:</p> +<blockquote> + <pre>soundstretch infilename outfilename [switches]</pre> +</blockquote> +<p>Where: </p> +<table width="100%" border="0" cellpadding="2"> + <tbody> + <tr> + <td valign="top"> + <pre>"infilename"</pre> + </td> + <td valign="top">Name of the input sound data file (in .WAV audio +file format). Give "stdin" as filename to use standard input pipe. </td> + </tr> + <tr> + <td valign="top"> + <pre>"outfilename"</pre> + </td> + <td valign="top">Name of the output sound file where the +resulting sound is saved (in .WAV audio file format). This parameter +may be omitted if you don't want to save the output (e.g. when +only calculating BPM rate with '-bpm' switch). Give "stdout" as +filename to use standard output pipe.</td> + </tr> + <tr> + <td valign="top"> + <pre> [switches]</pre> + </td> + <td valign="top">Are one or more control switches.</td> + </tr> + </tbody> +</table> +<p>Available control switches are:</p> +<table width="100%" border="0" cellpadding="2"> + <tbody> + <tr> + <td valign="top"> + <pre>-tempo=n </pre> + </td> + <td valign="top">Change the sound tempo by n percents (n = -95.0 +.. +5000.0 %) </td> + </tr> + <tr> + <td valign="top"> + <pre>-pitch=n</pre> + </td> + <td valign="top">Change the sound pitch by n semitones (n = -60.0 +.. + 60.0 semitones) </td> + </tr> + <tr> + <td valign="top"> + <pre>-rate=n</pre> + </td> + <td valign="top">Change the sound playback rate by n percents (n += -95.0 .. +5000.0 %) </td> + </tr> + <tr> + <td valign="top"> + <pre>-bpm=n</pre> + </td> + <td valign="top">Detect the Beats-Per-Minute (BPM) rate of the +sound and adjust the tempo to meet 'n' BPMs. When this switch is +applied, the "-tempo" switch is ignored. If "=n" is omitted, i.e. +switch "-bpm" is used alone, then the BPM rate is estimated and +displayed, but tempo not adjusted according to the BPM value. </td> + </tr> + <tr> + <td valign="top"> + <pre>-quick</pre> + </td> + <td valign="top">Use quicker tempo change algorithm. Gains speed +but loses sound quality. </td> + </tr> + <tr> + <td valign="top"> + <pre>-naa</pre> + </td> + <td valign="top">Don't use anti-alias filtering in sample rate +transposing. Gains speed but loses sound quality. </td> + </tr> + <tr> + <td valign="top"> + <pre>-license</pre> + </td> + <td valign="top">Displays the program license text (LGPL)</td> + </tr> + </tbody> +</table> +<p>Notes:</p> +<ul> + <li> To use standard input/output pipes for processing, give "stdin" +and "stdout" as input/output filenames correspondingly. The standard +input/output pipes will still carry the audio data in .wav audio file +format. </li> + <li> The numerical switches allow both integer (e.g. "-tempo=123") +and decimal (e.g. "-tempo=123.45") numbers. </li> + <li> The "-naa" and/or "-quick" switches can be used to reduce CPU +usage while compromising some sound quality </li> + <li> The BPM detection algorithm works by detecting repeating bass or +drum patterns at low frequencies of <250Hz. A lower-than-expected +BPM figure may be reported for music with uneven or complex bass +patterns. </li> +</ul> +<h3>4.2. SoundStretch usage examples </h3> +<p><strong>Example 1</strong></p> +<p>The following command increases tempo of the sound file +"originalfile.wav" by 12.5% and stores result to file +"destinationfile.wav":</p> +<blockquote> + <pre>soundstretch originalfile.wav destinationfile.wav -tempo=12.5</pre> +</blockquote> +<p><strong>Example 2</strong></p> +<p>The following command decreases the sound pitch (key) of the sound +file "orig.wav" by two semitones and stores the result to file +"dest.wav":</p> +<blockquote> + <pre>soundstretch orig.wav dest.wav -pitch=-2</pre> +</blockquote> +<p><strong>Example 3</strong></p> +<p>The following command processes the file "orig.wav" by decreasing +the sound tempo by 25.3% and increasing the sound pitch (key) by 1.5 +semitones. Resulting .wav audio data is directed to standard output +pipe:</p> +<blockquote> + <pre>soundstretch orig.wav stdout -tempo=-25.3 -pitch=1.5</pre> +</blockquote> +<p><strong>Example 4</strong></p> +<p>The following command detects the BPM rate of the file "orig.wav" +and adjusts the tempo to match 100 beats per minute. Result is stored +to file "dest.wav":</p> +<blockquote> + <pre>soundstretch orig.wav dest.wav -bpm=100</pre> +</blockquote> +<p><strong>Example 5</strong></p> +<p>The following command reads .wav sound data from standard input pipe +and estimates the BPM rate:</p> +<blockquote> + <pre>soundstretch stdin -bpm</pre> +</blockquote> +<hr> +<h2>5. Change History</h2> +<h3>5.1. SoundTouch library Change History </h3> +<p><b>1.8.0:</b></p> +<ul> + <li>Added support for multi-channel audio processing</li> + <li>Added support for <b>cubic</b> and <b>shannon</b> interpolation for rate and pitch shift effects besides + the original <b>linear</b> interpolation, to reduce aliasing at high frequencies due to interpolation. + Cubic interpolation is used as default for floating point processing, and linear interpolation for integer + processing.</li> + <li>Fixed bug in anti-alias filtering that limited stop-band attenuation to -10 dB instead of <-50dB, and + increased filter length from 32 to 64 taps to further reduce aliasing due to frequency folding.</li> + <li>Performance improvements in cross-correlation algorithm</li> + <li>Other bug and compatibility fixes</li> +</ul> +<p><b>1.7.1:</b></p> +<ul> + <li>Added files for Android compilation +</ul> +<p><b>1.7.0:</b></p> +<ul> + <li>Sound quality improvements/li> + <li>Improved flush() to adjust output sound stream duration to match better with + ideal duration</li> + <li>Rewrote x86 cpu feature check to resolve compatibility problems</li> + <li>Configure script automatically checks if CPU supports mmx & sse compatibility for GNU platform, and + the script support now "--enable-x86-optimizations" switch to allow disabling x86-specific optimizations.</li> + <li>Revised #define conditions for 32bit/64bit compatibility</li> + <li>gnu autoconf/automake script compatibility fixes</li> + <li>Tuned beat-per-minute detection algorithm</li> +</ul> +<p><b>1.6.0:</b></p> +<ul> + <li> Added automatic cutoff threshold adaptation to beat detection +routine to better adapt BPM calculation to different types of music </li> + <li> Retired 3DNow! optimization support as 3DNow! is nowadays +obsoleted and assembler code is nuisance to maintain</li> + <li>Retired "configure" file from source code package due to +autoconf/automake versio conflicts, so that it is from now on to be +generated by invoking "boostrap" script that uses locally available +toolchain version for generating the "configure" file</li> + <li>Resolved namespace/label naming conflicts with other libraries by +replacing global labels such as INTEGER_SAMPLES with more specific +SOUNDTOUCH_INTEGER_SAMPLES etc.<br> + </li> + <li>Updated windows build scripts & project files for Visual +Studio 2008 support</li> + <li> Updated SoundTouch.dll API for .NET compatibility</li> + <li> Added API for querying nominal processing input & output +sample batch sizes</li> +</ul> +<p><strong>1.5.0:</strong></p> +<ul> + <li> Added normalization to correlation calculation and improvement +automatic seek/sequence parameter calculation to improve sound quality </li> + <li> Bugfixes: + <ul> + <li> Fixed negative array indexing in quick seek algorithm </li> + <li> FIR autoalias filter running too far in processing buffer </li> + <li> Check against zero sample count in rate transposing </li> + <li> Fix for x86-64 support: Removed pop/push instructions from +the cpu detection algorithm. </li> + <li> Check against empty buffers in FIFOSampleBuffer </li> + <li> Other minor fixes & code cleanup</li> + </ul> + </li> + <li> Fixes in compilation scripts for non-Intel platforms </li> + <li> Added Dynamic-Link-Library (DLL) version of SoundTouch library +build, provided with Delphi/Pascal wrapper for calling the dll routines + </li> + <li> Added #define PREVENT_CLICK_AT_RATE_CROSSOVER that prevents a +click artifact when crossing the nominal pitch from either positive to +negative side or vice versa</li> +</ul> +<p><strong>1.4.1:</strong></p> +<ul> + <li> Fixed a buffer overflow bug in BPM detect algorithm routines if +processing more than 2048 samples at one call ... [truncated message content] |
From: <man...@us...> - 2014-06-10 16:27:49
|
Revision: 4095 http://sourceforge.net/p/modplug/code/4095 Author: manxorist Date: 2014-06-10 16:27:31 +0000 (Tue, 10 Jun 2014) Log Message: ----------- [Ref] Move compiler-/platform-dependent Endianness.h from soundlib/ into common/ . serialization_utils.* and generic endian-safe IO functions will need this. [Fix] Fix some file paths in VS2008 project file. VS2008 decided to reorder configuration sections while at it. Leave it that way in the hope that it does not do this again. [Ref] Only include Endianness.h where needed. Modified Paths: -------------- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj.filters trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj.filters trunk/OpenMPT/mptrack/mptrack_08.vcproj trunk/OpenMPT/mptrack/mptrack_10.vcxproj trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters trunk/OpenMPT/soundlib/FileReader.h trunk/OpenMPT/soundlib/SampleFormatConverters.h trunk/OpenMPT/soundlib/Wav.h trunk/OpenMPT/soundlib/plugins/PlugInterface.h Added Paths: ----------- trunk/OpenMPT/common/Endianness.h Removed Paths: ------------- trunk/OpenMPT/soundlib/Endianness.h Copied: trunk/OpenMPT/common/Endianness.h (from rev 4094, trunk/OpenMPT/soundlib/Endianness.h) =================================================================== --- trunk/OpenMPT/common/Endianness.h (rev 0) +++ trunk/OpenMPT/common/Endianness.h 2014-06-10 16:27:31 UTC (rev 4095) @@ -0,0 +1,303 @@ +/* + * Endianness.h + * ------------ + * Purpose: Code for deadling with endianness. + * Notes : VC++ didn't like my compile-time endianness check - or rather, it didn't decide at compile time. ;_; + * Authors: OpenMPT Devs + * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. + */ + + +#pragma once + +OPENMPT_NAMESPACE_BEGIN + +// Ending swaps: +// BigEndian(x) may be used either to: +// -Convert DWORD x, which is in big endian format(for example read from file), +// to endian format of current architecture. +// -Convert value x from endian format of current architecture to big endian format. +// Similarly LittleEndian(x) converts known little endian format to format of current +// endian architecture or value x in format of current architecture to little endian +// format. + +#if MPT_COMPILER_GCC +#if MPT_GCC_AT_LEAST(4,3,0) +#define bswap32 __builtin_bswap32 +#endif +#elif MPT_COMPILER_MSVC +#include <intrin.h> +#define bswap16 _byteswap_ushort +#define bswap32 _byteswap_ulong +#endif + +// No intrinsics available +#ifndef bswap16 +#define bswap16(x) (((x >> 8) & 0xFF) | ((x << 8) & 0xFF00)) +#endif +#ifndef bswap32 +#define bswap32(x) (((x & 0xFF) << 24) | ((x & 0xFF00) << 8) | ((x & 0xFF0000) >> 8) | ((x & 0xFF000000) >> 24)) +#endif + +// Deprecated. Use "SwapBytesXX" versions below. +#ifdef MPT_PLATFORM_BIG_ENDIAN +inline uint32 LittleEndian(uint32 x) { return bswap32(x); } +inline uint16 LittleEndianW(uint16 x) { return bswap16(x); } +#define BigEndian(x) (x) +#define BigEndianW(x) (x) +#else +inline uint32 BigEndian(uint32 x) { return bswap32(x); } +inline uint16 BigEndianW(uint16 x) { return bswap16(x); } +#define LittleEndian(x) (x) +#define LittleEndianW(x) (x) +#endif + +#if defined(MPT_PLATFORM_BIG_ENDIAN) +#define bswap32le(x) bswap32(x) +#define bswap16le(x) bswap16(x) +#define bswap32be(x) (x) +#define bswap16be(x) (x) +#elif defined(MPT_PLATFORM_LITTLE_ENDIAN) +#define bswap32be(x) bswap32(x) +#define bswap16be(x) bswap16(x) +#define bswap32le(x) (x) +#define bswap16le(x) (x) +#endif + +inline uint32 SwapBytesBE_(uint32 value) { return bswap32be(value); } +inline uint16 SwapBytesBE_(uint16 value) { return bswap16be(value); } +inline uint32 SwapBytesLE_(uint32 value) { return bswap32le(value); } +inline uint16 SwapBytesLE_(uint16 value) { return bswap16le(value); } +inline int32 SwapBytesBE_(int32 value) { return bswap32be(value); } +inline int16 SwapBytesBE_(int16 value) { return bswap16be(value); } +inline int32 SwapBytesLE_(int32 value) { return bswap32le(value); } +inline int16 SwapBytesLE_(int16 value) { return bswap16le(value); } + +// Do NOT remove these overloads, even if they seem useless. +// We do not want risking to extend 8bit integers to int and then +// endian-converting and casting back to int. +// Thus these overloads. +inline uint8 SwapBytesLE_(uint8 value) { return value; } +inline int8 SwapBytesLE_(int8 value) { return value; } +inline char SwapBytesLE_(char value) { return value; } +inline uint8 SwapBytesBE_(uint8 value) { return value; } +inline int8 SwapBytesBE_(int8 value) { return value; } +inline char SwapBytesBE_(char value) { return value; } + +// SwapBytesLE/SwapBytesBE is mostly used throughout the code with in-place +// argument-modifying semantics. +// As GCC will not bind references to members of packed structures, +// we implement reference semantics by explicitly assigning to a macro +// argument. + +// In-place modifying version: +#define SwapBytesBE(value) do { (value) = SwapBytesBE_((value)); } while(0) +#define SwapBytesLE(value) do { (value) = SwapBytesLE_((value)); } while(0) + +// Alternative, function-style syntax: +#define SwapBytesReturnBE(value) SwapBytesBE_((value)) +#define SwapBytesReturnLE(value) SwapBytesLE_((value)) + +#undef bswap16le +#undef bswap32le +#undef bswap16be +#undef bswap32be +#undef bswap16 +#undef bswap32 + + +// 1.0f --> 0x3f800000u +static forceinline uint32 EncodeIEEE754binary32(float32 f) +{ +#if MPT_PLATFORM_IEEE_FLOAT + STATIC_ASSERT(sizeof(uint32) == sizeof(float32)); + #if MPT_COMPILER_UNION_TYPE_ALIASES + union { + float32 f; + uint32 i; + } conv; + conv.f = f; + return conv.i; + #else + uint32 i = 0; + std::memcpy(&i, &f, sizeof(float32)); + return i; + #endif +#else + #error "IEEE754 single precision float support is required (for now)" +#endif +} + +// 0x3f800000u --> 1.0f +static forceinline float32 DecodeIEEE754binary32(uint32 i) +{ +#if MPT_PLATFORM_IEEE_FLOAT + STATIC_ASSERT(sizeof(uint32) == sizeof(float32)); + #if MPT_COMPILER_UNION_TYPE_ALIASES + union { + uint32 i; + float32 f; + } conv; + conv.i = i; + return conv.f; + #else + float32 f = 0.0f; + std::memcpy(&f, &i, sizeof(float32)); + return f; + #endif +#else + #error "IEEE754 single precision float support is required (for now)" +#endif +} + + +// template parameters are byte indices corresponding to the individual bytes of iee754 in memory +template<std::size_t hihi, std::size_t hilo, std::size_t lohi, std::size_t lolo> +struct IEEE754binary32Emulated +{ +private: + typedef IEEE754binary32Emulated<hihi,hilo,lohi,lolo> self_t; + uint8 bytes[4]; +public: + forceinline uint8 GetByte(std::size_t i) const + { + return bytes[i]; + } + forceinline IEEE754binary32Emulated() { } + forceinline explicit IEEE754binary32Emulated(float32 f) + { + SetInt32(EncodeIEEE754binary32(f)); + } + // b0...b3 are in memory order, i.e. depend on the endianness of this type + // little endian: (0x00,0x00,0x80,0x3f) + // big endian: (0x3f,0x80,0x00,0x00) + forceinline explicit IEEE754binary32Emulated(uint8 b0, uint8 b1, uint8 b2, uint8 b3) + { + bytes[0] = b0; + bytes[1] = b1; + bytes[2] = b2; + bytes[3] = b3; + } + forceinline operator float32 () const + { + return DecodeIEEE754binary32(GetInt32()); + } + forceinline self_t & SetInt32(uint32 i) + { + bytes[hihi] = static_cast<uint8>(i >> 24); + bytes[hilo] = static_cast<uint8>(i >> 16); + bytes[lohi] = static_cast<uint8>(i >> 8); + bytes[lolo] = static_cast<uint8>(i >> 0); + return *this; + } + forceinline uint32 GetInt32() const + { + return 0u + | (static_cast<uint32>(bytes[hihi]) << 24) + | (static_cast<uint32>(bytes[hilo]) << 16) + | (static_cast<uint32>(bytes[lohi]) << 8) + | (static_cast<uint32>(bytes[lolo]) << 0) + ; + } + forceinline bool operator == (const self_t &cmp) const + { + return true + && bytes[0] == cmp.bytes[0] + && bytes[1] == cmp.bytes[1] + && bytes[2] == cmp.bytes[2] + && bytes[3] == cmp.bytes[3] + ; + } + forceinline bool operator != (const self_t &cmp) const + { + return !(*this == cmp); + } +}; + +#if MPT_PLATFORM_IEEE_FLOAT + +struct IEEE754binary32Native +{ +private: + float32 value; +public: + forceinline uint8 GetByte(std::size_t i) const + { + #if defined(MPT_PLATFORM_LITTLE_ENDIAN) + return static_cast<uint8>(EncodeIEEE754binary32(value) >> (i*8)); + #elif defined(MPT_PLATFORM_BIG_ENDIAN) + return static_cast<uint8>(EncodeIEEE754binary32(value) >> ((4-1-i)*8)); + #else + STATIC_ASSERT(false); + #endif + } + forceinline IEEE754binary32Native() { } + forceinline explicit IEEE754binary32Native(float32 f) + { + value = f; + } + // b0...b3 are in memory order, i.e. depend on the endianness of this type + // little endian: (0x00,0x00,0x80,0x3f) + // big endian: (0x3f,0x80,0x00,0x00) + forceinline explicit IEEE754binary32Native(uint8 b0, uint8 b1, uint8 b2, uint8 b3) + { + #if defined(MPT_PLATFORM_LITTLE_ENDIAN) + value = DecodeIEEE754binary32(0u + | (static_cast<uint32>(b0) << 0) + | (static_cast<uint32>(b1) << 8) + | (static_cast<uint32>(b2) << 16) + | (static_cast<uint32>(b3) << 24) + ); + #elif defined(MPT_PLATFORM_BIG_ENDIAN) + value = DecodeIEEE754binary32(0u + | (static_cast<uint32>(b0) << 24) + | (static_cast<uint32>(b1) << 16) + | (static_cast<uint32>(b2) << 8) + | (static_cast<uint32>(b3) << 0) + ); + #else + STATIC_ASSERT(false); + #endif + } + forceinline operator float32 () const + { + return value; + } + forceinline IEEE754binary32Native & SetInt32(uint32 i) + { + value = DecodeIEEE754binary32(i); + return *this; + } + forceinline uint32 GetInt32() const + { + return EncodeIEEE754binary32(value); + } + forceinline bool operator == (const IEEE754binary32Native &cmp) const + { + return value == cmp.value; + } + forceinline bool operator != (const IEEE754binary32Native &cmp) const + { + return value != cmp.value; + } +}; + +#if defined(MPT_PLATFORM_LITTLE_ENDIAN) +typedef IEEE754binary32Native IEEE754binary32LE; +typedef IEEE754binary32Emulated<0,1,2,3> IEEE754binary32BE; +#elif defined(MPT_PLATFORM_BIG_ENDIAN) +typedef IEEE754binary32Emulated<3,2,1,0> IEEE754binary32LE; +typedef IEEE754binary32Native IEEE754binary32BE; +#endif + +#else // !MPT_PLATFORM_IEEE_FLOAT + +typedef IEEE754binary32Emulated<3,2,1,0> IEEE754binary32LE; +typedef IEEE754binary32Emulated<0,1,2,3> IEEE754binary32BE; + +#endif // MPT_PLATFORM_IEEE_FLOAT + +STATIC_ASSERT(sizeof(IEEE754binary32LE) == 4); +STATIC_ASSERT(sizeof(IEEE754binary32BE) == 4); + +OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2014-06-10 10:59:09 UTC (rev 4094) +++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2014-06-10 16:27:31 UTC (rev 4095) @@ -179,6 +179,7 @@ <ClInclude Include="..\common\AudioCriticalSection.h" /> <ClInclude Include="..\common\BuildSettings.h" /> <ClInclude Include="..\common\CompilerDetect.h" /> + <ClInclude Include="..\common\Endianness.h" /> <ClInclude Include="..\common\FlagSet.h" /> <ClInclude Include="..\common\Logging.h" /> <ClInclude Include="..\common\misc_util.h" /> @@ -200,7 +201,6 @@ <ClInclude Include="..\soundlib\ChunkReader.h" /> <ClInclude Include="..\soundlib\Dither.h" /> <ClInclude Include="..\soundlib\Dlsbank.h" /> - <ClInclude Include="..\soundlib\Endianness.h" /> <ClInclude Include="..\soundlib\FileReader.h" /> <ClInclude Include="..\soundlib\FloatMixer.h" /> <ClInclude Include="..\soundlib\IntMixer.h" /> Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters 2014-06-10 10:59:09 UTC (rev 4094) +++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters 2014-06-10 16:27:31 UTC (rev 4095) @@ -74,9 +74,6 @@ <ClInclude Include="..\soundlib\Dlsbank.h"> <Filter>Header Files\soundlib</Filter> </ClInclude> - <ClInclude Include="..\soundlib\Endianness.h"> - <Filter>Header Files\soundlib</Filter> - </ClInclude> <ClInclude Include="..\soundlib\FileReader.h"> <Filter>Header Files\soundlib</Filter> </ClInclude> @@ -266,6 +263,9 @@ <ClInclude Include="..\test\TestToolsTracker.h"> <Filter>Header Files\test</Filter> </ClInclude> + <ClInclude Include="..\common\Endianness.h"> + <Filter>Header Files\common</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ClCompile Include="..\common\AudioCriticalSection.cpp"> Modified: trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj 2014-06-10 10:59:09 UTC (rev 4094) +++ trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj 2014-06-10 16:27:31 UTC (rev 4095) @@ -187,6 +187,7 @@ <ClInclude Include="..\common\AudioCriticalSection.h" /> <ClInclude Include="..\common\BuildSettings.h" /> <ClInclude Include="..\common\CompilerDetect.h" /> + <ClInclude Include="..\common\Endianness.h" /> <ClInclude Include="..\common\FlagSet.h" /> <ClInclude Include="..\common\Logging.h" /> <ClInclude Include="..\common\misc_util.h" /> @@ -208,7 +209,6 @@ <ClInclude Include="..\soundlib\ChunkReader.h" /> <ClInclude Include="..\soundlib\Dither.h" /> <ClInclude Include="..\soundlib\Dlsbank.h" /> - <ClInclude Include="..\soundlib\Endianness.h" /> <ClInclude Include="..\soundlib\FileReader.h" /> <ClInclude Include="..\soundlib\FloatMixer.h" /> <ClInclude Include="..\soundlib\IntMixer.h" /> Modified: trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj.filters =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj.filters 2014-06-10 10:59:09 UTC (rev 4094) +++ trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj.filters 2014-06-10 16:27:31 UTC (rev 4095) @@ -74,9 +74,6 @@ <ClInclude Include="..\soundlib\Dlsbank.h"> <Filter>Header Files\soundlib</Filter> </ClInclude> - <ClInclude Include="..\soundlib\Endianness.h"> - <Filter>Header Files\soundlib</Filter> - </ClInclude> <ClInclude Include="..\soundlib\FileReader.h"> <Filter>Header Files\soundlib</Filter> </ClInclude> @@ -272,6 +269,9 @@ <ClInclude Include="..\test\TestToolsTracker.h"> <Filter>Header Files\test</Filter> </ClInclude> + <ClInclude Include="..\common\Endianness.h"> + <Filter>Header Files\common</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ClCompile Include="..\common\AudioCriticalSection.cpp"> Modified: trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj 2014-06-10 10:59:09 UTC (rev 4094) +++ trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj 2014-06-10 16:27:31 UTC (rev 4095) @@ -183,6 +183,7 @@ <ClInclude Include="..\common\AudioCriticalSection.h" /> <ClInclude Include="..\common\BuildSettings.h" /> <ClInclude Include="..\common\CompilerDetect.h" /> + <ClInclude Include="..\common\Endianness.h" /> <ClInclude Include="..\common\FlagSet.h" /> <ClInclude Include="..\common\Logging.h" /> <ClInclude Include="..\common\misc_util.h" /> @@ -204,7 +205,6 @@ <ClInclude Include="..\soundlib\ChunkReader.h" /> <ClInclude Include="..\soundlib\Dither.h" /> <ClInclude Include="..\soundlib\Dlsbank.h" /> - <ClInclude Include="..\soundlib\Endianness.h" /> <ClInclude Include="..\soundlib\FileReader.h" /> <ClInclude Include="..\soundlib\FloatMixer.h" /> <ClInclude Include="..\soundlib\IntMixer.h" /> Modified: trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj.filters =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj.filters 2014-06-10 10:59:09 UTC (rev 4094) +++ trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj.filters 2014-06-10 16:27:31 UTC (rev 4095) @@ -74,9 +74,6 @@ <ClInclude Include="..\soundlib\Dlsbank.h"> <Filter>Header Files\soundlib</Filter> </ClInclude> - <ClInclude Include="..\soundlib\Endianness.h"> - <Filter>Header Files\soundlib</Filter> - </ClInclude> <ClInclude Include="..\soundlib\FileReader.h"> <Filter>Header Files\soundlib</Filter> </ClInclude> @@ -266,6 +263,9 @@ <ClInclude Include="..\test\TestToolsTracker.h"> <Filter>Header Files\test</Filter> </ClInclude> + <ClInclude Include="..\common\Endianness.h"> + <Filter>Header Files\common</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ClCompile Include="..\common\AudioCriticalSection.cpp"> Modified: trunk/OpenMPT/mptrack/mptrack_08.vcproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack_08.vcproj 2014-06-10 10:59:09 UTC (rev 4094) +++ trunk/OpenMPT/mptrack/mptrack_08.vcproj 2014-06-10 16:27:31 UTC (rev 4095) @@ -120,14 +120,13 @@ /> </Configuration> <Configuration - Name="Release|Win32" - OutputDirectory="..\bin\$(PlatformName)\" - IntermediateDirectory="..\build\obj\$(ProjectName)\$(PlatformName)\$(ConfigurationName)" + Name="Debug|x64" + OutputDirectory="$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - UseOfMFC="1" + UseOfMFC="2" ATLMinimizesCRunTimeLibraryUsage="false" - WholeProgramOptimization="1" > <Tool Name="VCPreBuildEventTool" @@ -144,26 +143,27 @@ /> <Tool Name="VCMIDLTool" - PreprocessorDefinitions="NDEBUG" + PreprocessorDefinitions="_DEBUG" MkTypLibCompatible="true" SuppressStartupBanner="true" - TargetEnvironment="1" - TypeLibraryName=".\Bin/mptrack.tlb" + TargetEnvironment="3" + TypeLibraryName=".\Debug/mptrack.tlb" /> <Tool Name="VCCLCompilerTool" - Optimization="2" - InlineFunctionExpansion="2" + Optimization="0" AdditionalIncludeDirectories="..\common;..\soundlib;..\include\msinttypes\stdint;..\include\msinttypes\inttypes;..\include;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;..\mptrack\svn_version;..\common\svn_version_default" - PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS,MODPLUG_TRACKER" + PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,MODPLUG_TRACKER" StringPooling="true" ExceptionHandling="2" - RuntimeLibrary="0" + BasicRuntimeChecks="3" + RuntimeLibrary="3" BufferSecurityCheck="true" - EnableFunctionLevelLinking="false" + EnableFunctionLevelLinking="true" UsePrecompiledHeader="2" PrecompiledHeaderThrough="stdafx.h" - WarningLevel="3" + BrowseInformation="1" + WarningLevel="4" SuppressStartupBanner="false" DebugInformationFormat="3" CompileAs="0" @@ -173,7 +173,7 @@ /> <Tool Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" + PreprocessorDefinitions="_DEBUG" Culture="1033" /> <Tool @@ -181,20 +181,20 @@ /> <Tool Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib version.lib Rpcrt4.lib delayimp.lib wininet.lib dsound.lib msacm32.lib ksguid.lib ksuser.lib htmlhelp.lib" + AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib version.lib Rpcrt4.lib delayimp.lib dsound.lib msacm32.lib ksguid.lib ksuser.lib htmlhelp.lib" Version="5.0" - LinkIncremental="1" + LinkIncremental="2" SuppressStartupBanner="true" AdditionalLibraryDirectories="" DelayLoadDLLs="OpenMPT_SoundTouch_f32.dll" GenerateDebugInformation="true" + AssemblyDebug="1" + GenerateMapFile="true" SubSystem="2" LargeAddressAware="2" - OptimizeReferences="2" - EnableCOMDATFolding="2" - RandomizedBaseAddress="2" + RandomizedBaseAddress="1" DataExecutionPrevention="0" + TargetMachine="17" /> <Tool Name="VCALinkTool" @@ -220,13 +220,14 @@ /> </Configuration> <Configuration - Name="Debug|x64" - OutputDirectory="$(PlatformName)\$(ConfigurationName)" - IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + Name="Release|Win32" + OutputDirectory="..\bin\$(PlatformName)\" + IntermediateDirectory="..\build\obj\$(ProjectName)\$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - UseOfMFC="2" + UseOfMFC="1" ATLMinimizesCRunTimeLibraryUsage="false" + WholeProgramOptimization="1" > <Tool Name="VCPreBuildEventTool" @@ -243,27 +244,26 @@ /> <Tool Name="VCMIDLTool" - PreprocessorDefinitions="_DEBUG" + PreprocessorDefinitions="NDEBUG" MkTypLibCompatible="true" SuppressStartupBanner="true" - TargetEnvironment="3" - TypeLibraryName=".\Debug/mptrack.tlb" + TargetEnvironment="1" + TypeLibraryName=".\Bin/mptrack.tlb" /> <Tool Name="VCCLCompilerTool" - Optimization="0" + Optimization="2" + InlineFunctionExpansion="2" AdditionalIncludeDirectories="..\common;..\soundlib;..\include\msinttypes\stdint;..\include\msinttypes\inttypes;..\include;..\include\vstsdk2.4\;..\include\ASIOSDK2\common\;..\include\lhasa\lib\public;..\include\zlib;..\;..\mptrack\svn_version;..\common\svn_version_default" - PreprocessorDefinitions="_DEBUG,WIN32,_WINDOWS,MODPLUG_TRACKER" + PreprocessorDefinitions="NDEBUG,WIN32,_WINDOWS,MODPLUG_TRACKER" StringPooling="true" ExceptionHandling="2" - BasicRuntimeChecks="3" - RuntimeLibrary="3" + RuntimeLibrary="0" BufferSecurityCheck="true" - EnableFunctionLevelLinking="true" + EnableFunctionLevelLinking="false" UsePrecompiledHeader="2" PrecompiledHeaderThrough="stdafx.h" - BrowseInformation="1" - WarningLevel="4" + WarningLevel="3" SuppressStartupBanner="false" DebugInformationFormat="3" CompileAs="0" @@ -273,7 +273,7 @@ /> <Tool Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" + PreprocessorDefinitions="NDEBUG" Culture="1033" /> <Tool @@ -281,20 +281,20 @@ /> <Tool Name="VCLinkerTool" - AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib version.lib Rpcrt4.lib delayimp.lib dsound.lib msacm32.lib ksguid.lib ksuser.lib htmlhelp.lib" + AdditionalOptions="/MACHINE:I386" + AdditionalDependencies="winmm.lib strmiids.lib dmoguids.lib version.lib Rpcrt4.lib delayimp.lib wininet.lib dsound.lib msacm32.lib ksguid.lib ksuser.lib htmlhelp.lib" Version="5.0" - LinkIncremental="2" + LinkIncremental="1" SuppressStartupBanner="true" AdditionalLibraryDirectories="" DelayLoadDLLs="OpenMPT_SoundTouch_f32.dll" GenerateDebugInformation="true" - AssemblyDebug="1" - GenerateMapFile="true" SubSystem="2" LargeAddressAware="2" - RandomizedBaseAddress="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + RandomizedBaseAddress="2" DataExecutionPrevention="0" - TargetMachine="17" /> <Tool Name="VCALinkTool" @@ -791,7 +791,7 @@ /> </FileConfiguration> <FileConfiguration - Name="Release|Win32" + Name="Debug|x64" > <Tool Name="VCCLCompilerTool" @@ -799,7 +799,7 @@ /> </FileConfiguration> <FileConfiguration - Name="Debug|x64" + Name="Release|Win32" > <Tool Name="VCCLCompilerTool" @@ -1037,11 +1037,11 @@ > </File> <File - RelativePath=".\res\mptrack.png" + RelativePath=".\res\mptrack.ico" > </File> <File - RelativePath=".\res\mptrack.ico" + RelativePath=".\res\mptrack.png" > </File> <File @@ -1138,6 +1138,10 @@ > </File> <File + RelativePath=".\CImageListEx.h" + > + </File> + <File RelativePath=".\CleanupSong.h" > </File> @@ -1162,10 +1166,6 @@ > </File> <File - RelativePath=".\CImageListEx.h" - > - </File> - <File RelativePath=".\ctrl_com.h" > </File> @@ -1206,7 +1206,7 @@ > </File> <File - RelativePath="..\soundlib\Endianness.h" + RelativePath="..\common\Endianness.h" > </File> <File @@ -1382,19 +1382,19 @@ > </File> <File - RelativePath=".\PNG.h" + RelativePath="..\soundlib\plugins\PluginEventQueue.h" > </File> <File - RelativePath=".\soundlib\plugins\PluginEventQueue.h" + RelativePath="..\soundlib\plugins\PluginMixBuffer.h" > </File> <File - RelativePath=".\soundlib\plugins\PluginMixBuffer.h" + RelativePath="..\soundlib\plugins\PlugInterface.h" > </File> <File - RelativePath=".\soundlib\plugins\PlugInterface.h" + RelativePath=".\PNG.h" > </File> <File @@ -1514,11 +1514,11 @@ > </File> <File - RelativePath=".\svn_version\svn_version.h" + RelativePath="..\common\svn_version_default\svn_version.h" > </File> <File - RelativePath="..\common\svn_version_default\svn_version.h" + RelativePath=".\svn_version\svn_version.h" > </File> <File Modified: trunk/OpenMPT/mptrack/mptrack_10.vcxproj =================================================================== --- trunk/OpenMPT/mptrack/mptrack_10.vcxproj 2014-06-10 10:59:09 UTC (rev 4094) +++ trunk/OpenMPT/mptrack/mptrack_10.vcxproj 2014-06-10 16:27:31 UTC (rev 4095) @@ -642,6 +642,7 @@ <ClInclude Include="..\common\AudioCriticalSection.h" /> <ClInclude Include="..\common\BuildSettings.h" /> <ClInclude Include="..\common\CompilerDetect.h" /> + <ClInclude Include="..\common\Endianness.h" /> <ClInclude Include="..\common\FlagSet.h" /> <ClInclude Include="..\common\Logging.h" /> <ClInclude Include="..\common\misc_util.h" /> @@ -674,7 +675,6 @@ <ClInclude Include="..\soundlib\ChunkReader.h" /> <ClInclude Include="..\soundlib\Dither.h" /> <ClInclude Include="..\soundlib\Dlsbank.h" /> - <ClInclude Include="..\soundlib\Endianness.h" /> <ClInclude Include="..\soundlib\FileReader.h" /> <ClInclude Include="..\soundlib\FloatMixer.h" /> <ClInclude Include="..\soundlib\IntMixer.h" /> Modified: trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters =================================================================== --- trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters 2014-06-10 10:59:09 UTC (rev 4094) +++ trunk/OpenMPT/mptrack/mptrack_10.vcxproj.filters 2014-06-10 16:27:31 UTC (rev 4095) @@ -630,9 +630,6 @@ <ClInclude Include="..\soundlib\WindowedFIR.h"> <Filter>Header Files\soundlib</Filter> </ClInclude> - <ClInclude Include="..\soundlib\Endianness.h"> - <Filter>Header Files\soundlib</Filter> - </ClInclude> <ClInclude Include="..\soundlib\ITCompression.h"> <Filter>Header Files\soundlib</Filter> </ClInclude> @@ -1020,6 +1017,9 @@ <ClInclude Include="AboutDialog.h"> <Filter>Header Files\mptrack\Dialogs</Filter> </ClInclude> + <ClInclude Include="..\common\Endianness.h"> + <Filter>Header Files\common</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <None Include="res\bitmap1.bmp"> Deleted: trunk/OpenMPT/soundlib/Endianness.h =================================================================== --- trunk/OpenMPT/soundlib/Endianness.h 2014-06-10 10:59:09 UTC (rev 4094) +++ trunk/OpenMPT/soundlib/Endianness.h 2014-06-10 16:27:31 UTC (rev 4095) @@ -1,303 +0,0 @@ -/* - * Endianness.h - * ------------ - * Purpose: Code for deadling with endianness. - * Notes : VC++ didn't like my compile-time endianness check - or rather, it didn't decide at compile time. ;_; - * Authors: OpenMPT Devs - * The OpenMPT source code is released under the BSD license. Read LICENSE for more details. - */ - - -#pragma once - -OPENMPT_NAMESPACE_BEGIN - -// Ending swaps: -// BigEndian(x) may be used either to: -// -Convert DWORD x, which is in big endian format(for example read from file), -// to endian format of current architecture. -// -Convert value x from endian format of current architecture to big endian format. -// Similarly LittleEndian(x) converts known little endian format to format of current -// endian architecture or value x in format of current architecture to little endian -// format. - -#if MPT_COMPILER_GCC -#if MPT_GCC_AT_LEAST(4,3,0) -#define bswap32 __builtin_bswap32 -#endif -#elif MPT_COMPILER_MSVC -#include <intrin.h> -#define bswap16 _byteswap_ushort -#define bswap32 _byteswap_ulong -#endif - -// No intrinsics available -#ifndef bswap16 -#define bswap16(x) (((x >> 8) & 0xFF) | ((x << 8) & 0xFF00)) -#endif -#ifndef bswap32 -#define bswap32(x) (((x & 0xFF) << 24) | ((x & 0xFF00) << 8) | ((x & 0xFF0000) >> 8) | ((x & 0xFF000000) >> 24)) -#endif - -// Deprecated. Use "SwapBytesXX" versions below. -#ifdef MPT_PLATFORM_BIG_ENDIAN -inline uint32 LittleEndian(uint32 x) { return bswap32(x); } -inline uint16 LittleEndianW(uint16 x) { return bswap16(x); } -#define BigEndian(x) (x) -#define BigEndianW(x) (x) -#else -inline uint32 BigEndian(uint32 x) { return bswap32(x); } -inline uint16 BigEndianW(uint16 x) { return bswap16(x); } -#define LittleEndian(x) (x) -#define LittleEndianW(x) (x) -#endif - -#if defined(MPT_PLATFORM_BIG_ENDIAN) -#define bswap32le(x) bswap32(x) -#define bswap16le(x) bswap16(x) -#define bswap32be(x) (x) -#define bswap16be(x) (x) -#elif defined(MPT_PLATFORM_LITTLE_ENDIAN) -#define bswap32be(x) bswap32(x) -#define bswap16be(x) bswap16(x) -#define bswap32le(x) (x) -#define bswap16le(x) (x) -#endif - -inline uint32 SwapBytesBE_(uint32 value) { return bswap32be(value); } -inline uint16 SwapBytesBE_(uint16 value) { return bswap16be(value); } -inline uint32 SwapBytesLE_(uint32 value) { return bswap32le(value); } -inline uint16 SwapBytesLE_(uint16 value) { return bswap16le(value); } -inline int32 SwapBytesBE_(int32 value) { return bswap32be(value); } -inline int16 SwapBytesBE_(int16 value) { return bswap16be(value); } -inline int32 SwapBytesLE_(int32 value) { return bswap32le(value); } -inline int16 SwapBytesLE_(int16 value) { return bswap16le(value); } - -// Do NOT remove these overloads, even if they seem useless. -// We do not want risking to extend 8bit integers to int and then -// endian-converting and casting back to int. -// Thus these overloads. -inline uint8 SwapBytesLE_(uint8 value) { return value; } -inline int8 SwapBytesLE_(int8 value) { return value; } -inline char SwapBytesLE_(char value) { return value; } -inline uint8 SwapBytesBE_(uint8 value) { return value; } -inline int8 SwapBytesBE_(int8 value) { return value; } -inline char SwapBytesBE_(char value) { return value; } - -// SwapBytesLE/SwapBytesBE is mostly used throughout the code with in-place -// argument-modifying semantics. -// As GCC will not bind references to members of packed structures, -// we implement reference semantics by explicitly assigning to a macro -// argument. - -// In-place modifying version: -#define SwapBytesBE(value) do { (value) = SwapBytesBE_((value)); } while(0) -#define SwapBytesLE(value) do { (value) = SwapBytesLE_((value)); } while(0) - -// Alternative, function-style syntax: -#define SwapBytesReturnBE(value) SwapBytesBE_((value)) -#define SwapBytesReturnLE(value) SwapBytesLE_((value)) - -#undef bswap16le -#undef bswap32le -#undef bswap16be -#undef bswap32be -#undef bswap16 -#undef bswap32 - - -// 1.0f --> 0x3f800000u -static forceinline uint32 EncodeIEEE754binary32(float32 f) -{ -#if MPT_PLATFORM_IEEE_FLOAT - STATIC_ASSERT(sizeof(uint32) == sizeof(float32)); - #if MPT_COMPILER_UNION_TYPE_ALIASES - union { - float32 f; - uint32 i; - } conv; - conv.f = f; - return conv.i; - #else - uint32 i = 0; - std::memcpy(&i, &f, sizeof(float32)); - return i; - #endif -#else - #error "IEEE754 single precision float support is required (for now)" -#endif -} - -// 0x3f800000u --> 1.0f -static forceinline float32 DecodeIEEE754binary32(uint32 i) -{ -#if MPT_PLATFORM_IEEE_FLOAT - STATIC_ASSERT(sizeof(uint32) == sizeof(float32)); - #if MPT_COMPILER_UNION_TYPE_ALIASES - union { - uint32 i; - float32 f; - } conv; - conv.i = i; - return conv.f; - #else - float32 f = 0.0f; - std::memcpy(&f, &i, sizeof(float32)); - return f; - #endif -#else - #error "IEEE754 single precision float support is required (for now)" -#endif -} - - -// template parameters are byte indices corresponding to the individual bytes of iee754 in memory -template<std::size_t hihi, std::size_t hilo, std::size_t lohi, std::size_t lolo> -struct IEEE754binary32Emulated -{ -private: - typedef IEEE754binary32Emulated<hihi,hilo,lohi,lolo> self_t; - uint8 bytes[4]; -public: - forceinline uint8 GetByte(std::size_t i) const - { - return bytes[i]; - } - forceinline IEEE754binary32Emulated() { } - forceinline explicit IEEE754binary32Emulated(float32 f) - { - SetInt32(EncodeIEEE754binary32(f)); - } - // b0...b3 are in memory order, i.e. depend on the endianness of this type - // little endian: (0x00,0x00,0x80,0x3f) - // big endian: (0x3f,0x80,0x00,0x00) - forceinline explicit IEEE754binary32Emulated(uint8 b0, uint8 b1, uint8 b2, uint8 b3) - { - bytes[0] = b0; - bytes[1] = b1; - bytes[2] = b2; - bytes[3] = b3; - } - forceinline operator float32 () const - { - return DecodeIEEE754binary32(GetInt32()); - } - forceinline self_t & SetInt32(uint32 i) - { - bytes[hihi] = static_cast<uint8>(i >> 24); - bytes[hilo] = static_cast<uint8>(i >> 16); - bytes[lohi] = static_cast<uint8>(i >> 8); - bytes[lolo] = static_cast<uint8>(i >> 0); - return *this; - } - forceinline uint32 GetInt32() const - { - return 0u - | (static_cast<uint32>(bytes[hihi]) << 24) - | (static_cast<uint32>(bytes[hilo]) << 16) - | (static_cast<uint32>(bytes[lohi]) << 8) - | (static_cast<uint32>(bytes[lolo]) << 0) - ; - } - forceinline bool operator == (const self_t &cmp) const - { - return true - && bytes[0] == cmp.bytes[0] - && bytes[1] == cmp.bytes[1] - && bytes[2] == cmp.bytes[2] - && bytes[3] == cmp.bytes[3] - ; - } - forceinline bool operator != (const self_t &cmp) const - { - return !(*this == cmp); - } -}; - -#if MPT_PLATFORM_IEEE_FLOAT - -struct IEEE754binary32Native -{ -private: - float32 value; -public: - forceinline uint8 GetByte(std::size_t i) const - { - #if defined(MPT_PLATFORM_LITTLE_ENDIAN) - return static_cast<uint8>(EncodeIEEE754binary32(value) >> (i*8)); - #elif defined(MPT_PLATFORM_BIG_ENDIAN) - return static_cast<uint8>(EncodeIEEE754binary32(value) >> ((4-1-i)*8)); - #else - STATIC_ASSERT(false); - #endif - } - forceinline IEEE754binary32Native() { } - forceinline explicit IEEE754binary32Native(float32 f) - { - value = f; - } - // b0...b3 are in memory order, i.e. depend on the endianness of this type - // little endian: (0x00,0x00,0x80,0x3f) - // big endian: (0x3f,0x80,0x00,0x00) - forceinline explicit IEEE754binary32Native(uint8 b0, uint8 b1, uint8 b2, uint8 b3) - { - #if defined(MPT_PLATFORM_LITTLE_ENDIAN) - value = DecodeIEEE754binary32(0u - | (static_cast<uint32>(b0) << 0) - | (static_cast<uint32>(b1) << 8) - | (static_cast<uint32>(b2) << 16) - | (static_cast<uint32>(b3) << 24) - ); - #elif defined(MPT_PLATFORM_BIG_ENDIAN) - value = DecodeIEEE754binary32(0u - | (static_cast<uint32>(b0) << 24) - | (static_cast<uint32>(b1) << 16) - | (static_cast<uint32>(b2) << 8) - | (static_cast<uint32>(b3) << 0) - ); - #else - STATIC_ASSERT(false); - #endif - } - forceinline operator float32 () const - { - return value; - } - forceinline IEEE754binary32Native & SetInt32(uint32 i) - { - value = DecodeIEEE754binary32(i); - return *this; - } - forceinline uint32 GetInt32() const - { - return EncodeIEEE754binary32(value); - } - forceinline bool operator == (const IEEE754binary32Native &cmp) const - { - return value == cmp.value; - } - forceinline bool operator != (const IEEE754binary32Native &cmp) const - { - return value != cmp.value; - } -}; - -#if defined(MPT_PLATFORM_LITTLE_ENDIAN) -typedef IEEE754binary32Native IEEE754binary32LE; -typedef IEEE754binary32Emulated<0,1,2,3> IEEE754binary32BE; -#elif defined(MPT_PLATFORM_BIG_ENDIAN) -typedef IEEE754binary32Emulated<3,2,1,0> IEEE754binary32LE; -typedef IEEE754binary32Native IEEE754binary32BE; -#endif - -#else // !MPT_PLATFORM_IEEE_FLOAT - -typedef IEEE754binary32Emulated<3,2,1,0> IEEE754binary32LE; -typedef IEEE754binary32Emulated<0,1,2,3> IEEE754binary32BE; - -#endif // MPT_PLATFORM_IEEE_FLOAT - -STATIC_ASSERT(sizeof(IEEE754binary32LE) == 4); -STATIC_ASSERT(sizeof(IEEE754binary32BE) == 4); - -OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/soundlib/FileReader.h =================================================================== --- trunk/OpenMPT/soundlib/FileReader.h 2014-06-10 10:59:09 UTC (rev 4094) +++ trunk/OpenMPT/soundlib/FileReader.h 2014-06-10 16:27:31 UTC (rev 4095) @@ -14,7 +14,7 @@ #include "../common/typedefs.h" #include "../common/StringFixer.h" #include "../common/misc_util.h" -#include "Endianness.h" +#include "../common/Endianness.h" #include <algorithm> #ifndef NO_FILEREADER_STD_ISTREAM #include <ios> Modified: trunk/OpenMPT/soundlib/SampleFormatConverters.h =================================================================== --- trunk/OpenMPT/soundlib/SampleFormatConverters.h 2014-06-10 10:59:09 UTC (rev 4094) +++ trunk/OpenMPT/soundlib/SampleFormatConverters.h 2014-06-10 16:27:31 UTC (rev 4095) @@ -10,9 +10,7 @@ #pragma once -#include "../soundlib/Endianness.h" - OPENMPT_NAMESPACE_BEGIN Modified: trunk/OpenMPT/soundlib/Wav.h =================================================================== --- trunk/OpenMPT/soundlib/Wav.h 2014-06-10 10:59:09 UTC (rev 4094) +++ trunk/OpenMPT/soundlib/Wav.h 2014-06-10 16:27:31 UTC (rev 4095) @@ -10,9 +10,7 @@ #pragma once -#include "Endianness.h" - OPENMPT_NAMESPACE_BEGIN Modified: trunk/OpenMPT/soundlib/plugins/PlugInterface.h =================================================================== --- trunk/OpenMPT/soundlib/plugins/PlugInterface.h 2014-06-10 10:59:09 UTC (rev 4094) +++ trunk/OpenMPT/soundlib/plugins/PlugInterface.h 2014-06-10 16:27:31 UTC (rev 4095) @@ -22,7 +22,7 @@ #include "../../soundlib/Snd_defs.h" #include "../../common/misc_util.h" #include "../../soundlib/MIDIEvents.h" -#include "../../soundlib/Endianness.h" +#include "../../common/Endianness.h" #include "../../soundlib/Mixer.h" OPENMPT_NAMESPACE_BEGIN This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-06-14 17:20:35
|
Revision: 4112 http://sourceforge.net/p/modplug/code/4112 Author: saga-games Date: 2014-06-14 17:20:24 +0000 (Sat, 14 Jun 2014) Log Message: ----------- [Fix] Pattern Editor: Don't crash when the module doesn't have any patterns. [Mod] Revert icon loading code to avoid black icons over RDP sessions (http://bugs.openmpt.org/view.php?id=530 vs http://bugs.openmpt.org/view.php?id=520) [Fix] Plugin Bridge: Unknown vendor-specific opcodes that send pointers are now rejected, as they cannot work over the bridge. [Fix] S3M Loader: Some files created with ST3 were detected as being made with Velvet Studio. [Fix] XM Loader: More intelligent handling of MIDI program loading for files that were not made with ModPlug. [Fix] IMF loader: Ignore note cut with a zero parameter. [Mod] Installer: Rename "Launch OpenMPT" start menu shortcut to just OpenMPT (per Windows design guidelines) [Ref] Various small cleanup changes [Fix] Adapt manual generator to MediaWiki 1.23 [Doc] Updated release note documents. [Mod] OpenMPT: Version is now 1.23.04.00 Modified Paths: -------------- trunk/OpenMPT/common/StringFixer.h trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/installer/install.iss trunk/OpenMPT/mptrack/CImageListEx.cpp trunk/OpenMPT/mptrack/CTreeCtrl.h trunk/OpenMPT/mptrack/Ctrl_gen.cpp trunk/OpenMPT/mptrack/Ctrl_pat.cpp trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/mptrack/Draw_pat.cpp trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/PNG.cpp trunk/OpenMPT/mptrack/PNG.h trunk/OpenMPT/mptrack/SelectPluginDialog.cpp trunk/OpenMPT/mptrack/View_pat.cpp trunk/OpenMPT/mptrack/View_pat.h trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/mptrack/manual_generator/run.cmd trunk/OpenMPT/mptrack/manual_generator/source/help.css trunk/OpenMPT/mptrack/manual_generator/wiki.py trunk/OpenMPT/packageTemplate/History.txt trunk/OpenMPT/pluginBridge/Bridge.cpp trunk/OpenMPT/soundlib/Load_ams.cpp trunk/OpenMPT/soundlib/Load_imf.cpp trunk/OpenMPT/soundlib/Load_s3m.cpp trunk/OpenMPT/soundlib/XMTools.cpp Modified: trunk/OpenMPT/common/StringFixer.h =================================================================== --- trunk/OpenMPT/common/StringFixer.h 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/common/StringFixer.h 2014-06-14 17:20:24 UTC (rev 4112) @@ -371,7 +371,7 @@ void CopyN(char (&destBuffer)[destSize], const char *srcBuffer, const size_t srcSize = SIZE_MAX) //---------------------------------------------------------------------------------------------- { - const size_t copySize = MIN(destSize - 1, srcSize); + const size_t copySize = std::min(destSize - 1u, srcSize); std::strncpy(destBuffer, srcBuffer, copySize); destBuffer[copySize] = '\0'; } Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/common/versionNumber.h 2014-06-14 17:20:24 UTC (rev 4112) @@ -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 23 -#define VER_MINOR 03 -#define VER_MINORMINOR 02 +#define VER_MINOR 04 +#define VER_MINORMINOR 00 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/installer/install.iss =================================================================== --- trunk/OpenMPT/installer/install.iss 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/installer/install.iss 2014-06-14 17:20:24 UTC (rev 4112) @@ -102,7 +102,7 @@ [Icons] ; start menu -Name: {group}\{cm:LaunchProgram,OpenMPT}; Filename: {app}\mptrack.exe +Name: {group}\OpenMPT; Filename: {app}\mptrack.exe Name: {group}\{cm:UninstallProgram,OpenMPT}; Filename: {uninstallexe} Name: {group}\ModPlug Central; Filename: {app}\ModPlug Central.url Modified: trunk/OpenMPT/mptrack/CImageListEx.cpp =================================================================== --- trunk/OpenMPT/mptrack/CImageListEx.cpp 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/CImageListEx.cpp 2014-06-14 17:20:24 UTC (rev 4112) @@ -80,8 +80,8 @@ } CBitmap dib, dibMask; - bitmap->ToDIB(dib); - bitmapMask.ToDIB(dibMask); + bitmap->ToDIB(dib, dc); + bitmapMask.ToDIB(dibMask, dc); result = CImageList::Create(cx, cy, ILC_COLOR24 | ILC_MASK, nInitial, nGrow) && CImageList::Add(&dib, &dibMask); @@ -89,7 +89,7 @@ { // 32-bit image on modern system CBitmap dib; - bitmap->ToDIB(dib); + bitmap->ToDIB(dib, dc); result = CImageList::Create(cx, cy, ILC_COLOR32, nInitial, nGrow) && CImageList::Add(&dib, RGB(0, 0, 0)); } Modified: trunk/OpenMPT/mptrack/CTreeCtrl.h =================================================================== --- trunk/OpenMPT/mptrack/CTreeCtrl.h 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/CTreeCtrl.h 2014-06-14 17:20:24 UTC (rev 4112) @@ -21,12 +21,12 @@ #ifndef UNICODE BOOL GetItem(TVITEMW *pItem) const { - return ::SendMessage(m_hWnd, TVM_GETITEMW, 0, (LPARAM)pItem) ? TRUE : FALSE; + return ::SendMessage(m_hWnd, TVM_GETITEMW, 0, (LPARAM)pItem); } BOOL SetItem(TVITEMW *pItem) { - return ::SendMessage(m_hWnd, TVM_SETITEMW, 0, (LPARAM)pItem) ? TRUE : FALSE; + return ::SendMessage(m_hWnd, TVM_SETITEMW, 0, (LPARAM)pItem); } BOOL SetItem(HTREEITEM hItem, UINT nMask, const WCHAR *lpszItem, int nImage, int nSelectedImage, UINT nState, UINT nStateMask, LPARAM lParam) { @@ -107,7 +107,7 @@ tvi.mask = TVIF_TEXT; CStringW str; int nLen = 128; - int nRes; + size_t nRes; do { nLen *= 2; @@ -115,7 +115,7 @@ tvi.cchTextMax = nLen; ::SendMessage(m_hWnd, TVM_GETITEMW, 0, (LPARAM)&tvi); nRes = wcslen(tvi.pszText); - } while (nRes >= nLen - 1); + } while (nRes >= size_t(nLen - 1)); str.ReleaseBuffer(); return str; #endif // UNICODE Modified: trunk/OpenMPT/mptrack/Ctrl_gen.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_gen.cpp 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/Ctrl_gen.cpp 2014-06-14 17:20:24 UTC (rev 4112) @@ -20,13 +20,7 @@ #include "math.h" #include "../common/misc_util.h" -// -> CODE#0015 -// -> DESC="channels management dlg" -#include "Ctrl_pat.h" -#include "ctrl_gen.h" -// -! NEW_FEATURE#0015 - OPENMPT_NAMESPACE_BEGIN @@ -193,13 +187,14 @@ } if(delay) { - CModSpecifications specs = m_sndFile.GetModSpecifications(); uint32 newTempo = 60000 * numSamples; if(m_sndFile.m_nTempoMode != tempo_mode_modern) { newTempo = (newTempo * m_sndFile.m_nDefaultSpeed * m_sndFile.m_nDefaultRowsPerBeat) / 24; } newTempo /= delay; + + const CModSpecifications specs = m_sndFile.GetModSpecifications(); Limit(newTempo, specs.tempoMin, specs.tempoMax); SetDlgItemInt(IDC_EDIT_TEMPO, newTempo, FALSE); } Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2014-06-14 17:20:24 UTC (rev 4112) @@ -347,8 +347,11 @@ nPat = (PATTERNINDEX)(dwHintMask >> HINT_SHIFT_PAT); else nPat = (PATTERNINDEX)SendViewMessage(VIEWMSG_GETCURRENTPATTERN); - m_sndFile.Patterns[nPat].GetName(s); - m_EditPatName.SetWindowText(s); + if(m_sndFile.Patterns.IsValidIndex(nPat)) + { + m_sndFile.Patterns[nPat].GetName(s); + m_EditPatName.SetWindowText(s); + } BOOL bXMIT = (m_sndFile.GetType() & (MOD_TYPE_XM|MOD_TYPE_IT|MOD_TYPE_MPT)) ? TRUE : FALSE; m_ToolBar.EnableButton(ID_PATTERN_MIDIMACRO, bXMIT); Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2014-06-14 17:20:24 UTC (rev 4112) @@ -46,13 +46,13 @@ #define FLOAT_ERROR 1.0e-20f // Float point comparison -bool EqualTof(const float a, const float b) +static bool EqualTof(const float a, const float b) { return (fabs(a - b) <= FLOAT_ERROR); } // Round floating point value to "digit" number of digits -float Round(const float value, const int digit) +static float Round(const float value, const int digit) { float v = 0.1f * (value * powf(10.0f, (float)(digit + 1)) + (value < 0.0f ? -5.0f : 5.0f)); modff(v, &v); @@ -60,7 +60,7 @@ } template<int v> -int PowerOf2Exponent() +static int PowerOf2Exponent() { if(v <= 1) return 0; @@ -1564,9 +1564,8 @@ void CCtrlSamples::OnDownsample() //------------------------------- { - DWORD dwStart, dwEnd, dwRemove, dwNewLen; - UINT smplsize; - PVOID pOriginal, pNewSample; + SmpLength dwStart, dwEnd, dwRemove, dwNewLen; + SmpLength smplsize; if((!m_sndFile.GetSample(m_nSample).pSample)) return; BeginWaitCursor(); @@ -1583,11 +1582,10 @@ dwEnd = sample.nLength; } smplsize = sample.GetBytesPerSample(); - pOriginal = sample.pSample; + void *pOriginal = sample.pSample, *pNewSample = nullptr; dwRemove = (dwEnd-dwStart+1)>>1; dwNewLen = sample.nLength - dwRemove; dwEnd = dwStart+dwRemove*2; - pNewSample = NULL; if ((dwNewLen >= 4) && (dwRemove)) pNewSample = ModSample::AllocateSample(dwNewLen, smplsize); if (pNewSample) { @@ -1808,7 +1806,7 @@ break; case 3 : _tcscpy(str, _T("Not enough memory...")); break; - case 6 : _tcscpy(str, _T("Too short sample")); + case 6 : _tcscpy(str, _T("Sample too short")); break; default: _tcscpy(str, _T("Unknown Error...")); break; @@ -2688,7 +2686,6 @@ sample.uFlags.set(CHN_SUSTAINLOOP, n > 0); sample.uFlags.set(CHN_PINGPONGSUSTAIN, n == 2); - // set sustain loop points if theren't any if(wasDisabled && sample.uFlags[CHN_SUSTAINLOOP] && sample.nSustainStart == sample.nSustainEnd) { Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Draw_pat.cpp 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/Draw_pat.cpp 2014-06-14 17:20:24 UTC (rev 4112) @@ -484,12 +484,10 @@ pfnt->nNumX, pfnt->nNumY+((val / 10)%10)*COLUMN_HEIGHT); m_Dib.TextBlt(x+pfnt->nVolCmdWidth+pfnt->nVolHiWidth, y, pfnt->nEltWidths[2]-(pfnt->nVolCmdWidth+pfnt->nVolHiWidth), COLUMN_HEIGHT, pfnt->nNumX, pfnt->nNumY+(val % 10)*COLUMN_HEIGHT); - } - else + } else { - static_assert(MAX_VOLCMDS <= 16, "Pattern draw code assumes <= 16 volume commands"); - ModCommand::VOLCMD volcmd = (mc.volcmd & 0x0F); - int vol = (mc.vol & 0x7F); + ModCommand::VOLCMD volcmd = std::min<ModCommand::VOLCMD>(mc.volcmd, MAX_VOLCMDS - 1); + int vol = (mc.vol & 0x7F); if(drawDefaultVolume) { @@ -541,25 +539,23 @@ HGDIOBJ oldpen; CRect rcClient, rect, rc; const CModDoc *pModDoc; - const CSoundFile *pSndFile; HDC hdc; CHANNELINDEX xofs; ROWINDEX yofs; - UINT nColumnWidth, ncols, nrows, ncolhdr; + UINT nColumnWidth, ncols, ncolhdr; int xpaint, ypaint, mixPlug; ASSERT(pDC); UpdateSizes(); - if ((pModDoc = GetDocument()) == NULL) return; + if ((pModDoc = GetDocument()) == nullptr) return; GetClientRect(&rcClient); hdc = pDC->m_hDC; oldpen = ::SelectObject(hdc, CMainFrame::penDarkGray); xofs = static_cast<CHANNELINDEX>(GetXScrollPos()); yofs = static_cast<ROWINDEX>(GetYScrollPos()); - pSndFile = pModDoc->GetSoundFile(); + const CSoundFile &sndFile = pModDoc->GetrSoundFile(); nColumnWidth = m_szCell.cx; - nrows = (pSndFile->Patterns[m_nPattern]) ? pSndFile->Patterns[m_nPattern].GetNumRows() : 0; - ncols = pSndFile->GetNumChannels(); + ncols = sndFile.GetNumChannels(); xpaint = m_szHeader.cx; ypaint = rcClient.top; ncolhdr = xofs; @@ -577,24 +573,14 @@ rect.SetRect(xpaint, ypaint, xpaint+nColumnWidth, ypaint + m_szHeader.cy); if (ncolhdr < ncols) { -// -> CODE#0012 -// -> DESC="midi keyboard split" - const char *pszfmt = pSndFile->m_bChannelMuteTogglePending[ncolhdr]? "[Channel %d]" : "Channel %d"; -// const char *pszfmt = pModDoc->IsChannelRecord(ncolhdr) ? "Channel %d " : "Channel %d"; -// -! NEW_FEATURE#0012 - if ((pSndFile->GetType() & (MOD_TYPE_XM | MOD_TYPE_IT | MOD_TYPE_MPT)) && ((BYTE)pSndFile->ChnSettings[ncolhdr].szName[0] >= ' ')) - pszfmt = pSndFile->m_bChannelMuteTogglePending[ncolhdr] ? "%d: [%s]" : "%d: %s"; - else if (m_nDetailLevel < PatternCursor::volumeColumn) pszfmt = pSndFile->m_bChannelMuteTogglePending[ncolhdr] ? "[Ch%d]" : "Ch%d"; - else if (m_nDetailLevel < PatternCursor::effectColumn) pszfmt = pSndFile->m_bChannelMuteTogglePending[ncolhdr] ? "[Chn %d]" : "Chn %d"; - wsprintf(s, pszfmt, ncolhdr + 1, pSndFile->ChnSettings[ncolhdr].szName); -// -> CODE#0012 -// -> DESC="midi keyboard split" -// DrawButtonRect(hdc, &rect, s, -// (pSndFile->ChnSettings[ncolhdr].dwFlags & CHN_MUTE) ? TRUE : FALSE, -// ((m_bInItemRect) && ((m_nDragItem & DRAGITEM_MASK) == DRAGITEM_CHNHEADER) && ((m_nDragItem & DRAGITEM_VALUEMASK) == ncolhdr)) ? TRUE : FALSE, DT_CENTER); -// rect.bottom = rect.top + COLHDR_HEIGHT; + const char *pszfmt = sndFile.m_bChannelMuteTogglePending[ncolhdr]? "[Channel %d]" : "Channel %d"; + if ((sndFile.GetType() & (MOD_TYPE_XM | MOD_TYPE_IT | MOD_TYPE_MPT)) && sndFile.ChnSettings[ncolhdr].szName[0] != 0) + pszfmt = sndFile.m_bChannelMuteTogglePending[ncolhdr] ? "%d: [%s]" : "%d: %s"; + else if (m_nDetailLevel < PatternCursor::volumeColumn) pszfmt = sndFile.m_bChannelMuteTogglePending[ncolhdr] ? "[Ch%d]" : "Ch%d"; + else if (m_nDetailLevel < PatternCursor::effectColumn) pszfmt = sndFile.m_bChannelMuteTogglePending[ncolhdr] ? "[Chn %d]" : "Chn %d"; + wsprintf(s, pszfmt, ncolhdr + 1, sndFile.ChnSettings[ncolhdr].szName); DrawButtonRect(hdc, &rect, s, - pSndFile->ChnSettings[ncolhdr].dwFlags[CHN_MUTE] ? TRUE : FALSE, + sndFile.ChnSettings[ncolhdr].dwFlags[CHN_MUTE] ? TRUE : FALSE, ((m_bInItemRect) && ((m_nDragItem & DRAGITEM_MASK) == DRAGITEM_CHNHEADER) && ((m_nDragItem & DRAGITEM_VALUEMASK) == ncolhdr)) ? TRUE : FALSE, pModDoc->IsChannelRecord(static_cast<CHANNELINDEX>(ncolhdr)) ? DT_RIGHT : DT_CENTER); @@ -617,20 +603,15 @@ CRect insRect; insRect.SetRect(xpaint, ypaint, xpaint+nColumnWidth / 8 + 3, ypaint + 16); -// if (MultiRecordMask[ncolhdr>>3] & (1 << (ncolhdr&7))) if (pModDoc->IsChannelRecord1(static_cast<CHANNELINDEX>(ncolhdr))) { -// rect.DeflateRect(1, 1); -// InvertRect(hdc, &rect); -// rect.InflateRect(1, 1); FrameRect(hdc,&rect,CMainFrame::brushGray); InvertRect(hdc, &rect); s[0] = '1'; s[1] = '\0'; DrawButtonRect(hdc, &insRect, s, FALSE, FALSE, DT_CENTER); FrameRect(hdc,&insRect,CMainFrame::brushBlack); - } - else if (pModDoc->IsChannelRecord2(static_cast<CHANNELINDEX>(ncolhdr))) + } else if (pModDoc->IsChannelRecord2(static_cast<CHANNELINDEX>(ncolhdr))) { FrameRect(hdc,&rect,CMainFrame::brushGray); InvertRect(hdc, &rect); @@ -639,7 +620,6 @@ DrawButtonRect(hdc, &insRect, s, FALSE, FALSE, DT_CENTER); FrameRect(hdc,&insRect,CMainFrame::brushBlack); } -// -! NEW_FEATURE#0012 if(m_Status[psShowVUMeters]) { @@ -652,12 +632,11 @@ { rect.top+=PLUGNAME_HEIGHT; rect.bottom+=PLUGNAME_HEIGHT; - mixPlug=pSndFile->ChnSettings[ncolhdr].nMixPlugin; - if (mixPlug) { - wsprintf(s, "%d: %s", mixPlug, (pSndFile->m_MixPlugins[mixPlug - 1]).pMixPlugin ? (pSndFile->m_MixPlugins[mixPlug - 1]).GetName() : "[empty]"); - } else { + mixPlug = sndFile.ChnSettings[ncolhdr].nMixPlugin; + if (mixPlug) + wsprintf(s, "%d: %s", mixPlug, (sndFile.m_MixPlugins[mixPlug - 1]).pMixPlugin ? (sndFile.m_MixPlugins[mixPlug - 1]).GetName() : "[empty]"); + else wsprintf(s, "---"); - } DrawButtonRect(hdc, &rect, s, FALSE, ((m_bInItemRect) && ((m_nDragItem & DRAGITEM_MASK) == DRAGITEM_PLUGNAME) && ((m_nDragItem & DRAGITEM_VALUEMASK) == ncolhdr)) ? TRUE : FALSE, DT_CENTER); } @@ -668,6 +647,7 @@ } } ypaint += m_szHeader.cy; + if (m_nMidRow) { if (yofs >= m_nMidRow) @@ -684,24 +664,24 @@ const ORDERINDEX startOrder = static_cast<ORDERINDEX>(SendCtrlMessage(CTRLMSG_GETCURRENTORDER)); if(startOrder > 0) { - ORDERINDEX prevOrder = pSndFile->Order.GetPreviousOrderIgnoringSkips(startOrder); + ORDERINDEX prevOrder = sndFile.Order.GetPreviousOrderIgnoringSkips(startOrder); //Skip +++ items - if(startOrder < pSndFile->Order.size() && pSndFile->Order[startOrder] == m_nPattern) + if(startOrder < sndFile.Order.size() && sndFile.Order[startOrder] == m_nPattern) { - nPrevPat = pSndFile->Order[prevOrder]; + nPrevPat = sndFile.Order[prevOrder]; } } } - if(pSndFile->Patterns.IsValidPat(nPrevPat)) + if(sndFile.Patterns.IsValidPat(nPrevPat)) { - ROWINDEX nPrevRows = pSndFile->Patterns[nPrevPat].GetNumRows(); - ROWINDEX n = MIN(static_cast<ROWINDEX>(nSkip), nPrevRows); + ROWINDEX nPrevRows = sndFile.Patterns[nPrevPat].GetNumRows(); + ROWINDEX n = std::min(static_cast<ROWINDEX>(nSkip), nPrevRows); ypaint += (nSkip - n) * m_szCell.cy; rect.SetRect(0, m_szHeader.cy, nColumnWidth * ncols + m_szHeader.cx, ypaint - 1); m_Dib.SetBlendMode(0x80); - DrawPatternData(hdc, pSndFile, nPrevPat, false, false, + DrawPatternData(hdc, nPrevPat, false, false, nPrevRows - n, nPrevRows, xofs, rcClient, &ypaint); m_Dib.SetBlendMode(0); } else @@ -718,8 +698,10 @@ yofs = 0; } } + + UINT nrows = sndFile.Patterns.IsValidPat(m_nPattern) ? sndFile.Patterns[m_nPattern].GetNumRows() : 0; int ypatternend = ypaint + (nrows-yofs)*m_szCell.cy; - DrawPatternData(hdc, pSndFile, m_nPattern, TRUE, (pMainFrm->GetModPlaying() == pModDoc), + DrawPatternData(hdc, m_nPattern, TRUE, (pMainFrm->GetModPlaying() == pModDoc), yofs, nrows, xofs, rcClient, &ypaint); // Display next pattern if ((TrackerSettings::Instance().m_dwPatternSetup & PATTERN_SHOWPREVIOUS) && (ypaint < rcClient.bottom) && (ypaint == ypatternend)) @@ -730,22 +712,22 @@ PATTERNINDEX nNextPat = PATTERNINDEX_INVALID; const ORDERINDEX startOrder= static_cast<ORDERINDEX>(SendCtrlMessage(CTRLMSG_GETCURRENTORDER)); - ORDERINDEX nNextOrder = pSndFile->Order.GetNextOrderIgnoringSkips(startOrder); + ORDERINDEX nNextOrder = sndFile.Order.GetNextOrderIgnoringSkips(startOrder); if(nNextOrder == startOrder) nNextOrder = ORDERINDEX_INVALID; //Ignore skip items(+++) from sequence. - const ORDERINDEX ordCount = pSndFile->Order.GetLength(); + const ORDERINDEX ordCount = sndFile.Order.GetLength(); - if(nNextOrder < ordCount && pSndFile->Order[startOrder] == m_nPattern) + if(nNextOrder < ordCount && sndFile.Order[startOrder] == m_nPattern) { - nNextPat = pSndFile->Order[nNextOrder]; + nNextPat = sndFile.Order[nNextOrder]; } - if(pSndFile->Patterns.IsValidPat(nNextPat)) + if(sndFile.Patterns.IsValidPat(nNextPat)) { - ROWINDEX nNextRows = pSndFile->Patterns[nNextPat].GetNumRows(); - ROWINDEX n = MIN(static_cast<ROWINDEX>(nVisRows), nNextRows); + ROWINDEX nNextRows = sndFile.Patterns[nNextPat].GetNumRows(); + ROWINDEX n = std::min(static_cast<ROWINDEX>(nVisRows), nNextRows); m_Dib.SetBlendMode(0x80); - DrawPatternData(hdc, pSndFile, nNextPat, false, false, + DrawPatternData(hdc, nNextPat, false, false, 0, n, xofs, rcClient, &ypaint); m_Dib.SetBlendMode(0); } @@ -788,23 +770,29 @@ } -void CViewPattern::DrawPatternData(HDC hdc, const CSoundFile *pSndFile, PATTERNINDEX nPattern, bool selEnable, +void CViewPattern::DrawPatternData(HDC hdc, PATTERNINDEX nPattern, bool selEnable, bool isPlaying, ROWINDEX startRow, ROWINDEX numRows, CHANNELINDEX startChan, CRect &rcClient, int *pypaint) //------------------------------------------------------------------------------------------------------------- { uint8 selectedCols[MAX_BASECHANNELS]; // Bit mask of selected channel components static_assert(PatternCursor::lastColumn <= 7, "Columns are used as bitmasks here."); + const CSoundFile &sndFile = GetDocument()->GetrSoundFile(); + if(!sndFile.Patterns.IsValidPat(nPattern)) + { + return; + } + PCPATTERNFONT pfnt = GetCurrentPatternFont(); const ModCommand m0 = ModCommand::Empty(); - const ModCommand *pPattern = pSndFile->Patterns[nPattern]; + const ModCommand *pPattern = sndFile.Patterns[nPattern]; CHAR s[256]; CRect rect; int xpaint, ypaint = *pypaint; int row_col, row_bkcol; UINT bSpeedUp, nColumnWidth; - CHANNELINDEX ncols = pSndFile->GetNumChannels(); + CHANNELINDEX ncols = sndFile.GetNumChannels(); nColumnWidth = m_szCell.cx; rect.SetRect(m_szHeader.cx, rcClient.top, m_szHeader.cx+nColumnWidth, rcClient.bottom); for(CHANNELINDEX cmk = startChan; cmk < ncols; cmk++) @@ -819,7 +807,7 @@ while ((maxcol > startChan) && (selectedCols[maxcol-1] & COLUMN_BITS_INVISIBLE)) maxcol--; // Init bitmap border { - UINT maxndx = pSndFile->GetNumChannels() * m_szCell.cx; + UINT maxndx = sndFile.GetNumChannels() * m_szCell.cx; UINT ibmp = 0; if (maxndx > FASTBMP_MAXWIDTH) maxndx = FASTBMP_MAXWIDTH; do @@ -859,15 +847,15 @@ row_bkcol = MODCOLOR_BACKNORMAL; // time signature highlighting - ROWINDEX nBeat = pSndFile->m_nDefaultRowsPerBeat, nMeasure = pSndFile->m_nDefaultRowsPerMeasure; - if(pSndFile->Patterns[nPattern].GetOverrideSignature()) + ROWINDEX nBeat = sndFile.m_nDefaultRowsPerBeat, nMeasure = sndFile.m_nDefaultRowsPerMeasure; + if(sndFile.Patterns[nPattern].GetOverrideSignature()) { - nBeat = pSndFile->Patterns[nPattern].GetRowsPerBeat(); - nMeasure = pSndFile->Patterns[nPattern].GetRowsPerMeasure(); + nBeat = sndFile.Patterns[nPattern].GetRowsPerBeat(); + nMeasure = sndFile.Patterns[nPattern].GetRowsPerMeasure(); } // secondary highlight (beats) if ((TrackerSettings::Instance().m_dwPatternSetup & PATTERN_2NDHIGHLIGHT) - && (nBeat) && (nBeat < numRows)) + && (nBeat) && (nBeat < numRows)) { if(!(compRow % nBeat)) { @@ -975,14 +963,14 @@ { tx_col = MODCOLOR_NOTE; - if(pSndFile->m_SongFlags[SONG_PT1XMODE] && (m->note < NOTE_MIDDLEC - 12 || m->note >= NOTE_MIDDLEC + 2 * 12)) + if(sndFile.m_SongFlags[SONG_PT1XMODE] && (m->note < NOTE_MIDDLEC - 12 || m->note >= NOTE_MIDDLEC + 2 * 12)) { // MOD "ProTracker 1.x" flag: Highlight notes that are not supported by Amiga trackers. tx_col = MODCOLOR_DODGY_COMMANDS; - } else if(pSndFile->m_SongFlags[SONG_AMIGALIMITS] && m->instr != 0 && m->instr <= pSndFile->GetNumSamples()) + } else if(sndFile.m_SongFlags[SONG_AMIGALIMITS] && m->instr != 0 && m->instr <= sndFile.GetNumSamples()) { // S3M "Force Amiga Limits": Highlight notes that exceed the Amiga's frequency range. - UINT period = pSndFile->GetPeriodFromNote(m->note, 0, pSndFile->GetSample(m->instr).nC5Speed); + UINT period = sndFile.GetPeriodFromNote(m->note, 0, sndFile.GetSample(m->instr).nC5Speed); if(period < 113 * 4 || period > 856 * 4) { tx_col = MODCOLOR_DODGY_COMMANDS; @@ -996,8 +984,8 @@ } // Drawing note m_Dib.SetTextColor(tx_col, bk_col); - if(pSndFile->m_nType == MOD_TYPE_MPT && m->instr < MAX_INSTRUMENTS && pSndFile->Instruments[m->instr]) - DrawNote(xbmp+x, 0, m->note, pSndFile->Instruments[m->instr]->pTuning); + if(sndFile.GetType() == MOD_TYPE_MPT && m->instr < MAX_INSTRUMENTS && sndFile.Instruments[m->instr]) + DrawNote(xbmp+x, 0, m->note, sndFile.Instruments[m->instr]->pTuning); else //Original DrawNote(xbmp+x, 0, m->note); } @@ -1083,7 +1071,7 @@ { if(m->command != CMD_NONE) { - char n = pSndFile->GetModSpecifications().GetEffectLetter(m->command); + char n = sndFile.GetModSpecifications().GetEffectLetter(m->command); ASSERT(n > ' '); DrawLetter(xbmp+x, 0, n, pfnt->nEltWidths[3], pfnt->nCmdOfs); } else @@ -1187,7 +1175,7 @@ int x1, y1, x2, y2; int nChannels, nRows; - if(pSndFile == nullptr) return; + if(pSndFile == nullptr || !pSndFile->Patterns.IsValidPat(m_nPattern)) return; // Compute relative movement int dx = (int)m_DragPos.GetChannel() - (int)m_StartSel.GetChannel(); @@ -1307,7 +1295,7 @@ //----------------------------------- { const CSoundFile *pSndFile = GetSoundFile(); - if(pSndFile) + if(pSndFile && pSndFile->Patterns.IsValidIndex(m_nPattern)) { CRect rect; SIZE sizeTotal, sizePage, sizeLine; @@ -1491,7 +1479,7 @@ // Get new selection area m_Selection = PatternRect(beginSel, endSel); const CSoundFile *pSndFile = GetSoundFile(); - if(pSndFile != nullptr) + if(pSndFile != nullptr && pSndFile->Patterns.IsValidIndex(m_nPattern)) { m_Selection.Sanitize(pSndFile->Patterns[m_nPattern].GetNumRows(), pSndFile->GetNumChannels()); } @@ -1542,7 +1530,7 @@ //------------------------------------------ { const CSoundFile *pSndFile = GetSoundFile(); - if(pSndFile) + if(pSndFile && pSndFile->Patterns.IsValidIndex(m_nPattern)) { int yofs = GetYScrollPos() - m_nMidRow; if (n == ROWINDEX_INVALID) n = GetCurrentRow(); @@ -1611,8 +1599,8 @@ nChn = m_Cursor.GetChannel(); s[0] = 0; if(!m_Status[psKeyboardDragSelect] - && (m_Selection.GetUpperLeft() == m_Selection.GetLowerRight()) && (pSndFile->Patterns[m_nPattern]) - && (GetCurrentRow() < pSndFile->Patterns[m_nPattern].GetNumRows()) && (nChn < pSndFile->m_nChannels)) + && (m_Selection.GetUpperLeft() == m_Selection.GetLowerRight()) && pSndFile->Patterns.IsValidIndex(m_nPattern) + && (GetCurrentRow() < pSndFile->Patterns[m_nPattern].GetNumRows()) && (nChn < pSndFile->GetNumChannels())) { const ModCommand *m = pSndFile->Patterns[m_nPattern].GetpModCommand(GetCurrentRow(), nChn); @@ -1715,7 +1703,7 @@ const CSoundFile *pSndFile = GetSoundFile(); CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); - if(pMainFrm != nullptr && pSndFile != nullptr) + if(pMainFrm != nullptr && pSndFile != nullptr && pSndFile->Patterns.IsValidIndex(m_nPattern)) { //xtraInfo.Format("Chan: %d; macro: %X; cutoff: %X; reso: %X; pan: %X", xtraInfo.Format("Chn:%d; Vol:%X; Mac:%X; Cut:%X%s; Res:%X; Pan:%X%s", @@ -1756,7 +1744,7 @@ bPlaying = (pMainFrm->GetFollowSong(pModDoc) == m_hWnd) ? TRUE : FALSE; x = m_szHeader.cx; nChn = xofs; - while ((nChn < pSndFile->m_nChannels) && (x < rcClient.right)) + while ((nChn < pSndFile->GetNumChannels()) && (x < rcClient.right)) { ChnVUMeters[nChn] = (WORD)pnotify->pos[nChn]; if ((!bPlaying) || pnotify->type[Notification::Stop]) ChnVUMeters[nChn] = 0; Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2014-06-14 17:20:24 UTC (rev 4112) @@ -1083,7 +1083,7 @@ //OnPlayerPause(); // pause song - pausing VSTis is too slow // All notes off - for (UINT i=0; i<MAX_CHANNELS; i++) + for(CHANNELINDEX i = 0; i < MAX_CHANNELS; i++) { if ((i < GetNumChannels()) || (m_SndFile.m_PlayState.Chn[i].nMasterChn)) { @@ -2357,11 +2357,11 @@ ord = 0; pat = m_SndFile.Order[ord]; } - if(pat >= m_SndFile.Patterns.Size()) + if(!m_SndFile.Patterns.IsValidPat(pat)) { pat = 0; - } - if(row >= m_SndFile.Patterns[pat].GetNumRows()) + row = 0; + } else if(row >= m_SndFile.Patterns[pat].GetNumRows()) { row = 0; } Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2014-06-14 17:20:24 UTC (rev 4112) @@ -1284,7 +1284,7 @@ BOOL CSplashScreen::OnInitDialog() //-------------------------------- { - bitmap->ToDIB(m_Bitmap); + bitmap->ToDIB(m_Bitmap, GetDC()); CRect rect; int cx, cy, newcx, newcy; Modified: trunk/OpenMPT/mptrack/PNG.cpp =================================================================== --- trunk/OpenMPT/mptrack/PNG.cpp 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/PNG.cpp 2014-06-14 17:20:24 UTC (rev 4112) @@ -182,4 +182,23 @@ } +// Create a DIB for the current device from our PNG. +bool PNG::Bitmap::ToDIB(CBitmap &bitmap, CDC *dc) const +//----------------------------------------------------- +{ + BITMAPINFOHEADER bi; + MemsetZero(bi); + bi.biSize = sizeof(BITMAPINFOHEADER); + bi.biWidth = width; + bi.biHeight = -(int32_t)height; + bi.biPlanes = 1; + bi.biBitCount = 32; + bi.biCompression = BI_RGB; + bi.biSizeImage = width * height * 4; + + if(dc == nullptr) dc = CDC::FromHandle(GetDC(NULL)); + return bitmap.CreateCompatibleBitmap(dc, width, height) + && SetDIBits(dc->GetSafeHdc(), bitmap, 0, height, GetPixels(), reinterpret_cast<BITMAPINFO *>(&bi), DIB_RGB_COLORS); +} + OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/PNG.h =================================================================== --- trunk/OpenMPT/mptrack/PNG.h 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/PNG.h 2014-06-14 17:20:24 UTC (rev 4112) @@ -35,7 +35,7 @@ uint32_t GetNumPixels() const { return width * height; } // Create a DIB from our PNG. - bool ToDIB(CBitmap &bitmap) const { return bitmap.CreateBitmap(width, height, 1, 32, GetPixels()) != FALSE; } + bool ToDIB(CBitmap &bitmap, CDC *dc) const; }; Bitmap *ReadPNG(FileReader &file); Modified: trunk/OpenMPT/mptrack/SelectPluginDialog.cpp =================================================================== --- trunk/OpenMPT/mptrack/SelectPluginDialog.cpp 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/SelectPluginDialog.cpp 2014-06-14 17:20:24 UTC (rev 4112) @@ -458,8 +458,6 @@ m_chkShare.EnableWindow(m_chkBridge.GetCheck() != BST_UNCHECKED); showBoxes = SW_SHOW; - } else - { } } else { Modified: trunk/OpenMPT/mptrack/View_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_pat.cpp 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/View_pat.cpp 2014-06-14 17:20:24 UTC (rev 4112) @@ -267,7 +267,7 @@ //--------------------------------------------------------------------------------------- { const CSoundFile *pSndFile = GetSoundFile(); - if(pSndFile == nullptr) + if(pSndFile == nullptr || !pSndFile->Patterns.IsValidIndex(m_nPattern)) return false; if(wrap && pSndFile->Patterns[m_nPattern].GetNumRows()) @@ -545,7 +545,7 @@ //---------------------------------------------------------------------------------------------------------------- { const CSoundFile *pSndFile = GetSoundFile(); - if(pSndFile == nullptr) + if(pSndFile == nullptr || !pSndFile->Patterns.IsValidPat(m_nPattern)) { return false; } @@ -792,7 +792,7 @@ //---------------------------------- { CSoundFile *pSndFile = GetSoundFile(); - if(pSndFile == nullptr) + if(pSndFile == nullptr || !pSndFile->Patterns.IsValidPat(m_nPattern)) { return; } @@ -876,7 +876,7 @@ //----------------------------------- { CSoundFile *pSndFile = GetSoundFile(); - if(pSndFile == nullptr) + if(pSndFile == nullptr || !pSndFile->Patterns.IsValidPat(m_nPattern)) { return; } @@ -1560,16 +1560,18 @@ // Double-clicked a pattern cell to select whole channel. // Continue dragging to select more channels. const CSoundFile *pSndFile = GetSoundFile(); - const ROWINDEX lastRow = pSndFile->Patterns[m_nPattern].GetNumRows() - 1; + if(pSndFile->Patterns.IsValidPat(m_nPattern)) + { + const ROWINDEX lastRow = pSndFile->Patterns[m_nPattern].GetNumRows() - 1; - CHANNELINDEX startChannel = m_Cursor.GetChannel(); - CHANNELINDEX endChannel = GetPositionFromPoint(point).GetChannel(); - - m_StartSel = PatternCursor(0, startChannel, (startChannel <= endChannel ? PatternCursor::firstColumn : PatternCursor::lastColumn)); - PatternCursor endSel = PatternCursor(lastRow, endChannel, (startChannel <= endChannel ? PatternCursor::lastColumn : PatternCursor::firstColumn)); + CHANNELINDEX startChannel = m_Cursor.GetChannel(); + CHANNELINDEX endChannel = GetPositionFromPoint(point).GetChannel(); - DragToSel(endSel, true, false, false); + m_StartSel = PatternCursor(0, startChannel, (startChannel <= endChannel ? PatternCursor::firstColumn : PatternCursor::lastColumn)); + PatternCursor endSel = PatternCursor(lastRow, endChannel, (startChannel <= endChannel ? PatternCursor::lastColumn : PatternCursor::firstColumn)); + DragToSel(endSel, true, false, false); + } } else if(m_Status[psRowSelection] && point.y > m_szHeader.cy) { // Mark row number => mark whole row (continue) @@ -1627,7 +1629,7 @@ //---------------------------------- { const CSoundFile *pSndFile = GetSoundFile(); - if(pSndFile != nullptr) + if(pSndFile != nullptr && pSndFile->Patterns.IsValidPat(m_nPattern)) { SetCurSel(PatternCursor(0), PatternCursor(pSndFile->Patterns[m_nPattern].GetNumRows() - 1, pSndFile->GetNumChannels() - 1, PatternCursor::lastColumn)); } @@ -1638,7 +1640,7 @@ //------------------------------------- { const CSoundFile *pSndFile = GetSoundFile(); - if(pSndFile != nullptr) + if(pSndFile != nullptr && pSndFile->Patterns.IsValidPat(m_nPattern)) { SetCurSel(PatternCursor(0, m_MenuCursor.GetChannel()), PatternCursor(pSndFile->Patterns[m_nPattern].GetNumRows() - 1, m_MenuCursor.GetChannel(), PatternCursor::lastColumn)); } @@ -1649,7 +1651,7 @@ //---------------------------------------- { const CSoundFile *pSndFile = GetSoundFile(); - if(pSndFile != nullptr) + if(pSndFile != nullptr && pSndFile->Patterns.IsValidPat(m_nPattern)) { PatternCursor beginSel(0, GetCurrentChannel()); PatternCursor endSel(pSndFile->Patterns[m_nPattern].GetNumRows() - 1, GetCurrentChannel(), PatternCursor::lastColumn); @@ -2609,7 +2611,7 @@ //--------------------------------------------------------- { CSoundFile *sndFile = GetSoundFile(); - if(sndFile == nullptr) + if(sndFile == nullptr || !sndFile->Patterns.IsValidPat(m_nPattern)) { return; } @@ -4143,7 +4145,7 @@ case VIEWMSG_COPYPATTERN: { const CSoundFile *pSndFile = GetSoundFile(); - if(pSndFile != nullptr) + if(pSndFile != nullptr && pSndFile->Patterns.IsValidPat(m_nPattern)) { CopyPattern(m_nPattern, PatternRect(PatternCursor(0, 0), PatternCursor(pSndFile->Patterns[m_nPattern].GetNumRows() - 1, pSndFile->GetNumChannels() - 1, PatternCursor::lastColumn))); } @@ -5402,6 +5404,10 @@ return; } CSoundFile &sndFile = pModDoc->GetrSoundFile(); + if(!sndFile.Patterns.IsValidPat(m_nPattern)) + { + return; + } const CHANNELINDEX chn = GetCurrentChannel(); const PatternRow rowBase = sndFile.Patterns[m_nPattern].GetRow(GetCurrentRow()); @@ -5907,7 +5913,7 @@ //---------------------------------------------- { CSoundFile *pSndFile = GetSoundFile(); - if(pSndFile == nullptr) + if(pSndFile == nullptr || !pSndFile->Patterns.IsValidPat(m_nPattern)) { return; } @@ -6457,7 +6463,7 @@ //------------------------------------------------------------------------------------------------------------------------------------- { const CSoundFile *sndFile = GetSoundFile(); - if(startRow == endRow || sndFile == nullptr) + if(startRow == endRow || sndFile == nullptr || !sndFile->Patterns.IsValidPat(m_nPattern)) return false; bool result = false; @@ -6695,7 +6701,7 @@ //------------------------------------------- { const CSoundFile *pSndFile = GetSoundFile(); - if(pSndFile == nullptr) + if(pSndFile == nullptr || !pSndFile->Patterns.IsValidPat(m_nPattern)) return 0; if(!pSndFile->Patterns[m_nPattern].GetOverrideSignature()) return pSndFile->m_nDefaultRowsPerBeat; @@ -6709,7 +6715,7 @@ //---------------------------------------------- { const CSoundFile *pSndFile = GetSoundFile(); - if(pSndFile == nullptr) + if(pSndFile == nullptr || !pSndFile->Patterns.IsValidPat(m_nPattern)) return 0; if(!pSndFile->Patterns[m_nPattern].GetOverrideSignature()) return pSndFile->m_nDefaultRowsPerMeasure; Modified: trunk/OpenMPT/mptrack/View_pat.h =================================================================== --- trunk/OpenMPT/mptrack/View_pat.h 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/View_pat.h 2014-06-14 17:20:24 UTC (rev 4112) @@ -20,8 +20,6 @@ class CEditCommand; class CEffectVis; //rewbs.fxvis class CPatternGotoDialog; -class CPatternRandomizer; -class COpenGLEditor; // Drag & Drop info #define DRAGITEM_VALUEMASK 0x00FFFFFF @@ -291,7 +289,7 @@ void ProcessChar(UINT nChar, UINT nFlags); public: - void DrawPatternData(HDC hdc, const CSoundFile *pSndFile, PATTERNINDEX nPattern, bool selEnable, bool isPlaying, ROWINDEX startRow, ROWINDEX numRows, CHANNELINDEX startChan, CRect &rcClient, int *pypaint); + void DrawPatternData(HDC hdc, PATTERNINDEX nPattern, bool selEnable, bool isPlaying, ROWINDEX startRow, ROWINDEX numRows, CHANNELINDEX startChan, CRect &rcClient, int *pypaint); void DrawLetter(int x, int y, char letter, int sizex=10, int ofsx=0); void DrawNote(int x, int y, UINT note, CTuning* pTuning = NULL); void DrawInstrument(int x, int y, UINT instr); Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2014-06-14 17:20:24 UTC (rev 4112) @@ -163,7 +163,7 @@ // Time signature. numerator = rows per beats / rows pear measure (should sound somewhat logical to you). // the denominator is a bit more tricky, since it cannot be set explicitely. so we just assume quarters for now. - timeInfo.timeSigNumerator = sndFile.m_PlayState.m_nCurrentRowsPerMeasure / MAX(sndFile.m_PlayState.m_nCurrentRowsPerBeat, 1); + timeInfo.timeSigNumerator = sndFile.m_PlayState.m_nCurrentRowsPerMeasure / std::max(sndFile.m_PlayState.m_nCurrentRowsPerBeat, ROWINDEX(1)); timeInfo.timeSigDenominator = 4; //gcd(pSndFile->m_nCurrentRowsPerMeasure, pSndFile->m_nCurrentRowsPerBeat); } } @@ -546,10 +546,10 @@ // Multiple paths const FileDialog::PathList &files = dlg.GetFilenames(); fileSel->nbReturnPath = files.size(); - fileSel->returnMultiplePaths = new char *[fileSel->nbReturnPath]; + fileSel->returnMultiplePaths = new (std::nothrow) char *[fileSel->nbReturnPath]; for(size_t i = 0; i < files.size(); i++) { - char *fname = new char[files[i].ToLocale().length() + 1]; + char *fname = new (std::nothrow) char[files[i].ToLocale().length() + 1]; strcpy(fname, files[i].ToLocale().c_str()); fileSel->returnMultiplePaths[i] = fname; } @@ -569,7 +569,7 @@ // Provide some memory for the return path. fileSel->sizeReturnPath = dlg.GetFirstFile().ToLocale().length() + 1; - fileSel->returnPath = new char[fileSel->sizeReturnPath]; + fileSel->returnPath = new (std::nothrow) char[fileSel->sizeReturnPath]; if(fileSel->returnPath == nullptr) { return 0; Modified: trunk/OpenMPT/mptrack/manual_generator/run.cmd =================================================================== --- trunk/OpenMPT/mptrack/manual_generator/run.cmd 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/manual_generator/run.cmd 2014-06-14 17:20:24 UTC (rev 4112) @@ -2,6 +2,9 @@ REM mkdir html REM wiki.py copy source\*.* html\ +"%ProgramFiles%\7-zip\7z" x html.tgz +"%ProgramFiles%\7-zip\7z" x -y html.tar +del html.tar htmlhelp\hhc.exe "html\OpenMPT Manual.hhp" copy "html\OpenMPT Manual.chm" "..\..\packageTemplate\" @pause \ No newline at end of file Modified: trunk/OpenMPT/mptrack/manual_generator/source/help.css =================================================================== --- trunk/OpenMPT/mptrack/manual_generator/source/help.css 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/manual_generator/source/help.css 2014-06-14 17:20:24 UTC (rev 4112) @@ -7,12 +7,22 @@ color: #000; } +img +{ + border: 0; +} + h1 { background-color: #DFEFFF; padding: 0.25em; } +h1, h2 +{ + border-bottom: 1px solid #aaa; +} + #content { margin: 0 !important; Modified: trunk/OpenMPT/mptrack/manual_generator/wiki.py =================================================================== --- trunk/OpenMPT/mptrack/manual_generator/wiki.py 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/mptrack/manual_generator/wiki.py 2014-06-14 17:20:24 UTC (rev 4112) @@ -12,7 +12,7 @@ base_url = 'http://wiki.openmpt.org' -style = urlopen(base_url + '/load.php?debug=false&lang=en&modules=mediawiki.legacy.common%2Cshared|skins.vector&only=styles&*').read() +style = urlopen(base_url + '/load.php?debug=false&lang=en&modules=mediawiki.legacy.common%2Cshared|mediawiki.ui.button|skins.vector.styles&only=styles&skin=vector&*').read() # Remove a few unused CSS classes style = re.sub(r'\}(\w+)?[\.#]vector([\w >]+)\{.+?\}', '}', style) style_file = open('html/style.css', 'w') Modified: trunk/OpenMPT/packageTemplate/History.txt =================================================================== --- trunk/OpenMPT/packageTemplate/History.txt 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/packageTemplate/History.txt 2014-06-14 17:20:24 UTC (rev 4112) @@ -25,6 +25,56 @@ <ks> coda / Ken Snyder +v1.23.04.00 (14 June 2014, revision 4096) +----------------------------------------- +Pattern tab + [New] <js> Added possibility to interpolate the instrument column. + [Imp] <js> Stay at current order / pattern when removing something from the order list (http://bugs.openmpt.org/view.php?id=511). + [Fix] <js> With overflow paste, marking the pasted pattern area was not working when the paste ended exactly in the last pattern row (broke in OpenMPT 1.23.02.00). + [Fix] <js> Select / Copy Select keys should no longer interfere with mouse dragging (tx coda). + [Fix] <js> Don't crash when the module doesn't have any patterns. + [Fix] <jh> Fix flickering of current-row highlight in pattern view on Wine (http://bugs.openmpt.org/view.php?id=522). + +Sample tab + [Fix] <js> Setting sustain loop points by typing the values in didn't update the waveform display. + [Fix] <js> When removing DC offset from a sample, the wrong volume variable on channels currently playing the modified sample was modified. + +Tree view + [Fix] <js> It was not possible to drag and drop drums from sound banks (http://bugs.openmpt.org/view.php?id=536, x64 only). + +VST / DMO Plugins + [Imp] <js> Improve preset menu creation in the plugin editor for plugins with less than 128 presets, so that the menu is only created when needed (speeds up e.g. bridged VOPM). + [Imp] <js> When trying to load a plugin where both the 32-bit and 64-bit version are registered in OpenMPT, prefer the native version. + [Fix] <js> When trying to play notes in a VST GUI with no instrument assigned yet, prevent notes from being stuck after closing the instrument creation confirmation (tx coda). + +VST::Plugin Bridge + [Fix] <js> Don't crash when a plugin sends an opcode that isn't expected to have a data pointer set (http://bugs.openmpt.org/view.php?id=519). + [Fix] <js> Unknown vendor-specific opcodes that send pointers are now rejected, as they cannot work over the bridge. + +XM + [Fix] <js> More intelligent extraction of the selected MIDI program for files that were not made with ModPlug. + [Fix] <js> Loading ADPCM-compressed samples broke in OpenMPT 1.23 (http://bugs.openmpt.org/view.php?id=538). + +S3M + [Fix] <js> Some files created with Scream Tracker were detected as being made with Velvet Studio. + +MOD + [Fix] <js> Loading ADPCM-compressed samples was broken ever since OpenMPT 1.22.06.00. + +Other formats + [Fix] <js> IMF: Ignore note cut with a zero parameter. + +Audio I/O + [Mod] <jh> Default to 16-bit output on Wine, since some Wine versions apparently have problems with sample formats > 16bit. + [Fix] <jh> DirectSound: Emulated drivers do not support primary buffer access. Actually test whether the device is emulated or not and do not advertise primary buffer support if it is. + [Fix] <jh> Fix clamping / rounding of WaveOut and DirectSound buffer sizes for 24bit samples (http://bugs.openmpt.org/view.php?id=540). + +Misc + [Imp] <js> When loading plugins during startup, the error message that was potentially shown didn't appear in the task bar, making it easy to forget about such a half-initialized OpenMPT instance. + [Fix] <js> Potential fix for a crash when loading modules through the command-line (tx coda). + [Fix] <js> "Find MPT Hacks" erroneously identified FT2 pan law mix mode as a hack (http://bugs.openmpt.org/view.php?id=531). + + v1.23.03.00 (4 May 2014, revision 4039) --------------------------------------- VST / DMO Plugins @@ -40,7 +90,7 @@ [Fix] <js> Moving plugins unintentionally broke the plugin chain in many cases (http://bugs.openmpt.org/view.php?id=514). Pattern tab - [Imp] <js> Don't require shift key to be pressed when entering numeric effect letters on French keyboards (https://forum.openmpt.org/index.php?topic=5279.0). + [Imp] <js> Don't require shift key to be pressed when entering numeric effect letters on French keyboards (http://forum.openmpt.org/index.php?topic=5279.0). [Imp] <js> Channel mute / channel mute on pattern transition shortcuts got extended to cover all channels covered by the selection instead of just the channel where the cursor is. [Mod] <js> After pasting pattern data, the pasted area is automatically selected (http://bugs.openmpt.org/view.php?id=498). [Fix] <js> When "loop pattern" was enabled, jumping between patterns could trigger sample syncing while playback was paused. @@ -78,13 +128,13 @@ [Fix] <js> Rearranging samples broke in the previous version (http://bugs.openmpt.org/view.php?id=497). Audio I/O - [Fix] <js> With new installations (and probably also upgraded ones), it was possible that OpenMPT was internally rendering at a different sample rate than the sound device was outputting (https://forum.openmpt.org/index.php?topic=5265.0). + [Fix] <js> With new installations (and probably also upgraded ones), it was possible that OpenMPT was internally rendering at a different sample rate than the sound device was outputting (http://forum.openmpt.org/index.php?topic=5265.0). Misc [Imp] <js> All parts of the Song Properties dialog are now updated instantly when switching between formats. [Imp] <js> Made S3M amiga frequency limits option editable from the Song Properties dialog. [Mod] <js> Changed manual format from PDF to CHM. When opening help from certain dialogs, the relevant manual page is automatically opened. - [Fix] <js> SF2 sample frequency conversion was broken in 64-bit builds (https://bugs.openmpt.org/view.php?id=508). + [Fix] <js> SF2 sample frequency conversion was broken in 64-bit builds (http://bugs.openmpt.org/view.php?id=508). [Fix] <js> Modifying patterns, samples, etc. should now always update other views of the same type of the same module properly. [Fix] <js> DefaultTemplate option was looking for the template file in the wrong paths. Modified: trunk/OpenMPT/pluginBridge/Bridge.cpp =================================================================== --- trunk/OpenMPT/pluginBridge/Bridge.cpp 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/pluginBridge/Bridge.cpp 2014-06-14 17:20:24 UTC (rev 4112) @@ -892,6 +892,11 @@ case audioMasterVendorSpecific: if(index != kVendorOpenMPT || value != kUpdateProcessingBuffer) { + if(ptr != 0) + { + // Cannot translate this. + return 0; + } break; } MPT_FALLTHROUGH; @@ -963,6 +968,12 @@ case audioMasterCanDo: // Name in [ptr] + if(!strcmp(ptrC, "openFileSelector") + || !strcmp(ptrC, "closeFileSelector")) + { + // Not supported through the bridge yet. + return -1; + } ptrOut = strlen(ptrC) + 1; dispatchData.insert(dispatchData.end(), ptrC, ptrC + ptrOut); break; Modified: trunk/OpenMPT/soundlib/Load_ams.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_ams.cpp 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/soundlib/Load_ams.cpp 2014-06-14 17:20:24 UTC (rev 4112) @@ -99,7 +99,7 @@ CMD_GLOBALVOLUME, // Global volume (0... 127) }; - static ModCommand dummy; + ModCommand dummy; for(ROWINDEX row = 0; row < pattern.GetNumRows(); row++) { Modified: trunk/OpenMPT/soundlib/Load_imf.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_imf.cpp 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/soundlib/Load_imf.cpp 2014-06-14 17:20:24 UTC (rev 4112) @@ -364,7 +364,9 @@ break; case 0xC: // note cut case 0xD: // note delay - // no change + // Apparently, Imago Orpheus doesn't cut samples on tick 0. + if(!m.param) + m.command = CMD_NONE; break; case 0xE: // ignore envelope /* predicament: we can only disable one envelope at a time. Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_s3m.cpp 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2014-06-14 17:20:24 UTC (rev 4112) @@ -214,7 +214,7 @@ m_dwLastSavedWithVersion = MAKE_VERSION_NUMERIC(1, 16, 00, 00); madeWithTracker = "ModPlug Tracker / OpenMPT"; keepMidiMacros = true; - } else if(fileHeader.special == 0 && fileHeader.ultraClicks == 0 && fileHeader.flags == 0 && fileHeader.usePanningTable == 0) + } else if(fileHeader.cwtv == S3MFileHeader::trkST3_20 && fileHeader.special == 0 && fileHeader.ultraClicks == 0 && fileHeader.flags == 0 && fileHeader.usePanningTable == 0) { madeWithTracker = "Velvet Studio"; } else Modified: trunk/OpenMPT/soundlib/XMTools.cpp =================================================================== --- trunk/OpenMPT/soundlib/XMTools.cpp 2014-06-11 19:18:15 UTC (rev 4111) +++ trunk/OpenMPT/soundlib/XMTools.cpp 2014-06-14 17:20:24 UTC (rev 4112) @@ -233,8 +233,8 @@ { mptIns.nMidiChannel = midiChannel + MidiFirstChannel; Limit(mptIns.nMidiChannel, uint8(MidiFirstChannel), uint8(MidiLastChannel)); + mptIns.nMidiProgram = static_cast<uint8>(std::min(midiProgram, uint16(127)) + 1); } - //mptIns.nMidiProgram = midiProgram + 1; mptIns.midiPWD = static_cast<int8>(pitchWheelRange); } @@ -288,6 +288,7 @@ sampleHeaderSize = sizeof(XMSample); } else { + // TODO: FT2 completely ignores MIDI settings (and also the less important stuff) if not at least one (empty) sample is assigned to this instrument! size -= sizeof(XMInstrument); sampleHeaderSize = 0; } @@ -301,7 +302,7 @@ numSamples = instrument.ConvertToXM(mptIns, compatibilityExport); mpt::String::Write<mpt::String::spacePadded>(name, mptIns.name); - type = mptIns.nMidiProgram; // If FT2 writes crap here, we can do so, too! (we probably shouldn't, though.) + type = mptIns.nMidiProgram; // If FT2 writes crap here, we can do so, too! (we probably shouldn't, though. This is just for backwards compatibility with old MPT versions.) } @@ -325,7 +326,11 @@ mpt::String::Read<mpt::String::spacePadded>(mptIns.name, name); - mptIns.nMidiProgram = type; + // Old MPT backwards compatibility + if(!instrument.midiEnabled) + { + mptIns.nMidiProgram = type; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-06-18 06:37:11
|
Revision: 4122 http://sourceforge.net/p/modplug/code/4122 Author: manxorist Date: 2014-06-18 06:37:00 +0000 (Wed, 18 Jun 2014) Log Message: ----------- [Var] Cleanup svn:ignore property for all directories. Property Changed: ---------------- trunk/OpenMPT/build/ trunk/OpenMPT/build/gen/ trunk/OpenMPT/common/ trunk/OpenMPT/include/ trunk/OpenMPT/include/flac/ trunk/OpenMPT/include/flac/src/libFLAC/ trunk/OpenMPT/include/foobar2000sdk/foobar2000/SDK/ trunk/OpenMPT/include/foobar2000sdk/foobar2000/foobar2000_component_client/ trunk/OpenMPT/include/foobar2000sdk/foobar2000/helpers/ trunk/OpenMPT/include/foobar2000sdk/pfc/ trunk/OpenMPT/include/lhasa/ trunk/OpenMPT/include/miniz/ trunk/OpenMPT/include/modplug/include/libmodplug/ trunk/OpenMPT/include/portaudio/ trunk/OpenMPT/include/portaudio/build/msvc/ trunk/OpenMPT/include/portmidi/ trunk/OpenMPT/include/smbPitchShift/ trunk/OpenMPT/include/soundtouch/ trunk/OpenMPT/include/unrar/ trunk/OpenMPT/include/zlib/ trunk/OpenMPT/include/zlib/contrib/vstudio/vc10/ trunk/OpenMPT/include/zlib/contrib/vstudio/vc9/ trunk/OpenMPT/libopenmpt/ trunk/OpenMPT/mptrack/ trunk/OpenMPT/mptrack/manual_generator/ trunk/OpenMPT/openmpt123/ trunk/OpenMPT/pluginBridge/ trunk/OpenMPT/plugins/MidiInOut/ trunk/OpenMPT/sounddev/ trunk/OpenMPT/sounddsp/ trunk/OpenMPT/soundlib/plugins/ trunk/OpenMPT/test/ trunk/OpenMPT/unarchiver/ Index: trunk/OpenMPT/build =================================================================== --- trunk/OpenMPT/build 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/build 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/build ___________________________________________________________________ Modified: svn:ignore ## -1,4 +1,8 ## +*.suo +*.sdf +*.opensdf +ipch lib obj +all.sln premake4.exe -all.sln Index: trunk/OpenMPT/build/gen =================================================================== --- trunk/OpenMPT/build/gen 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/build/gen 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/build/gen ___________________________________________________________________ Added: svn:ignore ## -0,0 +1 ## +*.user Index: trunk/OpenMPT/common =================================================================== --- trunk/OpenMPT/common 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/common 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/common ___________________________________________________________________ Modified: svn:ignore ## -1,3 +1,2 ## *.d *.o -svn_version Index: trunk/OpenMPT/include =================================================================== --- trunk/OpenMPT/include 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include ___________________________________________________________________ Deleted: svn:ignore ## -1,7 +0,0 ## -*.sdf -*.suo -bin -include.sln -includeDLL.sln -ipch -premake4.exe \ No newline at end of property Deleted: svn:global-ignores ## -1 +0,0 ## -premake4.exe \ No newline at end of property Index: trunk/OpenMPT/include/flac =================================================================== --- trunk/OpenMPT/include/flac 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/flac 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/flac ___________________________________________________________________ Deleted: svn:ignore ## -1,2 +0,0 ## -*.user -obj \ No newline at end of property Deleted: svn:global-ignores ## -1 +0,0 ## -obj \ No newline at end of property Index: trunk/OpenMPT/include/flac/src/libFLAC =================================================================== --- trunk/OpenMPT/include/flac/src/libFLAC 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/flac/src/libFLAC 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/flac/src/libFLAC ___________________________________________________________________ Deleted: svn:ignore ## -1,5 +0,0 ## -*.user -Debug64_static -Debug_static -Release64_static -Release_static \ No newline at end of property Index: trunk/OpenMPT/include/foobar2000sdk/foobar2000/SDK =================================================================== --- trunk/OpenMPT/include/foobar2000sdk/foobar2000/SDK 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/foobar2000sdk/foobar2000/SDK 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/foobar2000sdk/foobar2000/SDK ___________________________________________________________________ Deleted: svn:global-ignores ## -1,3 +0,0 ## -Debug -foobar2000_SDK.vcxproj.user -Release \ No newline at end of property Index: trunk/OpenMPT/include/foobar2000sdk/foobar2000/foobar2000_component_client =================================================================== --- trunk/OpenMPT/include/foobar2000sdk/foobar2000/foobar2000_component_client 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/foobar2000sdk/foobar2000/foobar2000_component_client 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/foobar2000sdk/foobar2000/foobar2000_component_client ___________________________________________________________________ Deleted: svn:global-ignores ## -1,3 +0,0 ## -Debug -foobar2000_component_client.vcxproj.user -Release \ No newline at end of property Index: trunk/OpenMPT/include/foobar2000sdk/foobar2000/helpers =================================================================== --- trunk/OpenMPT/include/foobar2000sdk/foobar2000/helpers 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/foobar2000sdk/foobar2000/helpers 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/foobar2000sdk/foobar2000/helpers ___________________________________________________________________ Deleted: svn:global-ignores ## -1,3 +0,0 ## -Debug -foobar2000_sdk_helpers.vcxproj.user -Release \ No newline at end of property Index: trunk/OpenMPT/include/foobar2000sdk/pfc =================================================================== --- trunk/OpenMPT/include/foobar2000sdk/pfc 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/foobar2000sdk/pfc 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/foobar2000sdk/pfc ___________________________________________________________________ Deleted: svn:global-ignores ## -1,3 +0,0 ## -Debug -pfc.vcxproj.user -Release \ No newline at end of property Index: trunk/OpenMPT/include/lhasa =================================================================== --- trunk/OpenMPT/include/lhasa 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/lhasa 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/lhasa ___________________________________________________________________ Deleted: svn:ignore ## -1,4 +0,0 ## -Debug -Release -lhasa.vcxproj.user -obj \ No newline at end of property Deleted: svn:global-ignores ## -1 +0,0 ## -obj \ No newline at end of property Index: trunk/OpenMPT/include/miniz =================================================================== --- trunk/OpenMPT/include/miniz 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/miniz 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/miniz ___________________________________________________________________ Modified: svn:ignore ## -1,3 +1,2 ## *.d *.o -obj Deleted: svn:global-ignores ## -1 +0,0 ## -miniz.vcxproj.user \ No newline at end of property Index: trunk/OpenMPT/include/modplug/include/libmodplug =================================================================== --- trunk/OpenMPT/include/modplug/include/libmodplug 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/modplug/include/libmodplug 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/modplug/include/libmodplug ___________________________________________________________________ Deleted: svn:ignore ## -1 +0,0 ## - \ No newline at end of property Index: trunk/OpenMPT/include/portaudio =================================================================== --- trunk/OpenMPT/include/portaudio 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/portaudio 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/portaudio ___________________________________________________________________ Deleted: svn:ignore ## -1,2 +0,0 ## -*.user -obj \ No newline at end of property Deleted: svn:global-ignores ## -1 +0,0 ## -obj \ No newline at end of property Index: trunk/OpenMPT/include/portaudio/build/msvc =================================================================== --- trunk/OpenMPT/include/portaudio/build/msvc 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/portaudio/build/msvc 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/portaudio/build/msvc ___________________________________________________________________ Deleted: svn:ignore ## -1,4 +0,0 ## -portaudio_openmpt_vs2010.vcxproj.user -Win32 -*.user -x64 \ No newline at end of property Index: trunk/OpenMPT/include/portmidi =================================================================== --- trunk/OpenMPT/include/portmidi 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/portmidi 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/portmidi ___________________________________________________________________ Deleted: svn:ignore ## -1 +0,0 ## -portmidi.vcxproj.user \ No newline at end of property Deleted: svn:global-ignores ## -1 +0,0 ## -obj \ No newline at end of property Index: trunk/OpenMPT/include/smbPitchShift =================================================================== --- trunk/OpenMPT/include/smbPitchShift 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/smbPitchShift 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/smbPitchShift ___________________________________________________________________ Deleted: svn:ignore ## -1,4 +0,0 ## -Debug -Release -*.user -obj \ No newline at end of property Deleted: svn:global-ignores ## -1 +0,0 ## -obj \ No newline at end of property Index: trunk/OpenMPT/include/soundtouch =================================================================== --- trunk/OpenMPT/include/soundtouch 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/soundtouch 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/soundtouch ___________________________________________________________________ Deleted: svn:ignore ## -1,4 +0,0 ## -Debug -Release -*.user -obj \ No newline at end of property Deleted: svn:global-ignores ## -1 +0,0 ## -obj \ No newline at end of property Index: trunk/OpenMPT/include/unrar =================================================================== --- trunk/OpenMPT/include/unrar 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/unrar 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/unrar ___________________________________________________________________ Deleted: svn:ignore ## -1,3 +0,0 ## -*.user -build -obj \ No newline at end of property Index: trunk/OpenMPT/include/zlib =================================================================== --- trunk/OpenMPT/include/zlib 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/zlib 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/zlib ___________________________________________________________________ Deleted: svn:ignore ## -1,2 +0,0 ## -*.user -obj \ No newline at end of property Deleted: svn:global-ignores ## -1 +0,0 ## -obj \ No newline at end of property Index: trunk/OpenMPT/include/zlib/contrib/vstudio/vc10 =================================================================== --- trunk/OpenMPT/include/zlib/contrib/vstudio/vc10 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/zlib/contrib/vstudio/vc10 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/zlib/contrib/vstudio/vc10 ___________________________________________________________________ Deleted: svn:ignore ## -1,2 +0,0 ## -x86 -x64 \ No newline at end of property Index: trunk/OpenMPT/include/zlib/contrib/vstudio/vc9 =================================================================== --- trunk/OpenMPT/include/zlib/contrib/vstudio/vc9 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/include/zlib/contrib/vstudio/vc9 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/include/zlib/contrib/vstudio/vc9 ___________________________________________________________________ Deleted: svn:ignore ## -1 +0,0 ## -x86 \ No newline at end of property Index: trunk/OpenMPT/libopenmpt =================================================================== --- trunk/OpenMPT/libopenmpt 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/libopenmpt 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/libopenmpt ___________________________________________________________________ Modified: svn:ignore ## -1,25 +1,8 ## *.d *.o +*.aps +*.user +*.suo *.sdf -*.suo *.opensdf -Debug -DebugStatic -Release -ReleaseStatic -Test -docs -foo_openmpt.vcxproj.user -in_openmpt.vcxproj.user ipch -libopenmpt.vcxproj.user -libopenmptDLL.vcxproj.user -libopenmpt_foobar2000.vcxproj.user -libopenmpt_modplug.vcxproj.user -libopenmpt_settings-Debug -libopenmpt_settings-Release -libopenmpt_settings.vcxproj.user -libopenmpt_test.vcxproj.user -svn_version -x64 -xmp-openmpt.vcxproj.user Index: trunk/OpenMPT/mptrack =================================================================== --- trunk/OpenMPT/mptrack 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/mptrack 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/mptrack ___________________________________________________________________ Modified: svn:ignore ## -1,10 +1,10 ## +*.d +*.o +*.aps +*.user +*.ncb +*.suo +*.sdf *.opensdf -*.sdf -*.suo -*.user -Debug -Release -ReleaseLTCG -ReleaseNoLTCG ipch -mptrack.aps +mptrack.log Deleted: svn:global-ignores ## -1 +0,0 ## -mptrack.log \ No newline at end of property Index: trunk/OpenMPT/mptrack/manual_generator =================================================================== --- trunk/OpenMPT/mptrack/manual_generator 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/mptrack/manual_generator 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/mptrack/manual_generator ___________________________________________________________________ Deleted: svn:global-ignores ## -1 +0,0 ## -html \ No newline at end of property Index: trunk/OpenMPT/openmpt123 =================================================================== --- trunk/OpenMPT/openmpt123 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/openmpt123 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/openmpt123 ___________________________________________________________________ Modified: svn:ignore ## -1,11 +1,7 ## -Debug -Release -ReleaseStatic -openmpt123.sdf -openmpt123.suo -openmpt123.vcxproj.user -openmpt123.opensdf +*.d +*.o +*.user +*.suo +*.sdf +*.opensdf ipch -DebugStatic -x64 -*.d Index: trunk/OpenMPT/pluginBridge =================================================================== --- trunk/OpenMPT/pluginBridge 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/pluginBridge 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/pluginBridge ___________________________________________________________________ Modified: svn:ignore ## -1,6 +1,8 ## +*.d +*.o *.aps *.user -Debug -PluginBridge.sdf -Release -PluginBridge.suo +*.suo +*.sdf +*.opensdf +ipch Index: trunk/OpenMPT/plugins/MidiInOut =================================================================== --- trunk/OpenMPT/plugins/MidiInOut 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/plugins/MidiInOut 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/plugins/MidiInOut ___________________________________________________________________ Modified: svn:ignore ## -1 +1,3 ## +*.d +*.o *.user Index: trunk/OpenMPT/sounddev =================================================================== --- trunk/OpenMPT/sounddev 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/sounddev 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/sounddev ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,2 ## +*.d +*.o Index: trunk/OpenMPT/sounddsp =================================================================== --- trunk/OpenMPT/sounddsp 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/sounddsp 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/sounddsp ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,2 ## +*.d +*.o Index: trunk/OpenMPT/soundlib/plugins =================================================================== --- trunk/OpenMPT/soundlib/plugins 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/soundlib/plugins 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/soundlib/plugins ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,2 ## +*.d +*.o Index: trunk/OpenMPT/test =================================================================== --- trunk/OpenMPT/test 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/test 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/test ___________________________________________________________________ Modified: svn:ignore ## -1,5 +1,5 ## +*.d +*.o test.saved.mptm test.saved.s3m test.saved.xm -*.d -*.o Index: trunk/OpenMPT/unarchiver =================================================================== --- trunk/OpenMPT/unarchiver 2014-06-17 16:56:34 UTC (rev 4121) +++ trunk/OpenMPT/unarchiver 2014-06-18 06:37:00 UTC (rev 4122) Property changes on: trunk/OpenMPT/unarchiver ___________________________________________________________________ Modified: svn:ignore ## -1,4 +1,2 ## -Debug -Release -unarchiver_10.vcxproj.user -*.user +*.d +*.o This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-06-18 08:19:27
|
Revision: 4125 http://sourceforge.net/p/modplug/code/4125 Author: manxorist Date: 2014-06-18 08:19:08 +0000 (Wed, 18 Jun 2014) Log Message: ----------- [Mod] openmpt123: Always build with SDL if available in order to work by default on systems with no PortAudio. If both are available, PortAudio is still the default. [Fix] openmpt123: Properly initialize SDL as per API specification. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/libopenmpt/dox/changelog.md trunk/OpenMPT/openmpt123/openmpt123_sdl.hpp Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2014-06-18 07:16:30 UTC (rev 4124) +++ trunk/OpenMPT/Makefile 2014-06-18 08:19:08 UTC (rev 4125) @@ -58,7 +58,7 @@ # Build flags for openmpt123 (provide on each `make` invocation) # # (defaults are 0): -# USE_SDL=1 Use SDL (in addition to or in place of PortAudio) +# NO_SDL=1 Avoid using SDL, even if found # NO_PORTAUDIO=1 Avoid using PortAudio, even if found # NO_FLAC=1 Avoid using FLAC, even if found # NO_WAVPACK=1 Avoid using WavPack, even if found @@ -271,12 +271,15 @@ else endif -ifeq ($(USE_SDL),1) +ifeq ($(NO_SDL),1) +else #LDLIBS += -lsdl ifeq ($(shell pkg-config --exists sdl && echo yes),yes) CPPFLAGS_SDL := $(shell pkg-config --cflags-only-I sdl ) -DMPT_WITH_SDL LDFLAGS_SDL := $(shell pkg-config --libs-only-L sdl ) $(shell pkg-config --libs-only-other sdl ) LDLIBS_SDL := $(shell pkg-config --libs-only-l sdl ) +else +NO_SDL:=1 endif endif Modified: trunk/OpenMPT/libopenmpt/dox/changelog.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/changelog.md 2014-06-18 07:16:30 UTC (rev 4124) +++ trunk/OpenMPT/libopenmpt/dox/changelog.md 2014-06-18 08:19:08 UTC (rev 4125) @@ -5,6 +5,11 @@ For fully detailed change log, please see the source repository directly. This is just a high-level summary. +### libopenmpt svn + + * openmpt123: SDL is now also used by default if availble, in addition to + PortAudio. + ### 2014-06-15 - libopenmpt 0.2-beta5 * Add unmo3 support for non-Windows builds. Modified: trunk/OpenMPT/openmpt123/openmpt123_sdl.hpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123_sdl.hpp 2014-06-18 07:16:30 UTC (rev 4124) +++ trunk/OpenMPT/openmpt123/openmpt123_sdl.hpp 2014-06-18 08:19:08 UTC (rev 4125) @@ -41,7 +41,7 @@ , channels(flags.channels) { double bufferSeconds = flags.buffer * 0.001; - check_sdl_error( SDL_InitSubSystem( SDL_INIT_NOPARACHUTE | SDL_INIT_TIMER | SDL_INIT_AUDIO ) ); + check_sdl_error( SDL_Init( SDL_INIT_NOPARACHUTE | SDL_INIT_TIMER | SDL_INIT_AUDIO ) ); SDL_AudioSpec audiospec; std::memset( &audiospec, 0, sizeof( SDL_AudioSpec ) ); audiospec.freq = flags.samplerate; @@ -59,7 +59,7 @@ ~sdl_stream_raii() { SDL_PauseAudio( 1 ); SDL_CloseAudio(); - SDL_QuitSubSystem( SDL_INIT_NOPARACHUTE | SDL_INIT_TIMER | SDL_INIT_AUDIO ); + SDL_Quit(); } private: static void sdl_callback_wrapper( void * userdata, Uint8 * stream, int len ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-06-18 10:15:56
|
Revision: 4126 http://sourceforge.net/p/modplug/code/4126 Author: manxorist Date: 2014-06-18 10:15:43 +0000 (Wed, 18 Jun 2014) Log Message: ----------- [Var] C;eanup of svn:ignore had been a tiny bit too aggressive. Add back the required ignores. Property Changed: ---------------- trunk/OpenMPT/include/foobar2000sdk/foobar2000/SDK/ trunk/OpenMPT/include/foobar2000sdk/foobar2000/foobar2000_component_client/ trunk/OpenMPT/include/foobar2000sdk/foobar2000/helpers/ trunk/OpenMPT/include/foobar2000sdk/pfc/ trunk/OpenMPT/libopenmpt/ Index: trunk/OpenMPT/include/foobar2000sdk/foobar2000/SDK =================================================================== --- trunk/OpenMPT/include/foobar2000sdk/foobar2000/SDK 2014-06-18 08:19:08 UTC (rev 4125) +++ trunk/OpenMPT/include/foobar2000sdk/foobar2000/SDK 2014-06-18 10:15:43 UTC (rev 4126) Property changes on: trunk/OpenMPT/include/foobar2000sdk/foobar2000/SDK ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,3 ## +*.user +Debug +Release Index: trunk/OpenMPT/include/foobar2000sdk/foobar2000/foobar2000_component_client =================================================================== --- trunk/OpenMPT/include/foobar2000sdk/foobar2000/foobar2000_component_client 2014-06-18 08:19:08 UTC (rev 4125) +++ trunk/OpenMPT/include/foobar2000sdk/foobar2000/foobar2000_component_client 2014-06-18 10:15:43 UTC (rev 4126) Property changes on: trunk/OpenMPT/include/foobar2000sdk/foobar2000/foobar2000_component_client ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,3 ## +*.user +Debug +Release Index: trunk/OpenMPT/include/foobar2000sdk/foobar2000/helpers =================================================================== --- trunk/OpenMPT/include/foobar2000sdk/foobar2000/helpers 2014-06-18 08:19:08 UTC (rev 4125) +++ trunk/OpenMPT/include/foobar2000sdk/foobar2000/helpers 2014-06-18 10:15:43 UTC (rev 4126) Property changes on: trunk/OpenMPT/include/foobar2000sdk/foobar2000/helpers ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,3 ## +*.user +Debug +Release Index: trunk/OpenMPT/include/foobar2000sdk/pfc =================================================================== --- trunk/OpenMPT/include/foobar2000sdk/pfc 2014-06-18 08:19:08 UTC (rev 4125) +++ trunk/OpenMPT/include/foobar2000sdk/pfc 2014-06-18 10:15:43 UTC (rev 4126) Property changes on: trunk/OpenMPT/include/foobar2000sdk/pfc ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,3 ## +*.user +Debug +Release Index: trunk/OpenMPT/libopenmpt =================================================================== --- trunk/OpenMPT/libopenmpt 2014-06-18 08:19:08 UTC (rev 4125) +++ trunk/OpenMPT/libopenmpt 2014-06-18 10:15:43 UTC (rev 4126) Property changes on: trunk/OpenMPT/libopenmpt ___________________________________________________________________ Modified: svn:ignore ## -6,3 +6,5 ## *.sdf *.opensdf ipch +Debug +Release This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-06-19 12:53:16
|
Revision: 4139 http://sourceforge.net/p/modplug/code/4139 Author: saga-games Date: 2014-06-19 12:53:01 +0000 (Thu, 19 Jun 2014) Log Message: ----------- [Imp] VST: Allow drag&drop actions on plugin editors to drop preset files. Modified Paths: -------------- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp trunk/OpenMPT/mptrack/AbstractVstEditor.h trunk/OpenMPT/mptrack/DefaultVstEditor.cpp trunk/OpenMPT/mptrack/VSTEditor.cpp trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/mptrack/Vstplug.h trunk/OpenMPT/soundlib/plugins/PlugInterface.h Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2014-06-19 10:07:57 UTC (rev 4138) +++ trunk/OpenMPT/mptrack/AbstractVstEditor.cpp 2014-06-19 12:53:01 UTC (rev 4139) @@ -40,6 +40,7 @@ ON_WM_INITMENU() ON_WM_MENUSELECT() ON_WM_ACTIVATE() + ON_WM_DROPFILES() ON_COMMAND(ID_EDIT_COPY, OnCopyParameters) ON_COMMAND(ID_EDIT_PASTE, OnPasteParameters) ON_COMMAND(ID_PRESET_LOAD, OnLoadPreset) @@ -122,6 +123,24 @@ } +// Drop files from Windows +void CAbstractVstEditor::OnDropFiles(HDROP hDropInfo) +//--------------------------------------------------- +{ + const UINT nFiles = ::DragQueryFileW(hDropInfo, (UINT)-1, NULL, 0); + CMainFrame::GetMainFrame()->SetForegroundWindow(); + for(UINT f = 0; f < nFiles; f++) + { + WCHAR fileName[MAX_PATH]; + if(::DragQueryFileW(hDropInfo, f, fileName, CountOf(fileName))) + { + m_VstPlugin.LoadProgram(mpt::PathString::FromNative(fileName)); + } + } + ::DragFinish(hDropInfo); +} + + void CAbstractVstEditor::OnLoadPreset() //------------------------------------- { Modified: trunk/OpenMPT/mptrack/AbstractVstEditor.h =================================================================== --- trunk/OpenMPT/mptrack/AbstractVstEditor.h 2014-06-19 10:07:57 UTC (rev 4138) +++ trunk/OpenMPT/mptrack/AbstractVstEditor.h 2014-06-19 12:53:01 UTC (rev 4139) @@ -66,6 +66,7 @@ afx_msg void OnMenuSelect(UINT nItemID, UINT nFlags, HMENU hMenu); afx_msg LRESULT OnCustomKeyMsg(WPARAM, LPARAM); //rewbs.customKeys afx_msg LRESULT OnMidiMsg(WPARAM, LPARAM); + afx_msg void OnDropFiles(HDROP hDropInfo); //Overridden methods: virtual void OnOK() = 0; Modified: trunk/OpenMPT/mptrack/DefaultVstEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/DefaultVstEditor.cpp 2014-06-19 10:07:57 UTC (rev 4138) +++ trunk/OpenMPT/mptrack/DefaultVstEditor.cpp 2014-06-19 12:53:01 UTC (rev 4139) @@ -402,6 +402,8 @@ //---------------------------------------------- { Create(IDD_DEFAULTPLUGINEDITOR, parent); + ModifyStyleEx(0, WS_EX_ACCEPTFILES); + SetTitle(); SetupMenu(); Modified: trunk/OpenMPT/mptrack/VSTEditor.cpp =================================================================== --- trunk/OpenMPT/mptrack/VSTEditor.cpp 2014-06-19 10:07:57 UTC (rev 4138) +++ trunk/OpenMPT/mptrack/VSTEditor.cpp 2014-06-19 12:53:01 UTC (rev 4139) @@ -62,6 +62,7 @@ //-------------------------------------------- { Create(IDD_PLUGINEDITOR, parent); + ModifyStyleEx(0, WS_EX_ACCEPTFILES); // Some plugins (e.g. ProteusVX) need to be planted into another control or else they will break our window proc, making the window unusable. plugWindow.Create(nullptr, WS_CHILD | WS_VISIBLE, CRect(0, 0, 100, 100), this); Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2014-06-19 10:07:57 UTC (rev 4138) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2014-06-19 12:53:01 UTC (rev 4139) @@ -1032,8 +1032,8 @@ } -bool CVstPlugin::LoadProgram() -//---------------------------- +bool CVstPlugin::LoadProgram(mpt::PathString fileName) +//---------------------------------------------------- { mpt::PathString defaultDir = TrackerDirectories::Instance().GetWorkingDirectory(DIR_PLUGINPRESETS); bool useDefaultDir = !defaultDir.empty(); @@ -1042,23 +1042,27 @@ defaultDir = m_Factory.dllPath.GetPath(); } - FileDialog dlg = OpenFileDialog() - .DefaultExtension("fxp") - .ExtensionFilter("VST Plugin Programs and Banks (*.fxp,*.fxb)|*.fxp;*.fxb|" - "VST Plugin Programs (*.fxp)|*.fxp|" - "VST Plugin Banks (*.fxb)|*.fxb|" - "All Files|*.*||") - .WorkingDirectory(defaultDir); - if(!dlg.Show(m_pEditor)) return false; + if(fileName.empty()) + { + FileDialog dlg = OpenFileDialog() + .DefaultExtension("fxp") + .ExtensionFilter("VST Plugin Programs and Banks (*.fxp,*.fxb)|*.fxp;*.fxb|" + "VST Plugin Programs (*.fxp)|*.fxp|" + "VST Plugin Banks (*.fxb)|*.fxb|" + "All Files|*.*||") + .WorkingDirectory(defaultDir); + if(!dlg.Show(m_pEditor)) return false; - if(useDefaultDir) - { - TrackerDirectories::Instance().SetWorkingDirectory(dlg.GetWorkingDirectory(), DIR_PLUGINPRESETS); + if(useDefaultDir) + { + TrackerDirectories::Instance().SetWorkingDirectory(dlg.GetWorkingDirectory(), DIR_PLUGINPRESETS); + } + fileName = dlg.GetFirstFile(); } CMappedFile f; const char *errorStr = nullptr; - if(f.Open(dlg.GetFirstFile())) + if(f.Open(fileName)) { FileReader file = f.GetFile(); errorStr = VSTPresets::GetErrorMessage(VSTPresets::LoadFile(file, *this)); @@ -1981,22 +1985,6 @@ } -bool CVstPlugin::MoveNote(UINT note, UINT midiChn, UINT sourceTrackerChn, UINT destTrackerChn) -//--------------------------------------------------------------------------------------------- -{ - note -= NOTE_MIN; - VSTInstrChannel &chn = m_MidiCh[midiChn & 0x0f]; - - if(!chn.noteOnMap[note][sourceTrackerChn]) - return false; - - chn.noteOnMap[note][sourceTrackerChn]--; - chn.noteOnMap[note][destTrackerChn]++; - return true; -} -//end rewbs.introVST - - void CVstPlugin::SetZxxParameter(UINT nParam, UINT nValue) //-------------------------------------------------------- { Modified: trunk/OpenMPT/mptrack/Vstplug.h =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.h 2014-06-19 10:07:57 UTC (rev 4138) +++ trunk/OpenMPT/mptrack/Vstplug.h 2014-06-19 12:53:01 UTC (rev 4139) @@ -208,7 +208,7 @@ VstInt32 GetCurrentProgram(); VstInt32 GetNumProgramCategories(); CString GetFormattedProgramName(VstInt32 index); - bool LoadProgram(); + bool LoadProgram(mpt::PathString fileName = mpt::PathString()); bool SaveProgram(); VstInt32 GetUID() const; VstInt32 GetVersion() const; @@ -274,7 +274,6 @@ void MidiCommand(uint8 nMidiCh, uint8 nMidiProg, uint16 wMidiBank, uint16 note, uint16 vol, CHANNELINDEX trackChannel); void HardAllNotesOff(); bool isPlaying(UINT note, UINT midiChn, UINT trackerChn); - bool MoveNote(UINT note, UINT midiChn, UINT sourceTrackerChn, UINT destTrackerChn); void NotifySongPlaying(bool playing); bool IsSongPlaying() const { return m_bSongPlaying; } bool IsResumed() {return m_bPlugResumed;} @@ -337,7 +336,7 @@ CString GetParamDisplay(PlugParamIndex) { return ""; }; PlugParamValue GetParameter(PlugParamIndex) { return 0; } - bool LoadProgram() { return false; } + bool LoadProgram(mpt::PathString = mpt::PathString()) { return false; } bool SaveProgram() { return false; } void SetCurrentProgram(VstInt32) {} void SetSlot(PLUGINDEX) {} Modified: trunk/OpenMPT/soundlib/plugins/PlugInterface.h =================================================================== --- trunk/OpenMPT/soundlib/plugins/PlugInterface.h 2014-06-19 10:07:57 UTC (rev 4138) +++ trunk/OpenMPT/soundlib/plugins/PlugInterface.h 2014-06-19 12:53:01 UTC (rev 4139) @@ -53,7 +53,6 @@ virtual void HardAllNotesOff() = 0; //rewbs.VSTCompliance virtual void RecalculateGain() = 0; virtual bool isPlaying(UINT note, UINT midiChn, UINT trackerChn) = 0; //rewbs.VSTiNNA - virtual bool MoveNote(UINT note, UINT midiChn, UINT sourceTrackerChn, UINT destTrackerChn) = 0; //rewbs.VSTiNNA virtual void SetParameter(PlugParamIndex paramindex, PlugParamValue paramvalue) = 0; virtual void SetZxxParameter(UINT nParam, UINT nValue) = 0; virtual PlugParamValue GetParameter(PlugParamIndex nIndex) = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-06-19 16:24:28
|
Revision: 4140 http://sourceforge.net/p/modplug/code/4140 Author: saga-games Date: 2014-06-19 16:24:09 +0000 (Thu, 19 Jun 2014) Log Message: ----------- [Mod] Update UnRAR library to version 5.1.6 Modified Paths: -------------- trunk/OpenMPT/build/gen/UnRAR.vcproj trunk/OpenMPT/build/gen/UnRAR.vcxproj trunk/OpenMPT/include/premake4.lua trunk/OpenMPT/include/unrar/OpenMPT.txt trunk/OpenMPT/include/unrar/arccmt.cpp trunk/OpenMPT/include/unrar/archive.cpp trunk/OpenMPT/include/unrar/archive.hpp trunk/OpenMPT/include/unrar/arcread.cpp trunk/OpenMPT/include/unrar/blake2s.cpp trunk/OpenMPT/include/unrar/blake2s_sse.cpp trunk/OpenMPT/include/unrar/cmddata.cpp trunk/OpenMPT/include/unrar/coder.hpp trunk/OpenMPT/include/unrar/compress.hpp trunk/OpenMPT/include/unrar/consio.cpp trunk/OpenMPT/include/unrar/consio.hpp trunk/OpenMPT/include/unrar/crc.cpp trunk/OpenMPT/include/unrar/crypt2.cpp trunk/OpenMPT/include/unrar/crypt3.cpp trunk/OpenMPT/include/unrar/dll.cpp trunk/OpenMPT/include/unrar/dll.hpp trunk/OpenMPT/include/unrar/errhnd.cpp trunk/OpenMPT/include/unrar/errhnd.hpp trunk/OpenMPT/include/unrar/extract.cpp trunk/OpenMPT/include/unrar/extract.hpp trunk/OpenMPT/include/unrar/filcreat.cpp trunk/OpenMPT/include/unrar/filcreat.hpp trunk/OpenMPT/include/unrar/file.cpp trunk/OpenMPT/include/unrar/file.hpp trunk/OpenMPT/include/unrar/filefn.cpp trunk/OpenMPT/include/unrar/find.cpp trunk/OpenMPT/include/unrar/hardlinks.cpp trunk/OpenMPT/include/unrar/loclang.hpp trunk/OpenMPT/include/unrar/log.cpp trunk/OpenMPT/include/unrar/makefile trunk/OpenMPT/include/unrar/model.cpp trunk/OpenMPT/include/unrar/model.hpp trunk/OpenMPT/include/unrar/options.cpp trunk/OpenMPT/include/unrar/options.hpp trunk/OpenMPT/include/unrar/os.hpp trunk/OpenMPT/include/unrar/pathfn.cpp trunk/OpenMPT/include/unrar/pathfn.hpp trunk/OpenMPT/include/unrar/rar.cpp trunk/OpenMPT/include/unrar/rar.hpp trunk/OpenMPT/include/unrar/rardefs.hpp trunk/OpenMPT/include/unrar/raros.hpp trunk/OpenMPT/include/unrar/rarvm.cpp trunk/OpenMPT/include/unrar/rawread.cpp trunk/OpenMPT/include/unrar/rawread.hpp trunk/OpenMPT/include/unrar/rdwrfn.cpp trunk/OpenMPT/include/unrar/rdwrfn.hpp trunk/OpenMPT/include/unrar/recvol.cpp trunk/OpenMPT/include/unrar/recvol3.cpp trunk/OpenMPT/include/unrar/recvol5.cpp trunk/OpenMPT/include/unrar/resource.cpp trunk/OpenMPT/include/unrar/rijndael.cpp trunk/OpenMPT/include/unrar/rijndael.hpp trunk/OpenMPT/include/unrar/scantree.cpp trunk/OpenMPT/include/unrar/sha1.cpp trunk/OpenMPT/include/unrar/sha1.hpp trunk/OpenMPT/include/unrar/sha256.cpp trunk/OpenMPT/include/unrar/strfn.cpp trunk/OpenMPT/include/unrar/strfn.hpp trunk/OpenMPT/include/unrar/suballoc.cpp trunk/OpenMPT/include/unrar/suballoc.hpp trunk/OpenMPT/include/unrar/threadmisc.cpp trunk/OpenMPT/include/unrar/threadpool.cpp trunk/OpenMPT/include/unrar/threadpool.hpp trunk/OpenMPT/include/unrar/timefn.cpp trunk/OpenMPT/include/unrar/timefn.hpp trunk/OpenMPT/include/unrar/ulinks.cpp trunk/OpenMPT/include/unrar/unicode.cpp trunk/OpenMPT/include/unrar/unicode.hpp trunk/OpenMPT/include/unrar/unpack.cpp trunk/OpenMPT/include/unrar/unpack.hpp trunk/OpenMPT/include/unrar/unpack50.cpp trunk/OpenMPT/include/unrar/unpack50frag.cpp trunk/OpenMPT/include/unrar/unpack50mt.cpp trunk/OpenMPT/include/unrar/uowners.cpp trunk/OpenMPT/include/unrar/version.hpp trunk/OpenMPT/include/unrar/volume.cpp trunk/OpenMPT/include/unrar/volume.hpp trunk/OpenMPT/include/unrar/win32acl.cpp trunk/OpenMPT/include/unrar/win32lnk.cpp trunk/OpenMPT/include/unrar/win32stm.cpp trunk/OpenMPT/unarchiver/unrar.cpp Added Paths: ----------- trunk/OpenMPT/include/unrar/ui.cpp trunk/OpenMPT/include/unrar/ui.hpp trunk/OpenMPT/include/unrar/uicommon.cpp trunk/OpenMPT/include/unrar/uiconsole.cpp trunk/OpenMPT/include/unrar/uisilent.cpp Modified: trunk/OpenMPT/build/gen/UnRAR.vcproj =================================================================== --- trunk/OpenMPT/build/gen/UnRAR.vcproj 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/build/gen/UnRAR.vcproj 2014-06-19 16:24:09 UTC (rev 4140) @@ -678,6 +678,10 @@ > </File> <File + RelativePath="..\..\include\unrar\ui.cpp" + > + </File> + <File RelativePath="..\..\include\unrar\unicode.cpp" > </File> @@ -938,6 +942,10 @@ > </File> <File + RelativePath="..\..\include\unrar\ui.hpp" + > + </File> + <File RelativePath="..\..\include\unrar\unicode.hpp" > </File> Modified: trunk/OpenMPT/build/gen/UnRAR.vcxproj =================================================================== --- trunk/OpenMPT/build/gen/UnRAR.vcxproj 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/build/gen/UnRAR.vcxproj 2014-06-19 16:24:09 UTC (rev 4140) @@ -342,6 +342,7 @@ <ClInclude Include="..\..\include\unrar\threadpool.hpp" /> <ClInclude Include="..\..\include\unrar\timefn.hpp" /> <ClInclude Include="..\..\include\unrar\ulinks.hpp" /> + <ClInclude Include="..\..\include\unrar\ui.hpp" /> <ClInclude Include="..\..\include\unrar\unicode.hpp" /> <ClInclude Include="..\..\include\unrar\unpack.hpp" /> <ClInclude Include="..\..\include\unrar\version.hpp" /> @@ -440,6 +441,8 @@ </ClCompile> <ClCompile Include="..\..\include\unrar\timefn.cpp"> </ClCompile> + <ClCompile Include="..\..\include\unrar\ui.cpp"> + </ClCompile> <ClCompile Include="..\..\include\unrar\unicode.cpp"> </ClCompile> <ClCompile Include="..\..\include\unrar\unpack.cpp"> Modified: trunk/OpenMPT/include/premake4.lua =================================================================== --- trunk/OpenMPT/include/premake4.lua 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/premake4.lua 2014-06-19 16:24:09 UTC (rev 4140) @@ -52,6 +52,7 @@ "../include/unrar/system.cpp", "../include/unrar/threadpool.cpp", "../include/unrar/timefn.cpp", + "../include/unrar/ui.cpp", "../include/unrar/unicode.cpp", "../include/unrar/unpack.cpp", "../include/unrar/volume.cpp", @@ -119,6 +120,7 @@ "../include/unrar/threadpool.hpp", "../include/unrar/timefn.hpp", "../include/unrar/ulinks.hpp", + "../include/unrar/ui.hpp", "../include/unrar/unicode.hpp", "../include/unrar/unpack.hpp", "../include/unrar/version.hpp", Modified: trunk/OpenMPT/include/unrar/OpenMPT.txt =================================================================== --- trunk/OpenMPT/include/unrar/OpenMPT.txt 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/OpenMPT.txt 2014-06-19 16:24:09 UTC (rev 4140) @@ -1,4 +1,4 @@ -This folder is based on http://www.rarlab.com/rar/unrarsrc-5.0.12.tar.gz +This folder is based on http://www.rarlab.com/rar/unrarsrc-5.1.6.tar.gz All modifications to existing files have been done in a manner so that no existing lines were edited; only new lines were added. Modified: trunk/OpenMPT/include/unrar/arccmt.cpp =================================================================== --- trunk/OpenMPT/include/unrar/arccmt.cpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/arccmt.cpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -28,14 +28,14 @@ { // Current (RAR 3.0+) version of archive comment. Seek(GetStartPos(),SEEK_SET); - return(SearchSubBlock(SUBHEAD_TYPE_CMT)!=0 && ReadCommentData(CmtData)); + return SearchSubBlock(SUBHEAD_TYPE_CMT)!=0 && ReadCommentData(CmtData); } #ifndef SFX_MODULE // Old style (RAR 2.9) comment header embedded into the main // archive header. if (BrokenHeader) { - Log(FileName,St(MLogCommHead)); + uiMsg(UIERROR_CMTBROKEN,FileName); return false; } CmtLength=CommHead.HeadSize-SIZEOF_COMMHEAD; @@ -75,7 +75,7 @@ if (Format!=RARFMT14 && (DataIO.UnpHash.GetCRC32()&0xffff)!=CommHead.CommCRC) { - Log(FileName,St(MLogCommBrk)); + uiMsg(UIERROR_CMTBROKEN,FileName); return false; } else @@ -99,7 +99,7 @@ if (Format!=RARFMT14 && CommHead.CommCRC!=(~CRC32(0xffffffff,&CmtRaw[0],CmtLength)&0xffff)) { - Log(FileName,St(MLogCommBrk)); + uiMsg(UIERROR_CMTBROKEN,FileName); return false; } CmtData->Alloc(CmtLength+1); Modified: trunk/OpenMPT/include/unrar/archive.cpp =================================================================== --- trunk/OpenMPT/include/unrar/archive.cpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/archive.cpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -49,6 +49,7 @@ NewArchive=false; SilentOpen=false; + } @@ -67,9 +68,7 @@ // If FailedHeaderDecryption is set, we already reported that archive // password is incorrect. if (!FailedHeaderDecryption) - { - Log(FileName,St(MBadArc),FileName); - } + uiMsg(UIERROR_BADARCHIVE,FileName); ErrHandler.Exit(RARX_FATAL); } } @@ -91,9 +90,7 @@ return false; if (!IsArchive(false)) { -#ifndef SHELL_EXT - Log(FileName,St(MNotRAR),FileName); -#endif + uiMsg(UIERROR_BADARCHIVE,FileName); Close(); return false; } @@ -132,25 +129,16 @@ { Encrypted=false; BrokenHeader=false; // Might be left from previous volume. -#ifdef USE_QOPEN - QOpen.Unload(); -#endif - - // Important if we reuse Archive object and it has virtual QOpen - // file position not matching real. For example, for 'l -v volname'. - Seek(0,SEEK_SET); #ifndef SFX_MODULE if (IsDevice()) { -#ifndef SHELL_EXT - Log(FileName,St(MInvalidName),FileName); -#endif + uiMsg(UIERROR_INVALIDNAME,FileName,FileName); return false; } #endif if (Read(MarkHead.Mark,SIZEOF_MARKHEAD3)!=SIZEOF_MARKHEAD3) - return(false); + return false; SFXSize=0; RARFORMAT Type; @@ -158,7 +146,7 @@ { Format=Type; if (Format==RARFMT14) - Seek(0,SEEK_SET); + Seek(Tell()-SIZEOF_MARKHEAD3,SEEK_SET); } else { @@ -186,9 +174,7 @@ } if (Format==RARFMT_FUTURE) { -#if !defined(SHELL_EXT) && !defined(SFX_MODULE) - Log(FileName,St(MNewRarFormat)); -#endif + uiMsg(UIERROR_NEWRARFORMAT,FileName); return false; } if (Format==RARFMT50) // RAR 5.0 signature is by one byte longer. @@ -201,6 +187,15 @@ else MarkHead.HeadSize=SIZEOF_MARKHEAD3; +#ifdef RARDLL + // If callback function is not set, we cannot get the password, + // so we skip the initial header processing for encrypted header archive. + // It leads to skipped archive comment, but the rest of archive data + // is processed correctly. + if (Cmd->Callback==NULL) + SilentOpen=true; +#endif + // Skip the archive encryption header if any and read the main header. while (ReadHeader()!=0) { @@ -219,40 +214,13 @@ return false; SeekToNext(); - if (BrokenHeader) + if (BrokenHeader) // Main archive header is corrupt. { -#ifndef SHELL_EXT - Log(FileName,St(MMainHeaderBroken)); -#endif + uiMsg(UIERROR_MHEADERBROKEN,FileName); if (!EnableBroken) return false; } -/* - if (MainHead.EncryptVer>VER_UNPACK) - { -#ifdef RARDLL - Cmd->DllError=ERAR_UNKNOWN_FORMAT; -#else - ErrHandler.SetErrorCode(RARX_WARNING); - #if !defined(SILENT) && !defined(SFX_MODULE) - Log(FileName,St(MUnknownMeth),FileName); - Log(FileName,St(MVerRequired),MainHead.EncryptVer/10,MainHead.EncryptVer%10); - #endif -#endif - return(false); - } -*/ - -#ifdef RARDLL - // If callback function is not set, we cannot get the password, - // so we skip the initial header processing for encrypted header archive. - // It leads to skipped archive comment, but the rest of archive data - // is processed correctly. - if (Cmd->Callback==NULL) - SilentOpen=true; -#endif - MainComment=MainHead.CommentInHeader; // If we process non-encrypted archive or can request a password, @@ -271,12 +239,13 @@ { HEADER_TYPE HeaderType=GetHeaderType(); if (HeaderType==HEAD_SERVICE) - FirstVolume=!SubHead.SplitBefore; + FirstVolume=Volume && !SubHead.SplitBefore; else - { - FirstVolume=HeaderType==HEAD_FILE && !FileHead.SplitBefore; - break; - } + if (HeaderType==HEAD_FILE) + { + FirstVolume=Volume && !FileHead.SplitBefore; + break; + } SeekToNext(); } CurBlockPos=SaveCurBlockPos; @@ -319,6 +288,16 @@ #ifdef USE_QOPEN +bool Archive::Open(const wchar *Name,uint Mode) +{ + // Important if we reuse Archive object and it has virtual QOpen + // file position not matching real. For example, for 'l -v volname'. + QOpen.Unload(); + + return File::Open(Name,Mode); +} + + int Archive::Read(void *Data,size_t Size) { size_t Result; Modified: trunk/OpenMPT/include/unrar/archive.hpp =================================================================== --- trunk/OpenMPT/include/unrar/archive.hpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/archive.hpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -86,10 +86,10 @@ const wchar *Name,uint Flags); bool ReadSubData(Array<byte> *UnpData,File *DestFile); HEADER_TYPE GetHeaderType() {return(CurHeaderType);}; - void WriteCommentData(byte *Data,size_t DataSize,bool FileComment); RAROptions* GetRAROptions() {return(Cmd);} void SetSilentOpen(bool Mode) {SilentOpen=Mode;} #ifdef USE_QOPEN + bool Open(const wchar *Name,uint Mode=FMF_READ); int Read(void *Data,size_t Size); void Seek(int64 Offset,int Method); int64 Tell(); Modified: trunk/OpenMPT/include/unrar/arcread.cpp =================================================================== --- trunk/OpenMPT/include/unrar/arcread.cpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/arcread.cpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -88,11 +88,9 @@ // If block positions are equal to file size, this is not an error. // It can happen when we reached the end of older RAR 1.5 archive, // which did not have the end of archive block. - if (CurBlockPos>ArcSize || NextBlockPos>ArcSize) + if (CurBlockPos!=ArcSize || NextBlockPos!=ArcSize) { -#ifndef SHELL_EXT - Log(FileName,St(MLogUnexpEOF)); -#endif + uiMsg(UIERROR_UNEXPEOF,FileName); ErrHandler.SetErrorCode(RARX_WARNING); } } @@ -100,9 +98,7 @@ void Archive::BrokenHeaderMsg() { -#ifndef SHELL_EXT - Log(FileName,St(MHeaderBroken)); -#endif + uiMsg(UIERROR_HEADERBROKEN,FileName); BrokenHeader=true; ErrHandler.SetErrorCode(RARX_CRC); } @@ -110,9 +106,7 @@ void Archive::UnkEncVerMsg(const wchar *Name) { -#ifndef SHELL_EXT - Log(FileName,St(MUnkEncMethod),Name); -#endif + uiMsg(UIERROR_UNKNOWNENCMETHOD,FileName,Name); ErrHandler.SetErrorCode(RARX_WARNING); } @@ -316,15 +310,10 @@ { EncodeFileName NameCoder; size_t Length=strlen(FileName); - if (Length==NameSize) - UtfToWide(FileName,hd->FileName,ASIZE(hd->FileName)-1); - else - { - Length++; - NameCoder.Decode(FileName,(byte *)FileName+Length, - NameSize-Length,hd->FileName, - ASIZE(hd->FileName)); - } + Length++; + NameCoder.Decode(FileName,(byte *)FileName+Length, + NameSize-Length,hd->FileName, + ASIZE(hd->FileName)); } else *hd->FileName=0; @@ -419,11 +408,7 @@ // to have anything sensible in file name field, so it is useless // to display the file name. if (!Decrypt) - { -#ifndef SHELL_EXT - Log(Archive::FileName,St(MLogFileHead),hd->FileName); -#endif - } + uiMsg(UIERROR_FHEADERBROKEN,Archive::FileName,hd->FileName); } } break; @@ -551,9 +536,7 @@ if (Decrypt) { -#ifndef SILENT - Log(FileName,St(MEncrBadCRC),FileName); -#endif + uiMsg(UIERROR_CHECKSUMENC,FileName,FileName); FailedHeaderDecryption=true; return 0; } @@ -595,7 +578,7 @@ // Verify password validity. if (CryptHead.UsePswCheck && memcmp(PswCheck,CryptHead.PswCheck,SIZE_PSWCHECK)!=0) { - Log(FileName,St(MWrongPassword)); + uiMsg(UIERROR_BADPSW,FileName); FailedHeaderDecryption=true; ErrHandler.SetErrorCode(RARX_BADPWD); return 0; @@ -608,8 +591,12 @@ // Header size must not occupy more than 3 variable length integer bytes // resulting in 2 MB maximum header size, so here we read 4 byte CRC32 // followed by 3 bytes or less of header size. - const size_t FirstReadSize=7; - Raw.Read(FirstReadSize); + const size_t FirstReadSize=7; // Smallest possible block size. + if (Raw.Read(FirstReadSize)<FirstReadSize) + { + UnexpEndArcMsg(); + return 0; + } ShortBlock.Reset(); ShortBlock.HeadCRC=Raw.Get4(); @@ -618,7 +605,7 @@ if (BlockSize==0 || SizeBytes==0) { - UnexpEndArcMsg(); // Incomplete or broken block size field. + BrokenHeaderMsg(); return 0; } @@ -659,9 +646,7 @@ if (Decrypt) { -#ifndef SILENT - Log(FileName,St(MEncrBadCRC),FileName); -#endif + uiMsg(UIERROR_CHECKSUMENC,FileName,FileName); FailedHeaderDecryption=true; return 0; } @@ -845,13 +830,8 @@ MainComment=true; - if (BadCRC) - { - // Add the file name to broken header message displayed above. -#ifndef SHELL_EXT - Log(Archive::FileName,St(MLogFileHead),hd->FileName); -#endif - } + if (BadCRC) // Add the file name to broken header message displayed above. + uiMsg(UIERROR_FHEADERBROKEN,Archive::FileName,hd->FileName); } break; case HEAD_ENDARC: @@ -906,9 +886,10 @@ ErrHandler.Exit(RARX_USERBREAK); } #else - if (!GetPassword(PASSWORD_ARCHIVE,FileName,&Cmd->Password)) + if (!uiGetPassword(UIPASSWORD_ARCHIVE,FileName,&Cmd->Password)) { Close(); + uiMsg(UIERROR_INCERRCOUNT); ErrHandler.Exit(RARX_USERBREAK); } #endif @@ -1068,6 +1049,9 @@ Raw->GetB(UtfName,NameSize); UtfName[NameSize]=0; } +#ifdef _WIN_ALL + UnixSlashToDos(UtfName,UtfName,ASIZE(UtfName)); +#endif UtfToWide(UtfName,hd->RedirName,ASIZE(hd->RedirName)); } break; @@ -1175,6 +1159,7 @@ char FileName[NM]; Raw.GetB((byte *)FileName,Min(NameSize,ASIZE(FileName))); FileName[NameSize]=0; + IntToExt(FileName,FileName,ASIZE(FileName)); CharToWide(FileName,FileHead.FileName,ASIZE(FileHead.FileName)); ConvertNameCase(FileHead.FileName); @@ -1215,6 +1200,10 @@ // when creating a file or directory. The typical default value // for the process umask is S_IWGRP | S_IWOTH (octal 022), // resulting in 0644 mode for new files. + // Normally umask is applied automatically when creating a file, + // but we set attributes with chmod later, so we need to calculate + // resulting attributes here. We do it only for non-Unix archives. + // We restore native Unix attributes as is, because it can be backup. static mode_t mask = (mode_t) -1; if (mask == (mode_t) -1) @@ -1329,17 +1318,13 @@ return false; // OPENMPT ADDITION if (BrokenHeader) { -#ifndef SHELL_EXT - Log(FileName,St(MSubHeadCorrupt)); -#endif + uiMsg(UIERROR_SUBHEADERBROKEN,FileName); ErrHandler.SetErrorCode(RARX_CRC); return false; } if (SubHead.Method>5 || SubHead.UnpVer>(Format==RARFMT50 ? VER_UNPACK5:VER_UNPACK)) { -#ifndef SHELL_EXT - Log(FileName,St(MSubHeadUnknown)); -#endif + uiMsg(UIERROR_SUBHEADERUNKNOWN,FileName); return false; } @@ -1355,9 +1340,7 @@ if (SubHead.UnpSize>0x1000000) { // So huge allocation must never happen in valid archives. -#ifndef SHELL_EXT - Log(FileName,St(MSubHeadUnknown)); -#endif + uiMsg(UIERROR_SUBHEADERUNKNOWN,FileName); return false; } UnpData->Alloc((size_t)SubHead.UnpSize); @@ -1384,9 +1367,7 @@ if (!SubDataIO.UnpHash.Cmp(&SubHead.FileHash,SubHead.UseHashKey ? SubHead.HashKey:NULL)) { -#ifndef SHELL_EXT - Log(FileName,St(MSubHeadDataCRC),SubHead.FileName); -#endif + uiMsg(UIERROR_SUBHEADERDATABROKEN,FileName,SubHead.FileName); ErrHandler.SetErrorCode(RARX_CRC); if (UnpData!=NULL) UnpData->Reset(); Modified: trunk/OpenMPT/include/unrar/blake2s.cpp =================================================================== --- trunk/OpenMPT/include/unrar/blake2s.cpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/blake2s.cpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -57,6 +57,11 @@ /* init2 xors IV with input parameter block */ void blake2s_init_param( blake2s_state *S, uint32 node_offset, uint32 node_depth) { +#ifdef USE_SSE + if (_SSE_Version>=SSE_SSE2) + blake2s_init_sse(); +#endif + S->init(); // Clean data. for( int i = 0; i < 8; ++i ) S->h[i] = blake2s_IV[i]; Modified: trunk/OpenMPT/include/unrar/blake2s_sse.cpp =================================================================== --- trunk/OpenMPT/include/unrar/blake2s_sse.cpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/blake2s_sse.cpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -2,6 +2,35 @@ extern const byte blake2s_sigma[10][16]; +// Initialization vector. +static __m128i blake2s_IV_0_3, blake2s_IV_4_7; + +#ifdef _WIN_64 +// Constants for cyclic rotation. Used in 64-bit mode in mm_rotr_epi32 macro. +static __m128i crotr8, crotr16; +#endif + +static void blake2s_init_sse() +{ + // We cannot initialize these 128 bit variables in place when declaring + // them globally, because global scope initialization is performed before + // our SSE check and it would make code incompatible with older non-SSE2 + // CPUs. Also we cannot initialize them as static inside of function + // using these variables, because SSE static initialization is not thread + // safe: first thread starts initialization and sets "init done" flag even + // if it is not done yet, second thread can attempt to access half-init + // SSE data. So we moved init code here. + + blake2s_IV_0_3 = _mm_setr_epi32( 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A ); + blake2s_IV_4_7 = _mm_setr_epi32( 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19 ); + +#ifdef _WIN_64 + crotr8 = _mm_set_epi8( 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1 ); + crotr16 = _mm_set_epi8( 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2 ); +#endif +} + + #define LOAD(p) _mm_load_si128( (__m128i *)(p) ) #define STORE(p,r) _mm_store_si128((__m128i *)(p), r) @@ -72,21 +101,6 @@ static int blake2s_compress_sse( blake2s_state *S, const byte block[BLAKE2S_BLOCKBYTES] ) { - // Initialization vector. Moving them outside of function would provide - // ~5% speed gain in 32-bit mode, but would make code incompatible - // with older non-SSE2 compatible CPUs. Global static initialization - // is performed before our SSE check. - static const __m128i blake2s_IV_0_3 = _mm_setr_epi32( 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A ); - static const __m128i blake2s_IV_4_7 = _mm_setr_epi32( 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19 ); - -#ifdef _WIN_64 - // Constants for cyclic rotation. We use them in 64-bit mode - // in mm_rotr_epi32 macro above. We must not define in global scope - // to be compatible with non-SSE CPU. - static const __m128i crotr8 = _mm_set_epi8( 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1 ); - static const __m128i crotr16 = _mm_set_epi8( 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2 ); -#endif - __m128i row[4]; __m128i ff0, ff1; Modified: trunk/OpenMPT/include/unrar/cmddata.cpp =================================================================== --- trunk/OpenMPT/include/unrar/cmddata.cpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/cmddata.cpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -1,6 +1,5 @@ #include "rar.hpp" - CommandData::CommandData() { Init(); @@ -45,7 +44,7 @@ } -#ifndef SFX_MODULE +#if !defined(SFX_MODULE) && !defined(_ANDROID) void CommandData::ParseCommandLine(bool Preprocess,int argc, char *argv[]) { #ifdef CUSTOM_CMDLINE_PARSER @@ -90,7 +89,7 @@ #endif -#ifndef SFX_MODULE +#if !defined(SFX_MODULE) && !defined(_ANDROID) void CommandData::ParseArg(wchar *Arg) { if (IsSwitch(*Arg) && !NoMoreSwitches) @@ -182,7 +181,7 @@ } -#ifndef SFX_MODULE +#if !defined(SFX_MODULE) && !defined(_ANDROID) void CommandData::ParseEnvVar() { char *EnvStr=getenv("RAR"); @@ -197,7 +196,7 @@ -#ifndef SFX_MODULE +#if !defined(SFX_MODULE) && !defined(_ANDROID) // Preprocess those parameters, which must be processed before the rest of // command line. Return 'false' to stop further processing. bool CommandData::PreprocessSwitch(const wchar *Switch) @@ -235,7 +234,7 @@ #endif -#if !defined(GUI) && !defined(SFX_MODULE) +#if !defined(GUI) && !defined(SFX_MODULE) && !defined(_ANDROID) void CommandData::ReadConfig() { StringList List; @@ -254,7 +253,7 @@ #endif -#ifndef SFX_MODULE +#if !defined(SFX_MODULE) && !defined(_ANDROID) void CommandData::ProcessSwitchesString(const wchar *Str) { wchar *Par; @@ -268,7 +267,7 @@ #endif -#if !defined(SFX_MODULE) +#if !defined(SFX_MODULE) && !defined(_ANDROID) void CommandData::ProcessSwitch(const wchar *Switch) { @@ -366,17 +365,14 @@ break; } break; - case 'E': - ProcessEA=false; - break; default: if (Switch[1]=='+') { - InclFileAttr=GetExclAttr(Switch+2); + InclFileAttr|=GetExclAttr(Switch+2); InclAttrSet=true; } else - ExclFileAttr=GetExclAttr(Switch+1); + ExclFileAttr|=GetExclAttr(Switch+1); break; } break; @@ -399,7 +395,7 @@ else if (!Password.IsSet()) { - GetPassword(PASSWORD_GLOBAL,NULL,&Password); + uiGetPassword(UIPASSWORD_GLOBAL,NULL,&Password); eprintf(L"\n"); } break; @@ -534,7 +530,7 @@ Names++; wchar Mask[NM]; if (wcspbrk(Names,L"*?.")==NULL) - swprintf(Mask,ASIZE(Mask),L"*.%s",Names); + swprintf(Mask,ASIZE(Mask),L"*.%ls",Names); else wcsncpyz(Mask,Names,ASIZE(Mask)); StoreArgs.AddString(Mask); @@ -630,7 +626,7 @@ case 'P': if (Switch[1]==0) { - GetPassword(PASSWORD_GLOBAL,NULL,&Password); + uiGetPassword(UIPASSWORD_GLOBAL,NULL,&Password); eprintf(L"\n"); } else @@ -885,7 +881,7 @@ #endif -#ifndef SFX_MODULE +#if !defined(SFX_MODULE) && !defined(_ANDROID) void CommandData::BadSwitch(const wchar *Switch) { mprintf(St(MUnknownOption),Switch); @@ -931,7 +927,7 @@ // If MSGID is const char*, we cannot compare pointers only. // Pointers to different instances of same string can differ, // so we need to compare complete strings. - return strcmp(i1,i2)==0; + return wcscmp(i1,i2)==0; #endif } @@ -952,9 +948,10 @@ MCHelpSwDH,MCHelpSwEP,MCHelpSwEP3,MCHelpSwF,MCHelpSwIDP,MCHelpSwIERR, MCHelpSwINUL,MCHelpSwIOFF,MCHelpSwKB,MCHelpSwN,MCHelpSwNa,MCHelpSwNal, MCHelpSwO,MCHelpSwOC,MCHelpSwOR,MCHelpSwOW,MCHelpSwP, - MCHelpSwPm,MCHelpSwR,MCHelpSwRI,MCHelpSwSL,MCHelpSwSM,MCHelpSwTA, - MCHelpSwTB,MCHelpSwTN,MCHelpSwTO,MCHelpSwTS,MCHelpSwU,MCHelpSwVUnr, - MCHelpSwVER,MCHelpSwVP,MCHelpSwX,MCHelpSwXa,MCHelpSwXal,MCHelpSwY + MCHelpSwPm,MCHelpSwR,MCHelpSwRI,MCHelpSwSC,MCHelpSwSL,MCHelpSwSM, + MCHelpSwTA,MCHelpSwTB,MCHelpSwTN,MCHelpSwTO,MCHelpSwTS,MCHelpSwU, + MCHelpSwVUnr,MCHelpSwVER,MCHelpSwVP,MCHelpSwX,MCHelpSwXa,MCHelpSwXal, + MCHelpSwY #else #endif }; @@ -995,16 +992,7 @@ if (CmpMSGID(Help[I],MCHelpSwMT)) continue; #endif - if (CmpMSGID(Help[I],MCHelpSwEE)) - { -#if defined(_EMX) && !defined(_DJGPP) - if (_osmode != OS2_MODE) - continue; -#else - continue; #endif - } -#endif mprintf(St(Help[I])); } mprintf(L"\n"); @@ -1228,7 +1216,7 @@ case 'I': { CmdExtract Extract(this); - Extract.DoExtract(this); + Extract.DoExtract(); } break; #ifndef SILENT @@ -1334,37 +1322,23 @@ if (Format==RARFMT15) { if (HashType!=HASH_CRC32) - { - mprintf(St(MIncompatSwitch),L"-ht",4); - } + uiMsg(UIERROR_INCOMPATSWITCH,L"-ht",4); #ifdef _WIN_ALL if (SaveSymLinks) - { - mprintf(St(MIncompatSwitch),L"-ol",4); - } + uiMsg(UIERROR_INCOMPATSWITCH,L"-ol",4); #endif if (SaveHardLinks) - { - mprintf(St(MIncompatSwitch),L"-oh",4); - } + uiMsg(UIERROR_INCOMPATSWITCH,L"-oh",4); #ifdef _WIN_ALL + // Do not report a wrong dictionary size here, because we are not sure + // yet about archive format. We can switch to RAR5 mode later + // if we update RAR5 archive. #endif if (QOpenMode!=QOPEN_AUTO) - { - mprintf(St(MIncompatSwitch),L"-qo",4); - } -/* - // We use 64 MB for both formats and reduce it for RAR 4.x later. - if (WinSize>0x400000) - { - wchar SwMD[10]; - swprintf(SwMD,ASIZE(SwMD),L"-md%dm",WinSize/0x100000); - mprintf(St(MIncompatSwitch),SwMD,4); - } -*/ + uiMsg(UIERROR_INCOMPATSWITCH,L"-qo",4); } if (Format==RARFMT50) { Modified: trunk/OpenMPT/include/unrar/coder.hpp =================================================================== --- trunk/OpenMPT/include/unrar/coder.hpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/coder.hpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -2,9 +2,7 @@ * Contents: 'Carryless rangecoder' by Dmitry Subbotin * ****************************************************************************/ -const uint TOP=1 << 24, BOT=1 << 15; - class RangeCoder { public: Modified: trunk/OpenMPT/include/unrar/compress.hpp =================================================================== --- trunk/OpenMPT/include/unrar/compress.hpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/compress.hpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -1,38 +1,45 @@ #ifndef _RAR_COMPRESS_ #define _RAR_COMPRESS_ -#define MAX_LZ_MATCH 0x1001 -#define MAX3_LZ_MATCH 0x101 // Maximum match length for RAR v3. +// Combine pack and unpack constants to class to avoid polluting global +// namespace with numerous short names. +class PackDef +{ + public: + static const uint MAX_LZ_MATCH = 0x1001; + static const uint MAX3_LZ_MATCH = 0x101; // Maximum match length for RAR v3. + static const uint LOW_DIST_REP_COUNT = 16; -#define LOW_DIST_REP_COUNT 16 + static const uint NC = 306; /* alphabet = {0, 1, 2, ..., NC - 1} */ + static const uint DC = 64; + static const uint LDC = 16; + static const uint RC = 44; + static const uint HUFF_TABLE_SIZE = NC + DC + RC + LDC; + static const uint BC = 20; -#define NC 306 /* alphabet = {0, 1, 2, ..., NC - 1} */ -#define DC 64 -#define LDC 16 -#define RC 44 -#define HUFF_TABLE_SIZE (NC+DC+RC+LDC) -#define BC 20 + static const uint NC30 = 299; /* alphabet = {0, 1, 2, ..., NC - 1} */ + static const uint DC30 = 60; + static const uint LDC30 = 17; + static const uint RC30 = 28; + static const uint BC30 = 20; + static const uint HUFF_TABLE_SIZE30 = NC30 + DC30 + RC30 + LDC30; -#define NC30 299 /* alphabet = {0, 1, 2, ..., NC - 1} */ -#define DC30 60 -#define LDC30 17 -#define RC30 28 -#define BC30 20 -#define HUFF_TABLE_SIZE30 (NC30+DC30+RC30+LDC30) + static const uint NC20 = 298; /* alphabet = {0, 1, 2, ..., NC - 1} */ + static const uint DC20 = 48; + static const uint RC20 = 28; + static const uint BC20 = 19; + static const uint MC20 = 257; -#define NC20 298 /* alphabet = {0, 1, 2, ..., NC - 1} */ -#define DC20 48 -#define RC20 28 -#define BC20 19 -#define MC20 257 + // Largest alphabet size among all values listed above. + static const uint LARGEST_TABLE_SIZE = 306; -// Largest alphabet size among all values listed above. -#define LARGEST_TABLE_SIZE 306 + enum { + CODE_HUFFMAN, CODE_LZ, CODE_REPEATLZ, CODE_CACHELZ, CODE_STARTFILE, + CODE_ENDFILE, CODE_FILTER, CODE_FILTERDATA + }; +}; -enum {CODE_HUFFMAN,CODE_LZ,CODE_REPEATLZ,CODE_CACHELZ, - CODE_STARTFILE,CODE_ENDFILE,CODE_FILTER,CODE_FILTERDATA}; - enum FilterType { // These values must not be changed, because we use them directly // in RAR5 compression and decompression code. Modified: trunk/OpenMPT/include/unrar/consio.cpp =================================================================== --- trunk/OpenMPT/include/unrar/consio.cpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/consio.cpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -2,7 +2,6 @@ #include "log.cpp" static MESSAGE_TYPE MsgStream=MSG_STDOUT; -static bool Sound=false; const int MaxMsgSize=2*NM+2048; #ifdef _WIN_ALL @@ -47,10 +46,9 @@ } -void InitConsoleOptions(MESSAGE_TYPE MsgStream,bool Sound) +void InitConsoleOptions(MESSAGE_TYPE MsgStream) { ::MsgStream=MsgStream; - ::Sound=Sound; } @@ -125,25 +123,6 @@ #ifndef SILENT -void Alarm() -{ - if (Sound) - { - static clock_t LastTime=clock(); - if ((clock()-LastTime)/CLOCKS_PER_SEC>5) - { -#ifdef _WIN_ALL - MessageBeep(-1); -#else - putwchar('\007'); -#endif - } - } -} -#endif - - -#ifndef SILENT static void GetPasswordText(wchar *Str,uint MaxLength) { if (MaxLength==0) @@ -181,22 +160,22 @@ #ifndef SILENT -bool GetConsolePassword(PASSWORD_TYPE Type,const wchar *FileName,SecPassword *Password) +bool GetConsolePassword(UIPASSWORD_TYPE Type,const wchar *FileName,SecPassword *Password) { - Alarm(); + uiAlarm(UIALARM_QUESTION); while (true) { - if (Type==PASSWORD_GLOBAL) + if (Type==UIPASSWORD_GLOBAL) eprintf(L"\n%s: ",St(MAskPsw)); else eprintf(St(MAskPswFor),FileName); wchar PlainPsw[MAXPASSWORD]; GetPasswordText(PlainPsw,ASIZE(PlainPsw)); - if (*PlainPsw==0 && Type==PASSWORD_GLOBAL) + if (*PlainPsw==0 && Type==UIPASSWORD_GLOBAL) return false; - if (Type==PASSWORD_GLOBAL) + if (Type==UIPASSWORD_GLOBAL) { eprintf(St(MReAskPsw)); wchar CmpStr[MAXPASSWORD]; @@ -264,9 +243,13 @@ #ifndef SILENT +// We allow this function to return 0 in case of invalid input, +// because it might be convenient to press Enter to some not dangerous +// prompts like "insert disk with next volume". We should call this function +// again in case of 0 in dangerous prompt such as overwriting file. int Ask(const wchar *AskStr) { - Alarm(); + uiAlarm(UIALARM_QUESTION); const int MaxItems=10; wchar Item[MaxItems][40]; Modified: trunk/OpenMPT/include/unrar/consio.hpp =================================================================== --- trunk/OpenMPT/include/unrar/consio.hpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/consio.hpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -2,11 +2,11 @@ #define _RAR_CONSIO_ void InitConsole(); -void InitConsoleOptions(MESSAGE_TYPE MsgStream,bool Sound); +void InitConsoleOptions(MESSAGE_TYPE MsgStream); void OutComment(const wchar *Comment,size_t Size); #ifndef SILENT -bool GetConsolePassword(PASSWORD_TYPE Type,const wchar *FileName,SecPassword *Password); +bool GetConsolePassword(UIPASSWORD_TYPE Type,const wchar *FileName,SecPassword *Password); #endif #ifdef SILENT Modified: trunk/OpenMPT/include/unrar/crc.cpp =================================================================== --- trunk/OpenMPT/include/unrar/crc.cpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/crc.cpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -56,7 +56,7 @@ byte *Data=(byte *)Addr; // Align Data to 8 for better performance. - for (;Size>0 && ((long)Data & 7);Size--,Data++) + for (;Size>0 && ((size_t)Data & 7);Size--,Data++) StartCRC=crc_tables[0][(byte)(StartCRC^Data[0])]^(StartCRC>>8); for (;Size>=8;Size-=8,Data+=8) Modified: trunk/OpenMPT/include/unrar/crypt2.cpp =================================================================== --- trunk/OpenMPT/include/unrar/crypt2.cpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/crypt2.cpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -62,7 +62,7 @@ void CryptData::EncryptBlock20(byte *Buf) { uint A,B,C,D,T,TA,TB; -#if defined(BIG_ENDIAN) || !defined(PRESENT_INT32) || !defined(ALLOW_NOT_ALIGNED_INT) +#if defined(BIG_ENDIAN) || !defined(PRESENT_INT32) || !defined(ALLOW_MISALIGNED) A=((uint)Buf[0]|((uint)Buf[1]<<8)|((uint)Buf[2]<<16)|((uint)Buf[3]<<24))^Key20[0]; B=((uint)Buf[4]|((uint)Buf[5]<<8)|((uint)Buf[6]<<16)|((uint)Buf[7]<<24))^Key20[1]; C=((uint)Buf[8]|((uint)Buf[9]<<8)|((uint)Buf[10]<<16)|((uint)Buf[11]<<24))^Key20[2]; @@ -85,7 +85,7 @@ C=TA; D=TB; } -#if defined(BIG_ENDIAN) || !defined(PRESENT_INT32) || !defined(ALLOW_NOT_ALIGNED_INT) +#if defined(BIG_ENDIAN) || !defined(PRESENT_INT32) || !defined(ALLOW_MISALIGNED) C^=Key20[0]; Buf[0]=(byte)C; Buf[1]=(byte)(C>>8); @@ -120,7 +120,7 @@ { byte InBuf[16]; uint A,B,C,D,T,TA,TB; -#if defined(BIG_ENDIAN) || !defined(PRESENT_INT32) || !defined(ALLOW_NOT_ALIGNED_INT) +#if defined(BIG_ENDIAN) || !defined(PRESENT_INT32) || !defined(ALLOW_MISALIGNED) A=((uint)Buf[0]|((uint)Buf[1]<<8)|((uint)Buf[2]<<16)|((uint)Buf[3]<<24))^Key20[0]; B=((uint)Buf[4]|((uint)Buf[5]<<8)|((uint)Buf[6]<<16)|((uint)Buf[7]<<24))^Key20[1]; C=((uint)Buf[8]|((uint)Buf[9]<<8)|((uint)Buf[10]<<16)|((uint)Buf[11]<<24))^Key20[2]; @@ -144,7 +144,7 @@ C=TA; D=TB; } -#if defined(BIG_ENDIAN) || !defined(PRESENT_INT32) || !defined(ALLOW_NOT_ALIGNED_INT) +#if defined(BIG_ENDIAN) || !defined(PRESENT_INT32) || !defined(ALLOW_MISALIGNED) C^=Key20[0]; Buf[0]=(byte)C; Buf[1]=(byte)(C>>8); Modified: trunk/OpenMPT/include/unrar/crypt3.cpp =================================================================== --- trunk/OpenMPT/include/unrar/crypt3.cpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/crypt3.cpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -47,28 +47,28 @@ memcpy(RawPsw+RawLength,Salt,SIZE_SALT30); RawLength+=SIZE_SALT30; } - hash_context c; - hash_initial(&c); + sha1_context c; + sha1_init(&c); const int HashRounds=0x40000; for (int I=0;I<HashRounds;I++) { - hash_process( &c, RawPsw, RawLength, false); + sha1_process( &c, RawPsw, RawLength, false); byte PswNum[3]; PswNum[0]=(byte)I; PswNum[1]=(byte)(I>>8); PswNum[2]=(byte)(I>>16); - hash_process( &c, PswNum, 3, false); + sha1_process( &c, PswNum, 3, false); if (I%(HashRounds/16)==0) { - hash_context tempc=c; + sha1_context tempc=c; uint32 digest[5]; - hash_final( &tempc, digest, false); + sha1_done( &tempc, digest, false); AESInit[I/(HashRounds/16)]=(byte)digest[4]; } } uint32 digest[5]; - hash_final( &c, digest, false); + sha1_done( &c, digest, false); for (int I=0;I<4;I++) for (int J=0;J<4;J++) AESKey[I*4+J]=(byte)(digest[I]>>(J*8)); Modified: trunk/OpenMPT/include/unrar/dll.cpp =================================================================== --- trunk/OpenMPT/include/unrar/dll.cpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/dll.cpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -65,7 +65,10 @@ Data->Cmd.Callback=r->Callback; Data->Cmd.UserData=r->UserData; - if (!Data->Arc.Open(ArcName,0)) + // Open shared mode is added by request of dll users, who need to + // browse and unpack archives while downloading. + Data->Cmd.OpenShared = true; + if (!Data->Arc.Open(ArcName,FMF_OPENSHARED)) { r->OpenResult=ERAR_EOPEN; delete Data; @@ -73,7 +76,16 @@ } if (!Data->Arc.IsArchive(false)) { - r->OpenResult=Data->Cmd.DllError!=0 ? Data->Cmd.DllError:ERAR_BAD_ARCHIVE; + if (Data->Cmd.DllError!=0) + r->OpenResult=Data->Cmd.DllError; + else + { + RAR_EXIT ErrCode=ErrHandler.GetErrorCode(); + if (ErrCode!=RARX_SUCCESS && ErrCode!=RARX_WARNING) + r->OpenResult=RarErrorToDll(ErrCode); + else + r->OpenResult=ERAR_BAD_ARCHIVE; + } delete Data; return NULL; } @@ -113,7 +125,7 @@ } else r->CmtState=r->CmtSize=0; - Data->Extract.ExtractArchiveInit(&Data->Cmd,Data->Arc); + Data->Extract.ExtractArchiveInit(Data->Arc); return (HANDLE)Data; } catch (RAR_EXIT ErrCode) @@ -126,7 +138,7 @@ delete Data; return NULL; } - catch (std::bad_alloc) // Catch 'new' exception. + catch (std::bad_alloc&) // Catch 'new' exception. { r->OpenResult=ERAR_NO_MEMORY; if (Data != NULL) @@ -186,7 +198,16 @@ } else return ERAR_EOPEN; - return(Data->Arc.BrokenHeader ? ERAR_BAD_DATA:ERAR_END_ARCHIVE); + + if (Data->Arc.BrokenHeader) + return ERAR_BAD_DATA; + + // Might be necessary if RARSetPassword is still called instead of + // open callback for RAR5 archives and if password is invalid. + if (Data->Arc.FailedHeaderDecryption) + return ERAR_BAD_PASSWORD; + + return ERAR_END_ARCHIVE; } FileHeader *hd=&Data->Arc.FileHead; if (Data->OpenMode==RAR_OM_LIST && hd->SplitBefore) @@ -197,7 +218,7 @@ else return Code; } - wcsncpy(D->ArcNameW,hd->FileName,ASIZE(D->ArcNameW)); + wcsncpy(D->ArcNameW,Data->Arc.FileName,ASIZE(D->ArcNameW)); WideToChar(D->ArcNameW,D->ArcName,ASIZE(D->ArcName)); wcsncpy(D->FileNameW,hd->FileName,ASIZE(D->FileNameW)); @@ -290,10 +311,12 @@ if (DestPath!=NULL) { char ExtrPathA[NM]; + strncpyz(ExtrPathA,DestPath,ASIZE(ExtrPathA)-2); #ifdef _WIN_ALL - OemToCharBuffA(DestPath,ExtrPathA,ASIZE(ExtrPathA)-2); -#else - strncpyz(ExtrPathA,DestPath,ASIZE(ExtrPathA)-2); + // We must not apply OemToCharBuffA directly to DestPath, + // because we do not know DestPath length and OemToCharBuffA + // does not stop at 0. + OemToCharA(ExtrPathA,ExtrPathA); #endif CharToWide(ExtrPathA,Data->Cmd.ExtrPath,ASIZE(Data->Cmd.ExtrPath)); AddEndSlash(Data->Cmd.ExtrPath,ASIZE(Data->Cmd.ExtrPath)); @@ -301,10 +324,12 @@ if (DestName!=NULL) { char DestNameA[NM]; + strncpyz(DestNameA,DestName,ASIZE(DestNameA)-2); #ifdef _WIN_ALL - OemToCharBuffA(DestName,DestNameA,ASIZE(DestNameA)-2); -#else - strncpyz(DestNameA,DestName,ASIZE(DestNameA)-2); + // We must not apply OemToCharBuffA directly to DestName, + // because we do not know DestName length and OemToCharBuffA + // does not stop at 0. + OemToCharA(DestNameA,DestNameA); #endif CharToWide(DestNameA,Data->Cmd.DllDestName,ASIZE(Data->Cmd.DllDestName)); } @@ -321,7 +346,7 @@ wcscpy(Data->Cmd.Command,Operation==RAR_EXTRACT ? L"X":L"T"); Data->Cmd.Test=Operation!=RAR_EXTRACT; bool Repeat=false; - Data->Extract.ExtractCurrentFile(&Data->Cmd,Data->Arc,Data->HeaderSize,Repeat); + Data->Extract.ExtractCurrentFile(Data->Arc,Data->HeaderSize,Repeat); // Now we process extra file information if any. // @@ -333,13 +358,13 @@ while (Data->Arc.IsOpened() && Data->Arc.ReadHeader()!=0 && Data->Arc.GetHeaderType()==HEAD_SERVICE) { - Data->Extract.ExtractCurrentFile(&Data->Cmd,Data->Arc,Data->HeaderSize,Repeat); + Data->Extract.ExtractCurrentFile(Data->Arc,Data->HeaderSize,Repeat); Data->Arc.SeekToNext(); } Data->Arc.Seek(Data->Arc.CurBlockPos,SEEK_SET); } } - catch (std::bad_alloc) + catch (std::bad_alloc&) { return ERAR_NO_MEMORY; } @@ -419,6 +444,8 @@ return ERAR_ECREATE; case RARX_MEMORY: return ERAR_NO_MEMORY; + case RARX_BADPWD: + return ERAR_BAD_PASSWORD; case RARX_SUCCESS: return ERAR_SUCCESS; // 0. default: Modified: trunk/OpenMPT/include/unrar/dll.hpp =================================================================== --- trunk/OpenMPT/include/unrar/dll.hpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/dll.hpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -17,6 +17,8 @@ #define ERAR_SMALL_BUF 20 #define ERAR_UNKNOWN 21 #define ERAR_MISSING_PASSWORD 22 +#define ERAR_EREFERENCE 23 +#define ERAR_BAD_PASSWORD 24 #define RAR_OM_LIST 0 #define RAR_OM_EXTRACT 1 Modified: trunk/OpenMPT/include/unrar/errhnd.cpp =================================================================== --- trunk/OpenMPT/include/unrar/errhnd.cpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/errhnd.cpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -1,6 +1,5 @@ #include "rar.hpp" - ErrorHandler::ErrorHandler() { Clean(); @@ -22,7 +21,7 @@ void ErrorHandler::MemoryError() { MemoryErrorMsg(); - Throw(RARX_MEMORY); + Exit(RARX_MEMORY); } @@ -30,22 +29,20 @@ { #ifndef SILENT OpenErrorMsg(FileName); - Throw(RARX_OPEN); + Exit(RARX_OPEN); #endif } void ErrorHandler::CloseError(const wchar *FileName) { -#ifndef SILENT if (!UserBreak) { - Log(NULL,St(MErrFClose),FileName); + uiMsg(UIERROR_FILECLOSE,FileName); SysErrMsg(); } -#endif #if !defined(SILENT) || defined(RARDLL) - Throw(RARX_FATAL); + Exit(RARX_FATAL); #endif } @@ -56,7 +53,7 @@ ReadErrorMsg(FileName); #endif #if !defined(SILENT) || defined(RARDLL) - Throw(RARX_FATAL); + Exit(RARX_FATAL); #endif } @@ -67,9 +64,7 @@ if (!Silent) { SysErrMsg(); - mprintf(L"\n"); - Log(NULL,St(MErrRead),FileName); - return Ask(St(MRetryAbort))==1; + return uiAskRepeatRead(FileName); } #endif return false; @@ -82,7 +77,7 @@ WriteErrorMsg(ArcName,FileName); #endif #if !defined(SILENT) || defined(RARDLL) - Throw(RARX_WRITE); + Exit(RARX_WRITE); #endif } @@ -90,12 +85,10 @@ #ifdef _WIN_ALL void ErrorHandler::WriteErrorFAT(const wchar *FileName) { -#if !defined(SILENT) && !defined(SFX_MODULE) SysErrMsg(); - Log(NULL,St(MNTFSRequired),FileName); -#endif + uiMsg(UIERROR_NTFSREQUIRED,FileName); #if !defined(SILENT) && !defined(SFX_MODULE) || defined(RARDLL) - Throw(RARX_WRITE); + Exit(RARX_WRITE); #endif } #endif @@ -107,9 +100,7 @@ if (!Silent) { SysErrMsg(); - mprintf(L"\n"); - Log(NULL,St(DiskFull ? MNotEnoughDisk:MErrWrite),FileName); - return Ask(St(MRetryAbort))==1; + return uiAskRepeatWrite(FileName,DiskFull); } #endif return false; @@ -118,15 +109,13 @@ void ErrorHandler::SeekError(const wchar *FileName) { -#ifndef SILENT if (!UserBreak) { - Log(NULL,St(MErrSeek),FileName); + uiMsg(UIERROR_FILESEEK,FileName); SysErrMsg(); } -#endif #if !defined(SILENT) || defined(RARDLL) - Throw(RARX_FATAL); + Exit(RARX_FATAL); #endif } @@ -136,21 +125,26 @@ va_list arglist; va_start(arglist,fmt); wchar Msg[1024]; +#ifdef _ANDROID + // vswprintf does not work in Android NDK. Conversion below should be ok + // as long as we do not pass Unicode strings in arguments. + char fmtA[NM],MsgA[ASIZE(Msg)]; + WideToChar(fmt,fmtA,ASIZE(fmtA)); + vsnprintf(MsgA,ASIZE(MsgA),fmtA,arglist); + CharToWide(MsgA,Msg,ASIZE(Msg)); +#else vswprintf(Msg,ASIZE(Msg),fmt,arglist); -#ifndef SILENT - Log(NULL,L"%ls",Msg); - mprintf(L"\n"); +#endif + uiMsg(UIERROR_GENERALERRMSG,Msg); SysErrMsg(); -#endif va_end(arglist); } void ErrorHandler::MemoryErrorMsg() { -#ifndef SILENT - Log(NULL,St(MErrOutMem)); -#endif + uiMsg(UIERROR_MEMORY); + SetErrorCode(RARX_MEMORY); } @@ -162,11 +156,9 @@ void ErrorHandler::OpenErrorMsg(const wchar *ArcName,const wchar *FileName) { -#ifndef SILENT - if (FileName!=NULL) - Log(ArcName,St(MCannotOpen),FileName); + uiMsg(UIERROR_FILEOPEN,ArcName,FileName); SysErrMsg(); -#endif + SetErrorCode(RARX_OPEN); } @@ -178,40 +170,12 @@ void ErrorHandler::CreateErrorMsg(const wchar *ArcName,const wchar *FileName) { -#ifndef SILENT - Log(ArcName,St(MCannotCreate),FileName); - -#if defined(_WIN_ALL) && defined(MAX_PATH) - CheckLongPathErrMsg(FileName); -#endif - + uiMsg(UIERROR_FILECREATE,ArcName,FileName); SysErrMsg(); -#endif + SetErrorCode(RARX_CREATE); } -// Check the path length and display the error message if it is too long. -void ErrorHandler::CheckLongPathErrMsg(const wchar *FileName) -{ -#if defined(_WIN_ALL) && !defined (SILENT) && defined(MAX_PATH) - if (GetLastError()==ERROR_PATH_NOT_FOUND) - { - size_t NameLength=wcslen(FileName); - if (!IsFullPath(FileName)) - { - wchar CurDir[NM]; - GetCurrentDirectory(ASIZE(CurDir),CurDir); - NameLength+=wcslen(CurDir)+1; - } - if (NameLength>MAX_PATH) - { - Log(NULL,St(MMaxPathLimit),MAX_PATH); - } - } -#endif -} - - void ErrorHandler::ReadErrorMsg(const wchar *FileName) { ReadErrorMsg(NULL,FileName); @@ -220,26 +184,45 @@ void ErrorHandler::ReadErrorMsg(const wchar *ArcName,const wchar *FileName) { -#ifndef SILENT - Log(ArcName,St(MErrRead),FileName); + uiMsg(UIERROR_FILEREAD,ArcName,FileName); SysErrMsg(); -#endif + SetErrorCode(RARX_FATAL); } void ErrorHandler::WriteErrorMsg(const wchar *ArcName,const wchar *FileName) { -#ifndef SILENT - Log(ArcName,St(MErrWrite),FileName); + uiMsg(UIERROR_FILEWRITE,ArcName,FileName); SysErrMsg(); -#endif + SetErrorCode(RARX_WRITE); } +void ErrorHandler::ArcBrokenMsg(const wchar *ArcName) +{ + uiMsg(UIERROR_ARCBROKEN,ArcName); + SetErrorCode(RARX_CRC); +} + + +void ErrorHandler::ChecksumFailedMsg(const wchar *ArcName,const wchar *FileName) +{ + uiMsg(UIERROR_CHECKSUM,ArcName,FileName); + SetErrorCode(RARX_CRC); +} + + +void ErrorHandler::UnknownMethodMsg(const wchar *ArcName,const wchar *FileName) +{ + uiMsg(UIERROR_UNKNOWNMETHOD,ArcName,FileName); + ErrHandler.SetErrorCode(RARX_FATAL); +} + + void ErrorHandler::Exit(RAR_EXIT ExitCode) { #ifndef GUI - Alarm(); + uiAlarm(UIALARM_ERROR); #endif Throw(ExitCode); } @@ -254,6 +237,10 @@ if (ExitCode==RARX_SUCCESS) ExitCode=Code; break; + case RARX_CRC: + if (ExitCode!=RARX_BADPWD) + ExitCode=Code; + break; case RARX_FATAL: if (ExitCode==RARX_SUCCESS || ExitCode==RARX_WARNING) ExitCode=RARX_FATAL; @@ -320,7 +307,6 @@ #ifndef GUI #ifdef _WIN_ALL SetConsoleCtrlHandler(Enable ? ProcessSignal:NULL,TRUE); -// signal(SIGBREAK,Enable ? ProcessSignal:SIG_IGN); #else signal(SIGINT,Enable ? ProcessSignal:SIG_IGN); signal(SIGTERM,Enable ? ProcessSignal:SIG_IGN); @@ -338,7 +324,7 @@ if (Code!=RARX_SUCCESS && Code!=RARX_USERERROR) mprintf(L"\n%s\n",St(MProgAborted)); #endif - ErrHandler.SetErrorCode(Code); + SetErrorCode(Code); throw Code; } @@ -368,7 +354,7 @@ *EndMsg=0; EndMsg++; } - Log(NULL,L"\n%ls",CurMsg); + uiMsg(UIERROR_SYSERRMSG,CurMsg); CurMsg=EndMsg; } } @@ -378,12 +364,18 @@ #if defined(_UNIX) || defined(_EMX) if (errno!=0) { +#ifdef _ANDROID + // Android NDK sets errno to confusing "not a typewriter" ENOTTY code + // after write error reported by write(). + if (errno == ENOTTY) + return; +#endif char *err=strerror(errno); if (err!=NULL) { - wchar MsgW[1024]; - CharToWide(err,MsgW,ASIZE(MsgW)); - Log(NULL,L"\n%s",MsgW); + wchar Msg[1024]; + CharToWide(err,Msg,ASIZE(Msg)); + uiMsg(UIERROR_SYSERRMSG,Msg); } } #endif Modified: trunk/OpenMPT/include/unrar/errhnd.hpp =================================================================== --- trunk/OpenMPT/include/unrar/errhnd.hpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/errhnd.hpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -44,13 +44,15 @@ void OpenErrorMsg(const wchar *ArcName,const wchar *FileName); void CreateErrorMsg(const wchar *FileName); void CreateErrorMsg(const wchar *ArcName,const wchar *FileName); - void CheckLongPathErrMsg(const wchar *FileName); void ReadErrorMsg(const wchar *FileName); void ReadErrorMsg(const wchar *ArcName,const wchar *FileName); void WriteErrorMsg(const wchar *ArcName,const wchar *FileName); + void ArcBrokenMsg(const wchar *ArcName); + void ChecksumFailedMsg(const wchar *ArcName,const wchar *FileName); + void UnknownMethodMsg(const wchar *ArcName,const wchar *FileName); void Exit(RAR_EXIT ExitCode); void SetErrorCode(RAR_EXIT Code); - RAR_EXIT GetErrorCode() {return(ExitCode);} + RAR_EXIT GetErrorCode() {return ExitCode;} uint GetErrorCount() {return ErrCount;} void SetSignalHandlers(bool Enable); void Throw(RAR_EXIT Code); Modified: trunk/OpenMPT/include/unrar/extract.cpp =================================================================== --- trunk/OpenMPT/include/unrar/extract.cpp 2014-06-19 12:53:01 UTC (rev 4139) +++ trunk/OpenMPT/include/unrar/extract.cpp 2014-06-19 16:24:09 UTC (rev 4140) @@ -2,6 +2,8 @@ CmdExtract::CmdExtract(CommandData *Cmd) { + CmdExtract::Cmd=Cmd; + *ArcName=0; *DestFileName=0; @@ -21,7 +23,7 @@ } -void CmdExtract::DoExtract(CommandData *Cmd) +void CmdExtract::DoExtract() { PasswordCancelled=false; DataIO.SetCurrentCommand(Cmd->Command[0]); @@ -39,7 +41,7 @@ SecPassword PrevCmdPassword; PrevCmdPassword=Cmd->Password; - EXTRACT_ARC_CODE Code=ExtractArchive(Cmd); + EXTRACT_ARC_CODE Code=ExtractArchive(); // Restore Cmd->Password, which could be changed in IsArchive() call // for next header encrypted archive. @@ -56,9 +58,7 @@ ErrHandler.GetErrorCode()!=RARX_BADPWD) // Not in case of wrong archive password. { if (!PasswordCancelled) - { - mprintf(St(MExtrNoFiles)); - } + uiMsg(UIERROR_NOFILESTOEXTRACT,ArcName); ErrHandler.SetErrorCode(RARX_NOFILES); } #ifndef GUI @@ -75,7 +75,7 @@ } -void CmdExtract::ExtractArchiveInit(CommandData *Cmd,Archive &Arc) +void CmdExtract::ExtractArchiveInit(Archive &Arc) { DataIO.UnpArcSize=Arc.FileLength(); @@ -100,14 +100,11 @@ } -EXTRACT_ARC_CODE CmdExtract::ExtractArchive(CommandData *Cmd) +EXTRACT_ARC_CODE CmdExtract::ExtractArchive() { Archive Arc(Cmd); if (!Arc.WOpen(ArcName)) - { - ErrHandler.SetErrorCode(RARX_OPEN); return EXTRACT_ARC_NEXT; - } if (!Arc.IsArchive(true)) { @@ -126,7 +123,7 @@ if (Arc.Volume && !Arc.FirstVolume) { wchar FirstVolName[NM]; - VolNameToFirstName(ArcName,FirstVolName,Arc.NewNumbering); + VolNameToFirstName(ArcName,FirstVolName,ASIZE(FirstVolName),Arc.NewNumbering); // If several volume names from same volume set are specified // and current volume is not first in set and first volume is present @@ -162,21 +159,20 @@ DataIO.TotalArcSize+=VolumeSetSize; } - ExtractArchiveInit(Cmd,Arc); + ExtractArchiveInit(Arc); if (*Cmd->Command=='T' || *Cmd->Command=='I') Cmd->Test=true; -#ifndef GUI if (*Cmd->Command=='I') + { +#ifndef GUI Cmd->DisablePercentage=true; +#endif + } else - if (Cmd->Test) - mprintf(St(MExtrTest),ArcName); - else - mprintf(St(MExtracting),ArcName); -#endif + uiStartArchiveExtract(!Cmd->Test,ArcName); Arc.ViewComment(); @@ -187,7 +183,7 @@ bool Repeat=false; - if (!ExtractCurrentFile(Cmd,Arc,Size,Repeat)) + if (!ExtractCurrentFile(Arc,Size,Repeat)) if (Repeat) { // If we started extraction from not first volume and need to @@ -210,7 +206,7 @@ } -bool CmdExtract::ExtractCurrentFile(CommandData *Cmd,Archive &Arc,size_t HeaderSize,bool &Repeat) +bool CmdExtract::ExtractCurrentFile(Archive &Arc,size_t HeaderSize,bool &Repeat) { wchar Command=Cmd->Command[0]; if (HeaderSize==0) @@ -287,7 +283,7 @@ { wchar CurVolName[NM]; wcsncpyz(CurVolName,ArcName,ASIZE(CurVolName)); - VolNameToFirstName(ArcName,ArcName,Arc.NewNumbering); + VolNameToFirstName(ArcName,ArcName,ASIZE(ArcName),Arc.NewNumbering); if (wcsicomp(ArcName,CurVolName)!=0 && FileExist(ArcName)) { @@ -300,7 +296,6 @@ if (!ReconstructDone) { ReconstructDone=true; - if (RecVolumesRestore(Cmd,Arc.FileName,true)) { Repeat=true; @@ -345,7 +340,7 @@ { if (ExactMatch) { - Log(Arc.FileName,St(MUnpCannotMerge),ArcFileName); + uiMsg(UIERROR_NEEDPREVVOL,Arc.FileName,ArcFileName); #ifdef RARDLL Cmd->DllError=ERAR_BAD_DATA; #endif @@ -359,8 +354,13 @@ if (ExactMatch || (SkipSolid=Arc.Solid)!=0) { + // First common call of uiStartFileExtract. It is done before overwrite + // prompts, so if SkipSolid state is changed below, we'll need to make + // additional uiStartFileExtract calls with updated parameters. + if (!uiStartFileExtract(ArcFileName,!Cmd->Test,Cmd->Test && Command!='I',SkipSolid)) + return false; - ExtrPrepareName(Cmd,Arc,ArcFileName,DestFileName,ASIZE(DestFileName)); + ExtrPrepareName(Arc,ArcFileName,DestFileName,ASIZE(DestFileName)); // DestFileName can be set empty in case of excessive -ap switch. ExtrFile=!SkipSolid && *DestFileName!=0 && !Arc.FileHead.SplitBefore; @@ -392,10 +392,10 @@ if (Arc.FileHead.Encrypted) { #ifdef RARDLL - if (!ExtrDllGetPassword(Cmd)) + if (!ExtrDllGetPassword()) return false; #else - if (!ExtrGetPassword(Cmd,Arc,ArcFileName)) + if (!ExtrGetPassword(Arc,ArcFileName)) { PasswordCancelled=true; return false; @@ -426,12 +426,13 @@ if (!CheckUnpVer(Arc,ArcFileName)) { ExtrFile=false; - ErrHandler.SetErrorCode(RARX_WARNING); + ErrHandler.SetErrorCode(RARX_FATAL); #ifdef RARDLL Cmd->DllError=ERAR_UNKNOWN_FORMAT; #endif } + File CurFile; bool LinkEntry=Arc.FileHead.RedirType!=FSREDIR_NONE; @@ -442,7 +443,7 @@ // Overwrite prompt for symbolic and hard links. bool UserReject=false; if (FileExist(DestFileName) && !UserReject) - FileCreate(Cmd,NULL,DestFileName,ASIZE(DestFileName),Cmd->Overwrite,&UserReject,Arc.FileHead.UnpSize,&Arc.FileHead.mtime); + FileCreate(Cmd,NULL,DestFileName,ASIZE(DestFileName),&UserReject,Arc.FileHead.UnpSize,&Arc.FileHead.mtime); if (UserReject) ExtrFile=false; } @@ -453,18 +454,25 @@ if (!ExtrFile || Command=='P' || Command=='I' || Command=='E' || Cmd->ExclPath==EXCL_SKIPWHOLEPATH) return true; TotalFileCount++; - ExtrCreateDir(Cmd,Arc,ArcFileName); + ExtrCreateDir(Arc,ArcFileName); return true; } else if (ExtrFile) // Create files and file copies (FSREDIR_FILECOPY). - ExtrFile=ExtrCreateFile(Cmd,Arc,CurFile); + ExtrFile=ExtrCreateFile(Arc,CurFile); if (!ExtrFile && Arc.Solid) { SkipSolid=true; ExtrFile=true; + // We changed SkipSolid, so we need to call uiStartFileExtract + // with "Skip" parameter to change the operation status + // from "extracting" to "skipping". For example, it can be necessary + // if user answered "No" to overwrite prompt when unpacking + // a solid archive. + if (!uiStartFileExtract(ArcFileName,false,false,true)) + return false; } if (ExtrFile) { @@ -474,7 +482,7 @@ { if (!TestMode && Command!='P' && CurFile.IsDevice()) { - Log(Arc.FileName,St(MInvalidName),DestFileName); + uiMsg(UIERROR_INVALIDNAME,Arc.FileName,DestFileName); ErrHandler.WriteError(Arc.FileName,DestFileName); } TotalFileCount++; @@ -522,7 +530,7 @@ memcmp(Arc.FileHead.PswCheck,PswCheck,SIZE_PSWCHECK)!... [truncated message content] |
From: <sag...@us...> - 2014-06-19 18:55:06
|
Revision: 4141 http://sourceforge.net/p/modplug/code/4141 Author: saga-games Date: 2014-06-19 18:54:57 +0000 (Thu, 19 Jun 2014) Log Message: ----------- [Mod] Experimental change: To make "maintain sample sync on seek" also work when playback was previously stopped, move some channel reset code again. [Mod] When resuming paused (not stopped) playback, previously playing samples are continued. [Mod] OpenMPT: Version is now 1.23.04.02 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/MainFrm.cpp Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-06-19 16:24:09 UTC (rev 4140) +++ trunk/OpenMPT/common/versionNumber.h 2014-06-19 18:54:57 UTC (rev 4141) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 23 #define VER_MINOR 04 -#define VER_MINORMINOR 01 +#define VER_MINORMINOR 02 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2014-06-19 16:24:09 UTC (rev 4140) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2014-06-19 18:54:57 UTC (rev 4141) @@ -1343,7 +1343,7 @@ const bool bPaused = m_pSndFile->IsPaused(); const bool bPatLoop = m_pSndFile->m_SongFlags[SONG_PATTERNLOOP]; - m_pSndFile->ResetChannels(); + m_pSndFile->m_SongFlags.reset(SONG_FADINGSONG | SONG_ENDREACHED); if(!bPatLoop && bPaused) sndFile.m_SongFlags.set(SONG_PAUSED); sndFile.SetRepeatCount((TrackerSettings::Instance().gbLoopSong) ? -1 : 0); @@ -1395,6 +1395,7 @@ GenerateStopNotification(); m_pSndFile->SetCurrentPos(0); + m_pSndFile->ResetChannels(); UnsetPlaybackSoundFile(); StopPlayback(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-06-20 09:38:25
|
Revision: 4144 http://sourceforge.net/p/modplug/code/4144 Author: manxorist Date: 2014-06-20 09:38:10 +0000 (Fri, 20 Jun 2014) Log Message: ----------- [Mod] build: Only assume GCC on linux by default, fall back to general cc/c++ on other systems. GCC can still be used easily with CONFIG=gcc. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/build/make/Makefile.config.defaults trunk/OpenMPT/build/make/Makefile.config.gcc Added Paths: ----------- trunk/OpenMPT/build/make/Makefile.config.generic Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2014-06-20 09:24:58 UTC (rev 4143) +++ trunk/OpenMPT/Makefile 2014-06-20 09:38:10 UTC (rev 4144) @@ -189,6 +189,9 @@ ifeq ($(UNAME_S),Darwin) HOST_FLAVOUR=MACOSX endif +ifeq ($(UNAME_S),Linux) +HOST_FLAVOUR=LINUX +endif endif Modified: trunk/OpenMPT/build/make/Makefile.config.defaults =================================================================== --- trunk/OpenMPT/build/make/Makefile.config.defaults 2014-06-20 09:24:58 UTC (rev 4143) +++ trunk/OpenMPT/build/make/Makefile.config.defaults 2014-06-20 09:38:10 UTC (rev 4144) @@ -1,31 +1,28 @@ -CC = gcc -CXX = g++ -LD = g++ -AR = ar +ifeq ($(HOST),unix) -#CPPFLAGS += -DMPT_COMPILER_GENERIC -CPPFLAGS += -CXXFLAGS += -std=c++0x -fPIC -CFLAGS += -std=c99 -fPIC -LDFLAGS += -LDLIBS += -lm -ARFLAGS := rcs - -EXESUFFIX= - - -ifeq ($(HOST),unix) ifeq ($(HOST_FLAVOUR),MACOSX) +include build/make/Makefile.config.clang # Mac OS X overrides - DYNLINK=0 - # when using iconv #CPPFLAGS += -DMPT_WITH_ICONV #LDLIBS += -liconv +else ifeq ($(HOST_FLAVOUR),LINUX) + +include build/make/Makefile.config.gcc + +else + +include build/make/Makefile.config.generic + endif + +else + +include build/make/Makefile.config.generic + endif Modified: trunk/OpenMPT/build/make/Makefile.config.gcc =================================================================== --- trunk/OpenMPT/build/make/Makefile.config.gcc 2014-06-20 09:24:58 UTC (rev 4143) +++ trunk/OpenMPT/build/make/Makefile.config.gcc 2014-06-20 09:38:10 UTC (rev 4144) @@ -1,2 +1,15 @@ -include Makefile.config.defaults +CC = gcc +CXX = g++ +LD = g++ +AR = ar + +CPPFLAGS += +CXXFLAGS += -std=c++0x -fPIC +CFLAGS += -std=c99 -fPIC +LDFLAGS += +LDLIBS += -lm +ARFLAGS := rcs + +EXESUFFIX= + Added: trunk/OpenMPT/build/make/Makefile.config.generic =================================================================== --- trunk/OpenMPT/build/make/Makefile.config.generic (rev 0) +++ trunk/OpenMPT/build/make/Makefile.config.generic 2014-06-20 09:38:10 UTC (rev 4144) @@ -0,0 +1,15 @@ + +CC = cc +CXX = c++ +LD = c++ +AR = ar + +#CPPFLAGS += -DMPT_COMPILER_GENERIC +CXXFLAGS += -std=c++11 -fPIC +CFLAGS += -std=c99 -fPIC +LDFLAGS += +LDLIBS += -lm +ARFLAGS := rcs + +EXESUFFIX= + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-06-28 22:47:07
|
Revision: 4178 http://sourceforge.net/p/modplug/code/4178 Author: saga-games Date: 2014-06-28 22:46:57 +0000 (Sat, 28 Jun 2014) Log Message: ----------- [Fix] Silencing samples was slightly broken (http://bugs.openmpt.org/view.php?id=555). [Fix] XM Loader: Clear MIDI macros for XM files made with FT2 to prevent Zxx effects from doing anything. [Mod] OpenMPT: Version is now 1.23.04.03 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/Ctrl_smp.cpp trunk/OpenMPT/soundlib/Load_xm.cpp Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-06-24 18:55:13 UTC (rev 4177) +++ trunk/OpenMPT/common/versionNumber.h 2014-06-28 22:46:57 UTC (rev 4178) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 23 #define VER_MINOR 04 -#define VER_MINORMINOR 02 +#define VER_MINORMINOR 03 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/mptrack/Ctrl_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2014-06-24 18:55:13 UTC (rev 4177) +++ trunk/OpenMPT/mptrack/Ctrl_smp.cpp 2014-06-28 22:46:57 UTC (rev 4178) @@ -2329,7 +2329,7 @@ int delta = dest - base; for (SmpLength i=0; i<len; i++) { - int n = base + (int)(((LONGLONG)delta * (LONGLONG)i) / (len-1)); + int n = base + (int)(((int64)delta * (int64)i) / int64(len - 1)); p[i] = (signed short)n; } } else @@ -2340,7 +2340,7 @@ int delta = dest - base; for (SmpLength i=0; i<len; i++) { - int n = base + (delta * i) / (len-1); + int n = base + (int)(((int64)delta * (int64)i) / int64(len - 1)); p[i] = (signed char)n; } } Modified: trunk/OpenMPT/soundlib/Load_xm.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_xm.cpp 2014-06-24 18:55:13 UTC (rev 4177) +++ trunk/OpenMPT/soundlib/Load_xm.cpp 2014-06-28 22:46:57 UTC (rev 4178) @@ -588,6 +588,14 @@ SetModFlag(MSF_COMPATIBLE_PLAY, false); } + if(madeWith[verFT2Generic] && !m_SongFlags[SONG_EMBEDMIDICFG]) + { + // FT2 allows typing in arbitrary unsupported effect letters such as Zxx. + // Prevent these commands from being interpreted as filter commands by erasing the default MIDI Config. + MemsetZero(m_MidiCfg.szMidiSFXExt); + MemsetZero(m_MidiCfg.szMidiZXXExt); + } + if(madeWith[verFT2Generic] && fileHeader.version >= 0x0104 // Old versions of FT2 didn't have (smooth) ramping. Disable it for those versions where we can be sure that there should be no ramping. #ifdef MODPLUG_TRACKER This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-07-01 00:31:26
|
Revision: 4182 http://sourceforge.net/p/modplug/code/4182 Author: saga-games Date: 2014-07-01 00:31:16 +0000 (Tue, 01 Jul 2014) Log Message: ----------- [Imp] Pattern tab: Deleting and inserting items in the order list automatically adjusts playback, sequence override and play lock positions. [Ref] Unify code for deleting order list or sample selection ranges in MPTrackUtil.h [Mod] OpenMPT: Version is now 1.23.04.04 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/Ctrl_pat.cpp trunk/OpenMPT/mptrack/Ctrl_seq.cpp trunk/OpenMPT/mptrack/MPTrackUtil.h trunk/OpenMPT/mptrack/View_smp.cpp Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-06-30 23:56:14 UTC (rev 4181) +++ trunk/OpenMPT/common/versionNumber.h 2014-07-01 00:31:16 UTC (rev 4182) @@ -19,7 +19,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 23 #define VER_MINOR 04 -#define VER_MINORMINOR 03 +#define VER_MINORMINOR 04 //Version string. For example "1.17.02.28" #define MPT_VERSION_STR VER_STRINGIZE(VER_MAJORMAJOR) "." VER_STRINGIZE(VER_MAJOR) "." VER_STRINGIZE(VER_MINOR) "." VER_STRINGIZE(VER_MINORMINOR) Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2014-06-30 23:56:14 UTC (rev 4181) +++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2014-07-01 00:31:16 UTC (rev 4182) @@ -888,11 +888,21 @@ } success = true; - } } if(success) { + Util::InsertItem(selection.firstOrd, selection.lastOrd, m_sndFile.m_PlayState.m_nNextOrder); + if(m_sndFile.m_PlayState.m_nSeqOverride != ORDERINDEX_INVALID) + { + Util::InsertItem(selection.firstOrd, selection.lastOrd, m_sndFile.m_PlayState.m_nSeqOverride); + } + // Adjust order lock position + if(m_sndFile.m_lockOrderStart != ORDERINDEX_INVALID) + { + Util::InsertRange(selection.firstOrd, selection.lastOrd, m_sndFile.m_lockOrderStart, m_sndFile.m_lockOrderEnd); + } + m_OrderList.InvalidateRect(NULL, FALSE); m_OrderList.SetCurSel(insertWhere); Modified: trunk/OpenMPT/mptrack/Ctrl_seq.cpp =================================================================== --- trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2014-06-30 23:56:14 UTC (rev 4181) +++ trunk/OpenMPT/mptrack/Ctrl_seq.cpp 2014-07-01 00:31:16 UTC (rev 4182) @@ -1144,6 +1144,18 @@ sndFile.Order[insertEnd + i + 1] = sndFile.Order[insertEnd - insertCount + i]; } } + + Util::InsertItem(selection.firstOrd, selection.lastOrd, sndFile.m_PlayState.m_nNextOrder); + if(sndFile.m_PlayState.m_nSeqOverride != ORDERINDEX_INVALID) + { + Util::InsertItem(selection.firstOrd, selection.lastOrd, sndFile.m_PlayState.m_nSeqOverride); + } + // Adjust order lock position + if(sndFile.m_lockOrderStart != ORDERINDEX_INVALID) + { + Util::InsertRange(selection.firstOrd, selection.lastOrd, sndFile.m_lockOrderStart, sndFile.m_lockOrderEnd); + } + m_nScrollPos = std::min(ORDERINDEX(insertEnd + 1), sndFile.Order.GetLastIndex()); if(insertCount > 0) m_nScrollPos2nd = std::min(ORDERINDEX(m_nScrollPos + insertCount), sndFile.Order.GetLastIndex()); @@ -1170,7 +1182,7 @@ const OrdSelection selection = GetCurSel(true); ORDERINDEX insertPos = selection.firstOrd; - if(sndFile.Order[selection.firstOrd] != sndFile.Order.GetInvalidPatIndex()) + if(sndFile.Order[insertPos] != sndFile.Order.GetInvalidPatIndex()) { // If we're not inserting on a stop (---) index, we move on by one position. insertPos++; @@ -1180,13 +1192,24 @@ if(sndFile.Order.GetLength() < sndFile.GetModSpecifications().ordersMax) sndFile.Order.Append(); } - for(int j = sndFile.Order.GetLastIndex(); j > selection.firstOrd; j--) + for(int j = sndFile.Order.GetLastIndex(); j > insertPos; j--) sndFile.Order[j] = sndFile.Order[j - 1]; } sndFile.Order[insertPos] = sndFile.Order.GetIgnoreIndex(); + Util::InsertItem(insertPos, insertPos, sndFile.m_PlayState.m_nNextOrder); + if(sndFile.m_PlayState.m_nSeqOverride != ORDERINDEX_INVALID) + { + Util::InsertItem(insertPos, insertPos, sndFile.m_PlayState.m_nSeqOverride); + } + // Adjust order lock position + if(sndFile.m_lockOrderStart != ORDERINDEX_INVALID) + { + Util::InsertRange(insertPos, insertPos, sndFile.m_lockOrderStart, sndFile.m_lockOrderEnd); + } + InvalidateRect(NULL, FALSE); m_pModDoc.SetModified(); m_pModDoc.UpdateAllViews(NULL, HINT_MODSEQUENCE, this); @@ -1216,10 +1239,17 @@ InvalidateRect(NULL, FALSE); m_pModDoc.UpdateAllViews(NULL, HINT_MODSEQUENCE, this); - if(sndFile.m_PlayState.m_nCurrentOrder > selection.lastOrd) + Util::DeleteItem(selection.firstOrd, selection.lastOrd, sndFile.m_PlayState.m_nNextOrder); + if(sndFile.m_PlayState.m_nSeqOverride != ORDERINDEX_INVALID) { - sndFile.m_PlayState.m_nNextOrder -= selection.GetSelCount(); + Util::DeleteItem(selection.firstOrd, selection.lastOrd, sndFile.m_PlayState.m_nSeqOverride); } + + // Adjust order lock position + if(sndFile.m_lockOrderStart != ORDERINDEX_INVALID) + { + Util::DeleteRange(selection.firstOrd, selection.lastOrd, sndFile.m_lockOrderStart, sndFile.m_lockOrderEnd); + } } Modified: trunk/OpenMPT/mptrack/MPTrackUtil.h =================================================================== --- trunk/OpenMPT/mptrack/MPTrackUtil.h 2014-06-30 23:56:14 UTC (rev 4181) +++ trunk/OpenMPT/mptrack/MPTrackUtil.h 2014-07-01 00:31:16 UTC (rev 4182) @@ -29,5 +29,73 @@ }} // namespace Util::sdOs +namespace Util +{ + // Insert a range of items [insStart, insEnd], and possibly shift item fix to the left. + template<typename T> + void InsertItem(const T insStart, const T insEnd, T &fix) + { + ASSERT(insEnd >= insStart); + if(fix >= insStart) + { + fix += (insEnd - insStart + 1); + } + } + // Insert a range of items [insStart, insEnd], and possibly shift items in range [fixStart, fixEnd] to the right. + template<typename T> + void InsertRange(const T insStart, const T insEnd, T &fixStart, T &fixEnd) + { + ASSERT(insEnd >= insStart); + const T insLength = insEnd - insStart + 1; + if(fixStart >= insEnd) + { + fixStart += insLength; + } + if(fixEnd >= insEnd) + { + fixEnd += insLength; + } + } + + // Delete a range of items [delStart, delEnd], and possibly shift item fix to the left. + template<typename T> + void DeleteItem(const T delStart, const T delEnd, T &fix) + { + ASSERT(delEnd >= delStart); + if(fix > delEnd) + { + fix -= (delEnd - delStart + 1); + } + } + + // Delete a range of items [delStart, delEnd], and possibly shift items in range [fixStart, fixEnd] to the left. + template<typename T> + void DeleteRange(const T delStart, const T delEnd, T &fixStart, T &fixEnd) + { + ASSERT(delEnd >= delStart); + const T delLength = delEnd - delStart + 1; + if(delStart < fixStart && delEnd < fixStart) + { + // cut part is before loop start + fixStart -= delLength; + fixEnd -= delLength; + } else if(delStart < fixStart && delEnd < fixEnd) + { + // cut part is partly before loop start + fixStart = delStart; + fixEnd -= delLength; + } else if(delStart >= fixStart && delEnd < fixEnd) + { + // cut part is in the loop + fixEnd -= delLength; + } else if(delStart >= fixStart && delStart < fixEnd && delEnd > fixEnd) + { + // cut part is partly before loop end + fixEnd = delStart; + } + } +} + + OPENMPT_NAMESPACE_END Modified: trunk/OpenMPT/mptrack/View_smp.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_smp.cpp 2014-06-30 23:56:14 UTC (rev 4181) +++ trunk/OpenMPT/mptrack/View_smp.cpp 2014-07-01 00:31:16 UTC (rev 4182) @@ -1973,27 +1973,9 @@ void CViewSample::AdjustLoopPoints(SmpLength &loopStart, SmpLength &loopEnd, SmpLength length) const //-------------------------------------------------------------------------------------------------- { - if(m_dwBeginSel < loopStart && m_dwEndSel < loopStart) - { - // cut part is before loop start - loopStart -= m_dwEndSel - m_dwBeginSel; - loopEnd -= m_dwEndSel - m_dwBeginSel; - } else if(m_dwBeginSel < loopStart && m_dwEndSel < loopEnd) - { - // cut part is partly before loop start - loopStart = m_dwBeginSel; - loopEnd -= m_dwEndSel - m_dwBeginSel; - } else if(m_dwBeginSel >= loopStart && m_dwEndSel < loopEnd) - { - // cut part is in the loop - loopEnd -= m_dwEndSel - m_dwBeginSel; - } else if(m_dwBeginSel >= loopStart && m_dwBeginSel < loopEnd && m_dwEndSel > loopEnd) - { - // cut part is partly before loop end - loopEnd = m_dwBeginSel; - } - - if(loopEnd > length) loopEnd = length; + const SmpLength selLength = m_dwEndSel - m_dwBeginSel; + Util::DeleteRange(m_dwBeginSel, m_dwEndSel - 1, loopStart, loopEnd); + LimitMax(loopEnd, length); if(loopStart + 4 >= loopEnd) { loopStart = loopEnd = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |