From: <man...@us...> - 2013-12-10 23:46:28
|
Revision: 3437 http://sourceforge.net/p/modplug/code/3437 Author: manxorist Date: 2013-12-10 23:46:15 +0000 (Tue, 10 Dec 2013) Log Message: ----------- [Imp] libopenmpt doc: Include svn revision in version number. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/libopenmpt/Doxyfile Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2013-12-10 23:19:43 UTC (rev 3436) +++ trunk/OpenMPT/Makefile 2013-12-10 23:46:15 UTC (rev 3437) @@ -387,7 +387,7 @@ bin/made.docs: $(VERYSILENT)mkdir -p bin/docs $(INFO) [DOXYGEN] libopenmpt - $(SILENT)doxygen libopenmpt/Doxyfile + $(SILENT) ( cat libopenmpt/Doxyfile ; echo 'PROJECT_NUMBER = "$(DIST_LIBOPENMPT_VERSION)"' ) | doxygen - $(VERYSILENT)touch $@ .PHONY: check Modified: trunk/OpenMPT/libopenmpt/Doxyfile =================================================================== --- trunk/OpenMPT/libopenmpt/Doxyfile 2013-12-10 23:19:43 UTC (rev 3436) +++ trunk/OpenMPT/libopenmpt/Doxyfile 2013-12-10 23:46:15 UTC (rev 3437) @@ -38,7 +38,7 @@ # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = +PROJECT_NUMBER = "0.1" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-12-11 14:18:18
|
Revision: 3440 http://sourceforge.net/p/modplug/code/3440 Author: manxorist Date: 2013-12-11 14:18:08 +0000 (Wed, 11 Dec 2013) Log Message: ----------- [Imp] libopenmpt build: Auto-detect if running on windows. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/README Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2013-12-11 13:55:29 UTC (rev 3439) +++ trunk/OpenMPT/Makefile 2013-12-11 14:18:08 UTC (rev 3440) @@ -72,19 +72,27 @@ # host setup -ifeq ($(HOST),windows) +ifeq ($(OS),Windows_NT) +HOST=windows + RM = del /q /f +RMTREE = del /q /f /s INSTALL = echo install INSTALL_MAKE_DIR = echo install INSTALL_DIR = echo install +FIXPATH = $(subst /,\,$1) else +HOST=unix + RM = rm -f +RMTREE = rm -rf INSTALL = install INSTALL_MAKE_DIR = install -d INSTALL_DIR = cp -r -v +FIXPATH = $1 endif @@ -128,8 +136,7 @@ #CXXFLAGS += -mtune=generic #CFLAGS += -mtune=generic -ifeq ($(HOST),windows) -else +ifeq ($(HOST),unix) ifeq ($(shell help2man --version > /dev/null 2>&1 && echo yes ),yes) MPT_WITH_HELP2MAN := 1 @@ -361,8 +368,7 @@ ifeq ($(TEST),1) OUTPUTS += bin/libopenmpt_test$(EXESUFFIX) else -ifeq ($(HOST),windows) -else +ifeq ($(HOST),unix) OUTPUTS += bin/libopenmpt.pc endif ifeq ($(OPENMPT123),1) @@ -590,8 +596,7 @@ bin/openmpt123$(EXESUFFIX): $(OPENMPT123_OBJECTS) $(OBJECTS_LIBOPENMPT) $(OUTPUT_LIBOPENMPT) $(INFO) [LD ] $@ $(SILENT)$(LINK.cc) $(LDFLAGS_LIBOPENMPT) $(LDFLAGS_OPENMPT123) $(OPENMPT123_OBJECTS) $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) $(LDLIBS_OPENMPT123) -o $@ -ifeq ($(HOST),windows) -else +ifeq ($(HOST),unix) $(SILENT)mv $@ $@.norpath $(INFO) [LD ] $@ $(SILENT)$(LINK.cc) $(LDFLAGS_RPATH) $(LDFLAGS_LIBOPENMPT) $(LDFLAGS_OPENMPT123) $(OPENMPT123_OBJECTS) $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) $(LDLIBS_OPENMPT123) -o $@ @@ -612,8 +617,7 @@ bin/libopenmpt_example_c$(EXESUFFIX): libopenmpt/examples/libopenmpt_example_c.o $(OBJECTS_LIBOPENMPT) $(OUTPUT_LIBOPENMPT) $(INFO) [LD ] $@ $(SILENT)$(LINK.cc) $(LDFLAGS_LIBOPENMPT) $(LDFLAGS_EXAMPLES) libopenmpt/examples/libopenmpt_example_c.o $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) $(LDLIBS_EXAMPLES) -o $@ -ifeq ($(HOST),windows) -else +ifeq ($(HOST),unix) $(SILENT)mv $@ $@.norpath $(INFO) [LD ] $@ $(SILENT)$(LINK.cc) $(LDFLAGS_RPATH) $(LDFLAGS_LIBOPENMPT) $(LDFLAGS_EXAMPLES) libopenmpt/examples/libopenmpt_example_c.o $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) $(LDLIBS_EXAMPLES) -o $@ @@ -621,8 +625,7 @@ bin/libopenmpt_example_c_mem$(EXESUFFIX): libopenmpt/examples/libopenmpt_example_c_mem.o $(OBJECTS_LIBOPENMPT) $(OUTPUT_LIBOPENMPT) $(INFO) [LD ] $@ $(SILENT)$(LINK.cc) $(LDFLAGS_LIBOPENMPT) $(LDFLAGS_EXAMPLES) libopenmpt/examples/libopenmpt_example_c_mem.o $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) $(LDLIBS_EXAMPLES) -o $@ -ifeq ($(HOST),windows) -else +ifeq ($(HOST),unix) $(SILENT)mv $@ $@.norpath $(INFO) [LD ] $@ $(SILENT)$(LINK.cc) $(LDFLAGS_RPATH) $(LDFLAGS_LIBOPENMPT) $(LDFLAGS_EXAMPLES) libopenmpt/examples/libopenmpt_example_c_mem.o $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) $(LDLIBS_EXAMPLES) -o $@ @@ -630,20 +633,14 @@ bin/libopenmpt_example_cxx$(EXESUFFIX): libopenmpt/examples/libopenmpt_example_cxx.o $(OBJECTS_LIBOPENMPT) $(OUTPUT_LIBOPENMPT) $(INFO) [LD ] $@ $(SILENT)$(LINK.cc) $(LDFLAGS_LIBOPENMPT) $(LDFLAGS_EXAMPLES) libopenmpt/examples/libopenmpt_example_cxx.o $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) $(LDLIBS_EXAMPLES) -o $@ -ifeq ($(HOST),windows) -else +ifeq ($(HOST),unix) $(SILENT)mv $@ $@.norpath $(INFO) [LD ] $@ $(SILENT)$(LINK.cc) $(LDFLAGS_RPATH) $(LDFLAGS_LIBOPENMPT) $(LDFLAGS_EXAMPLES) libopenmpt/examples/libopenmpt_example_cxx.o $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) $(LDLIBS_EXAMPLES) -o $@ endif -ifeq ($(HOST),windows) +.PHONY: clean clean: $(INFO) clean ... - $(SILENT)$(RM) $(subst /,\,$(OUTPUTS) $(ALL_OBJECTS) $(ALL_DEPENDS) ) -else -clean: - $(INFO) clean ... - $(SILENT)$(RM) $(OUTPUTS) $(ALL_OBJECTS) $(ALL_DEPENDS) $(MISC_OUTPUTS) - $(SILENT)$(RM) -rf $(MISC_OUTPUTDIRS) -endif + $(SILENT)$(RM) $(call FIXPATH,$(OUTPUTS) $(ALL_OBJECTS) $(ALL_DEPENDS) $(MISC_OUTPUTS)) + $(SILENT)$(RMTREE) $(call FIXPATH,$(MISC_OUTPUTDIRS)) Modified: trunk/OpenMPT/README =================================================================== --- trunk/OpenMPT/README 2013-12-11 13:55:29 UTC (rev 3439) +++ trunk/OpenMPT/README 2013-12-11 14:18:08 UTC (rev 3440) @@ -46,19 +46,14 @@ 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 HOST= and - CONFIG= parameters directly to the make invocation. + 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 (on windows): + - mingw-w64: The required version should be at least 4.4. Only 4.6 and up are tested. - - mingw32-make HOST=windows CONFIG=mingw64-win32 - - mingw32-make HOST=windows CONFIG=mingw64-win64 - depending on whether you want win32 or win64 builds. - - mingw-w64 (on unix): - The required version should be at least 4.4. Only 4.6 and up are tested. - make CONFIG=mingw64-win32 - make CONFIG=mingw64-win64 depending on whether you want win32 or win64 builds. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-12-11 17:24:43
|
Revision: 3444 http://sourceforge.net/p/modplug/code/3444 Author: manxorist Date: 2013-12-11 17:24:35 +0000 (Wed, 11 Dec 2013) Log Message: ----------- [Imp] libopenmpt build: Automate Mac OS X detection. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/build/make/Makefile.config.defaults trunk/OpenMPT/build/make/Makefile.config.macosx Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2013-12-11 16:46:09 UTC (rev 3443) +++ trunk/OpenMPT/Makefile 2013-12-11 17:24:35 UTC (rev 3444) @@ -24,6 +24,8 @@ endif +# general settings + DYNLINK=1 SHARED_LIB=1 STATIC_LIB=1 @@ -57,24 +59,12 @@ #endif -# compiler setup - -ifeq ($(CONFIG)x,x) - -include build/make/Makefile.config.defaults - -else - -include build/make/Makefile.config.$(CONFIG) - -endif - - # host setup ifeq ($(OS),Windows_NT) HOST=windows +HOST_FLAVOUR= RM = del /q /f RMTREE = del /q /f /s @@ -86,6 +76,7 @@ else HOST=unix +HOST_FLAVOUR= RM = rm -f RMTREE = rm -rf @@ -94,10 +85,27 @@ INSTALL_DIR = cp -r -v FIXPATH = $1 +UNAME_S:=$(shell uname -s) +ifeq ($(UNAME_S),Darwin) +HOST_FLAVOUR=MACOSX endif +endif +# compiler setup + +ifeq ($(CONFIG)x,x) + +include build/make/Makefile.config.defaults + +else + +include build/make/Makefile.config.$(CONFIG) + +endif + + # build setup INSTALL_PROGRAM = $(INSTALL) -m 0755 -D Modified: trunk/OpenMPT/build/make/Makefile.config.defaults =================================================================== --- trunk/OpenMPT/build/make/Makefile.config.defaults 2013-12-11 16:46:09 UTC (rev 3443) +++ trunk/OpenMPT/build/make/Makefile.config.defaults 2013-12-11 17:24:35 UTC (rev 3444) @@ -13,3 +13,19 @@ ARFLAGS := rcs EXESUFFIX= + + +ifeq ($(HOST),unix) +ifeq ($(HOST_FLAVOUR),MACOSX) + +# Mac OS X overrides + +CPPFLAGS += -DMPT_CHARSET_CPP +DYNLINK=0 + +# when using iconv +#CPPFLAGS += -DMPT_ICONV_NO_WCHAR +#LDLIBS += -liconv + +endif +endif Modified: trunk/OpenMPT/build/make/Makefile.config.macosx =================================================================== --- trunk/OpenMPT/build/make/Makefile.config.macosx 2013-12-11 16:46:09 UTC (rev 3443) +++ trunk/OpenMPT/build/make/Makefile.config.macosx 2013-12-11 17:24:35 UTC (rev 3444) @@ -1,9 +1,2 @@ include Makefile.config.defaults - -#LDLIBS += -liconv -#CPPFLAGS += -DMPT_ICONV_NO_WCHAR - -CPPFLAGS += -DMPT_CHARSET_CPP - -DYNLINK=0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-12-11 17:33:10
|
Revision: 3447 http://sourceforge.net/p/modplug/code/3447 Author: manxorist Date: 2013-12-11 17:32:53 +0000 (Wed, 11 Dec 2013) Log Message: ----------- [Var] Reformat README with doxygen-compatible markdown syntax and rename README to README.md. [Imp] libopenmpt doc: Include README.md in doxygen. Modified Paths: -------------- trunk/OpenMPT/libopenmpt/Doxyfile Added Paths: ----------- trunk/OpenMPT/README.md Removed Paths: ------------- trunk/OpenMPT/README Deleted: trunk/OpenMPT/README =================================================================== --- trunk/OpenMPT/README 2013-12-11 17:31:02 UTC (rev 3446) +++ trunk/OpenMPT/README 2013-12-11 17:32:53 UTC (rev 3447) @@ -1,129 +0,0 @@ - -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 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 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! :) - - - -How to compile 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 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 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 - - make CONFIG=mingw64-win64 - depending on whether you want win32 or win64 builds. - - gcc or clang (on unix, 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 unix 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. - - - -Coding conventions (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. - -Code example: - -void Foo::Bar(int foobar) -//----------------------- -{ - while(true) - { - // some code - } -} - - - -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 :). Copied: trunk/OpenMPT/README.md (from rev 3444, trunk/OpenMPT/README) =================================================================== --- trunk/OpenMPT/README.md (rev 0) +++ trunk/OpenMPT/README.md 2013-12-11 17:32:53 UTC (rev 3447) @@ -0,0 +1,184 @@ + +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, 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 unix 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. + + + +Coding conventions +------------------ + +(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. + +### Code example + + void Foo::Bar(int foobar) + //----------------------- + { + while(true) + { + // some code + } + } + + + +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 :). Modified: trunk/OpenMPT/libopenmpt/Doxyfile =================================================================== --- trunk/OpenMPT/libopenmpt/Doxyfile 2013-12-11 17:31:02 UTC (rev 3446) +++ trunk/OpenMPT/libopenmpt/Doxyfile 2013-12-11 17:32:53 UTC (rev 3447) @@ -735,6 +735,7 @@ INPUT = \ libopenmpt/dox/index.dox \ + README.md \ libopenmpt/dox/dependencies.md \ libopenmpt/dox/tests.md \ libopenmpt/libopenmpt.hpp \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-12-12 13:23:28
|
Revision: 3452 http://sourceforge.net/p/modplug/code/3452 Author: manxorist Date: 2013-12-12 13:23:19 +0000 (Thu, 12 Dec 2013) Log Message: ----------- [Ref] Move effect byte -> effect type mapping table from Draw_pat.cpp into modcommand.cpp so that libopenmpt can use it. Modified Paths: -------------- trunk/OpenMPT/mptrack/Draw_pat.cpp trunk/OpenMPT/soundlib/modcommand.cpp trunk/OpenMPT/soundlib/modcommand.h Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp =================================================================== --- trunk/OpenMPT/mptrack/Draw_pat.cpp 2013-12-11 20:33:09 UTC (rev 3451) +++ trunk/OpenMPT/mptrack/Draw_pat.cpp 2013-12-12 13:23:19 UTC (rev 3452) @@ -112,35 +112,19 @@ ///////////////////////////////////////////////////////////////////////////// // Effect colour codes -// Effect number => Effect colour assignment +// CommandTypes => Effect colour assignment const int effectColors[] = { - 0, 0, MODCOLOR_PITCH, MODCOLOR_PITCH, - MODCOLOR_PITCH, MODCOLOR_PITCH, MODCOLOR_VOLUME, MODCOLOR_VOLUME, - MODCOLOR_VOLUME, MODCOLOR_PANNING, 0, MODCOLOR_VOLUME, - MODCOLOR_GLOBALS, MODCOLOR_VOLUME, MODCOLOR_GLOBALS, 0, - MODCOLOR_GLOBALS, MODCOLOR_GLOBALS, 0, 0, - 0, MODCOLOR_VOLUME, MODCOLOR_VOLUME, MODCOLOR_GLOBALS, - MODCOLOR_GLOBALS, 0, MODCOLOR_PITCH, MODCOLOR_PANNING, - MODCOLOR_PITCH, MODCOLOR_PANNING, 0, 0, - 0, 0, 0, MODCOLOR_PITCH, - MODCOLOR_PITCH, MODCOLOR_PITCH, MODCOLOR_PITCH, 0, + 0, + MODCOLOR_GLOBALS, + MODCOLOR_VOLUME, + MODCOLOR_PANNING, + MODCOLOR_PITCH, }; -STATIC_ASSERT(CountOf(effectColors) == MAX_EFFECTS); +STATIC_ASSERT(CountOf(effectColors) == MAX_EFFECT_TYPE); -// Volume effect number => Effect colour assignment -const int volEffectColors[] = -{ - 0, MODCOLOR_VOLUME, MODCOLOR_PANNING, MODCOLOR_VOLUME, - MODCOLOR_VOLUME, MODCOLOR_VOLUME, MODCOLOR_VOLUME, MODCOLOR_PITCH, - MODCOLOR_PITCH, MODCOLOR_PANNING, MODCOLOR_PANNING, MODCOLOR_PITCH, - MODCOLOR_PITCH, MODCOLOR_PITCH, 0, 0, -}; -STATIC_ASSERT(CountOf(volEffectColors) == MAX_VOLCMDS); - - ///////////////////////////////////////////////////////////////////////////// // CViewPattern Drawing Implementation @@ -1026,9 +1010,9 @@ bk_col = MODCOLOR_BACKSELECTED; } else if (!m->IsPcNote() && (TrackerSettings::Instance().m_dwPatternSetup & PATTERN_EFFECTHILIGHT)) { - if(m->volcmd != VOLCMD_NONE && m->volcmd < MAX_VOLCMDS && volEffectColors[m->volcmd] != 0) + if(m->volcmd != VOLCMD_NONE && m->volcmd < MAX_VOLCMDS && effectColors[m->GetVolumeEffectType()] != 0) { - tx_col = volEffectColors[m->volcmd]; + tx_col = effectColors[m->GetVolumeEffectType()]; } else if(drawDefaultVolume) { tx_col = MODCOLOR_DEFAULTVOLUME; @@ -1049,8 +1033,8 @@ fx_col = row_col; if (!isPCnote && m->command != CMD_NONE && m->command < MAX_EFFECTS && (TrackerSettings::Instance().m_dwPatternSetup & PATTERN_EFFECTHILIGHT)) { - if(effectColors[m->command] != 0) - fx_col = effectColors[m->command]; + if(effectColors[m->GetEffectType()] != 0) + fx_col = effectColors[m->GetEffectType()]; } if (!(dwSpeedUpMask & 0x08)) { Modified: trunk/OpenMPT/soundlib/modcommand.cpp =================================================================== --- trunk/OpenMPT/soundlib/modcommand.cpp 2013-12-11 20:33:09 UTC (rev 3451) +++ trunk/OpenMPT/soundlib/modcommand.cpp 2013-12-12 13:23:19 UTC (rev 3452) @@ -13,6 +13,60 @@ #include "Tables.h" +const EffectType effectTypes[] = +{ + EFFECT_TYPE_NORMAL, EFFECT_TYPE_NORMAL, EFFECT_TYPE_PITCH, EFFECT_TYPE_PITCH, + EFFECT_TYPE_PITCH, EFFECT_TYPE_PITCH, EFFECT_TYPE_VOLUME, EFFECT_TYPE_VOLUME, + EFFECT_TYPE_VOLUME, EFFECT_TYPE_PANNING, EFFECT_TYPE_NORMAL, EFFECT_TYPE_VOLUME, + EFFECT_TYPE_GLOBAL, EFFECT_TYPE_VOLUME, EFFECT_TYPE_GLOBAL, EFFECT_TYPE_NORMAL, + EFFECT_TYPE_GLOBAL, EFFECT_TYPE_GLOBAL, EFFECT_TYPE_NORMAL, EFFECT_TYPE_NORMAL, + EFFECT_TYPE_NORMAL, EFFECT_TYPE_VOLUME, EFFECT_TYPE_VOLUME, EFFECT_TYPE_GLOBAL, + EFFECT_TYPE_GLOBAL, EFFECT_TYPE_NORMAL, EFFECT_TYPE_PITCH, EFFECT_TYPE_PANNING, + EFFECT_TYPE_PITCH, EFFECT_TYPE_PANNING, EFFECT_TYPE_NORMAL, EFFECT_TYPE_NORMAL, + EFFECT_TYPE_NORMAL, EFFECT_TYPE_NORMAL, EFFECT_TYPE_NORMAL, EFFECT_TYPE_PITCH, + EFFECT_TYPE_PITCH, EFFECT_TYPE_PITCH, EFFECT_TYPE_PITCH, EFFECT_TYPE_NORMAL, +}; + +STATIC_ASSERT(CountOf(effectTypes) == MAX_EFFECTS); + + +const EffectType volumeEffectTypes[] = +{ + EFFECT_TYPE_NORMAL, EFFECT_TYPE_VOLUME, EFFECT_TYPE_PANNING, EFFECT_TYPE_VOLUME, + EFFECT_TYPE_VOLUME, EFFECT_TYPE_VOLUME, EFFECT_TYPE_VOLUME, EFFECT_TYPE_PITCH, + EFFECT_TYPE_PITCH, EFFECT_TYPE_PANNING, EFFECT_TYPE_PANNING, EFFECT_TYPE_PITCH, + EFFECT_TYPE_PITCH, EFFECT_TYPE_PITCH, EFFECT_TYPE_NORMAL, EFFECT_TYPE_NORMAL, +}; + +STATIC_ASSERT(CountOf(volumeEffectTypes) == MAX_VOLCMDS); + + +EffectType ModCommand::GetEffectType(COMMAND cmd) +//----------------------------------------------- +{ + if(cmd < CountOf(effectTypes)) + { + return effectTypes[cmd]; + } else + { + return EFFECT_TYPE_NORMAL; + } +} + + +EffectType ModCommand::GetVolumeEffectType(VOLCMD volcmd) +//------------------------------------------------------- +{ + if(volcmd < CountOf(volumeEffectTypes)) + { + return volumeEffectTypes[volcmd]; + } else + { + return EFFECT_TYPE_NORMAL; + } +} + + // Convert an Exx command (MOD) to Sxx command (S3M) void ModCommand::ExtendedMODtoS3MEffect() //--------------------------------------- Modified: trunk/OpenMPT/soundlib/modcommand.h =================================================================== --- trunk/OpenMPT/soundlib/modcommand.h 2013-12-11 20:33:09 UTC (rev 3451) +++ trunk/OpenMPT/soundlib/modcommand.h 2013-12-12 13:23:19 UTC (rev 3452) @@ -100,6 +100,17 @@ }; +enum EffectType +{ + EFFECT_TYPE_NORMAL = 0, + EFFECT_TYPE_GLOBAL = 1, + EFFECT_TYPE_VOLUME = 2, + EFFECT_TYPE_PANNING = 3, + EFFECT_TYPE_PITCH = 4, + MAX_EFFECT_TYPE = 5 +}; + + //============== class ModCommand //============== @@ -162,6 +173,11 @@ bool IsNoteOrEmpty() const { return note == NOTE_NONE || IsNote(); } static bool IsNoteOrEmpty(NOTE note) { return note == NOTE_NONE || IsNote(note); } + static EffectType GetEffectType(COMMAND cmd); + EffectType GetEffectType() const { return GetEffectType(command); } + static EffectType GetVolumeEffectType(VOLCMD volcmd); + EffectType GetVolumeEffectType() const { return GetVolumeEffectType(volcmd); } + // Convert a complete ModCommand item from one format to another void Convert(MODTYPE fromType, MODTYPE toType); // Convert MOD/XM Exx to S3M/IT Sxx This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2013-12-14 16:00:26
|
Revision: 3469 http://sourceforge.net/p/modplug/code/3469 Author: saga-games Date: 2013-12-14 16:00:14 +0000 (Sat, 14 Dec 2013) Log Message: ----------- [Fix] Note preview in instrument editor always uses lowpass filter if "Channel default" filter type is specified Modified Paths: -------------- trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/soundlib/ModChannel.cpp Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2013-12-14 15:55:10 UTC (rev 3468) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2013-12-14 16:00:14 UTC (rev 3469) @@ -638,7 +638,7 @@ .WorkingDirectory(TrackerDirectories::Instance().GetWorkingDirectory(DIR_MODS)); if(!dlg.Show()) return FALSE; - TrackerDirectories::Instance().SetWorkingDirectory(dlg.GetWorkingDirectory(), DIR_MODS, true); + TrackerDirectories::Instance().SetWorkingDirectory(dlg.GetWorkingDirectory(), DIR_MODS); saveFileName = dlg.GetFirstFile(); } else @@ -1075,77 +1075,63 @@ // Find a channel to play on nChn = FindAvailableChannel(); - - ModChannel *pChn = &m_SndFile.Chn[nChn]; + ModChannel &chn = m_SndFile.Chn[nChn]; // reset channel properties; in theory the chan is completely unused anyway. - pChn->nPos = pChn->nPosLo = 0; - pChn->nLength = 0; - pChn->dwFlags &= CHN_SAMPLEFLAGS; - pChn->dwFlags.reset(CHN_MUTE); - pChn->nGlobalVol = 64; - pChn->nInsVol = 64; - pChn->nPan = 128; - pChn->leftVol = pChn->rightVol = 0; - pChn->nROfs = pChn->nLOfs = 0; - pChn->nCutOff = 0x7F; - pChn->nResonance = 0; - pChn->nVolume = 256; - pChn->nMasterChn = 0; // remove NNA association - pChn->nNewNote = static_cast<BYTE>(note); + chn.Reset(ModChannel::resetTotal, m_SndFile, CHANNELINDEX_INVALID); + chn.nMasterChn = 0; // remove NNA association + chn.nNewNote = static_cast<uint8>(note); if (nins) { // Set instrument - pChn->ResetEnvelopes(); - m_SndFile.InstrumentChange(pChn, nins); - pChn->nFadeOutVol = 0x10000; // Needed for XM files, as the nRowInstr check in NoteChange() will fail. - } else if ((nsmp) && (nsmp < MAX_SAMPLES)) // Or set sample + chn.ResetEnvelopes(); + m_SndFile.InstrumentChange(&chn, nins); + chn.nFadeOutVol = 0x10000; // Needed for XM files, as the nRowInstr check in NoteChange() will fail. + } else if ((nsmp) && (nsmp < MAX_SAMPLES)) // Or set sample { ModSample &sample = m_SndFile.GetSample(nsmp); - pChn->pCurrentSample = sample.pSample; - pChn->pModInstrument = nullptr; - pChn->pModSample = &sample; - pChn->pSample = sample.pSample; - pChn->nFineTune = sample.nFineTune; - pChn->nC5Speed = sample.nC5Speed; - pChn->nPos = pChn->nPosLo = 0; - pChn->nLength = 0; - pChn->nLoopStart = sample.nLoopStart; - pChn->nLoopEnd = sample.nLoopEnd; - pChn->dwFlags = static_cast<ChannelFlags>(sample.uFlags) & (CHN_SAMPLEFLAGS & ~CHN_MUTE); - pChn->nPan = 128; - if (sample.uFlags & CHN_PANNING) pChn->nPan = sample.nPan; - pChn->nInsVol = sample.nGlobalVol; - pChn->nFadeOutVol = 0x10000; + chn.pCurrentSample = sample.pSample; + chn.pModInstrument = nullptr; + chn.pModSample = &sample; + chn.pSample = sample.pSample; + chn.nFineTune = sample.nFineTune; + chn.nC5Speed = sample.nC5Speed; + chn.nLoopStart = sample.nLoopStart; + chn.nLoopEnd = sample.nLoopEnd; + chn.dwFlags = static_cast<ChannelFlags>(sample.uFlags) & (CHN_SAMPLEFLAGS & ~CHN_MUTE); + chn.nPan = 128; + if (sample.uFlags & CHN_PANNING) chn.nPan = sample.nPan; + chn.nInsVol = sample.nGlobalVol; + chn.nFadeOutVol = 0x10000; } m_SndFile.NoteChange(nChn, note, false, true, true); - if (nVol >= 0) pChn->nVolume = nVol; + if (nVol >= 0) chn.nVolume = nVol; // Handle sample looping. // Changed line to fix http://forum.openmpt.org/index.php?topic=1700.0 - //if ((loopstart + 16 < loopend) && (loopstart >= 0) && (loopend <= (LONG)pChn->nLength)) - if ((loopStart + 16 < loopEnd) && (loopStart >= 0) && (pChn->pModSample != nullptr)) + //if ((loopstart + 16 < loopend) && (loopstart >= 0) && (loopend <= (LONG)pchn.nLength)) + if ((loopStart + 16 < loopEnd) && (loopStart >= 0) && (chn.pModSample != nullptr)) { - pChn->nPos = loopStart; - pChn->nPosLo = 0; - pChn->nLoopStart = loopStart; - pChn->nLoopEnd = loopEnd; - pChn->nLength = std::min(loopEnd, pChn->pModSample->nLength); + chn.nPos = loopStart; + chn.nPosLo = 0; + chn.nLoopStart = loopStart; + chn.nLoopEnd = loopEnd; + chn.nLength = std::min(loopEnd, chn.pModSample->nLength); } // Handle extra-loud flag - pChn->dwFlags.set(CHN_EXTRALOUD, !(TrackerSettings::Instance().m_dwPatternSetup & PATTERN_NOEXTRALOUD) && nsmp); + chn.dwFlags.set(CHN_EXTRALOUD, !(TrackerSettings::Instance().m_dwPatternSetup & PATTERN_NOEXTRALOUD) && nsmp); // Handle custom start position - if(sampleOffset > 0 && pChn->pModSample) + if(sampleOffset > 0 && chn.pModSample) { - pChn->nPos = sampleOffset; + chn.nPos = sampleOffset; // If start position is after loop end, set loop end to sample end so that the sample starts // playing. - if(pChn->nLoopEnd < sampleOffset) - pChn->nLength = pChn->nLoopEnd = pChn->pModSample->nLength; + if(chn.nLoopEnd < sampleOffset) + chn.nLength = chn.nLoopEnd = chn.pModSample->nLength; } //rewbs.vstiLive @@ -1157,8 +1143,8 @@ // UINT nPlugin = m_SndFile.GetBestPlugin(nChn, PRIORITISE_INSTRUMENT, EVEN_IF_MUTED); PLUGINDEX nPlugin = 0; - if (pChn->pModInstrument) - nPlugin = pChn->pModInstrument->nMixPlug; // First try instrument plugin + if (chn.pModInstrument) + nPlugin = chn.pModInstrument->nMixPlug; // First try instrument plugin if ((!nPlugin || nPlugin > MAX_MIXPLUGINS) && nCurrentChn != CHANNELINDEX_INVALID) nPlugin = m_SndFile.ChnSettings[nCurrentChn].nMixPlugin; // Then try channel plugin @@ -1168,7 +1154,7 @@ if(pPlugin != nullptr) { - pPlugin->MidiCommand(GetPlaybackMidiChannel(pIns, nCurrentChn), pIns->nMidiProgram, pIns->wMidiBank, pIns->NoteMap[note - 1], static_cast<uint16>(pChn->nVolume), MAX_BASECHANNELS); + pPlugin->MidiCommand(GetPlaybackMidiChannel(pIns, nCurrentChn), pIns->nMidiProgram, pIns->wMidiBank, pIns->NoteMap[note - 1], static_cast<uint16>(chn.nVolume), MAX_BASECHANNELS); } } } Modified: trunk/OpenMPT/soundlib/ModChannel.cpp =================================================================== --- trunk/OpenMPT/soundlib/ModChannel.cpp 2013-12-14 15:55:10 UTC (rev 3468) +++ trunk/OpenMPT/soundlib/ModChannel.cpp 2013-12-14 16:00:14 UTC (rev 3469) @@ -17,7 +17,8 @@ { if(resetMask & resetSetPosBasic) { - nNote = nNewNote = nNewIns = nOldIns = 0; + nNote = nNewNote = NOTE_NONE; + nNewIns = nOldIns = 0; pModSample = nullptr; pModInstrument = nullptr; nPortamentoDest = 0; @@ -40,6 +41,7 @@ { nPeriod = 0; nPos = 0; + nPosLo = 0; nLength = 0; nLoopStart = 0; nLoopEnd = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-12-15 14:45:20
|
Revision: 3478 http://sourceforge.net/p/modplug/code/3478 Author: manxorist Date: 2013-12-15 14:45:08 +0000 (Sun, 15 Dec 2013) Log Message: ----------- [Mod] libopenmpt build: Separate make doc from default make target. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/README.md trunk/OpenMPT/libopenmpt/dox/quickstart.md Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2013-12-15 13:51:15 UTC (rev 3477) +++ trunk/OpenMPT/Makefile 2013-12-15 14:45:08 UTC (rev 3478) @@ -387,10 +387,7 @@ OUTPUTS += bin/openmpt123.1 endif endif -ifeq ($(MPT_WITH_DOXYGEN),1) -OUTPUTS += docs endif -endif ifeq ($(SHARED_SONAME),1) LIBOPENMPT_LDFLAGS += -Wl,-soname,$(LIBOPENMPT_SONAME) endif @@ -416,6 +413,9 @@ .PHONY: docs docs: bin/made.docs +.PHONY: doc +doc: bin/made.docs + bin/made.docs: $(VERYSILENT)mkdir -p bin/docs $(INFO) [DOXYGEN] libopenmpt @@ -483,6 +483,9 @@ $(INSTALL_DATA) libopenmpt/examples/libopenmpt_example_c.c $(DESTDIR)$(PREFIX)/share/doc/libopenmpt/examples/libopenmpt_example_c.c $(INSTALL_DATA) libopenmpt/examples/libopenmpt_example_c_mem.c $(DESTDIR)$(PREFIX)/share/doc/libopenmpt/examples/libopenmpt_example_c_mem.c $(INSTALL_DATA) libopenmpt/examples/libopenmpt_example_cxx.cpp $(DESTDIR)$(PREFIX)/share/doc/libopenmpt/examples/libopenmpt_example_cxx.cpp + +.PHONY: install-doc +install-doc: bin/made.docs ifeq ($(MPT_WITH_DOXYGEN),1) $(INSTALL_MAKE_DIR) $(DESTDIR)$(PREFIX)/share/doc/libopenmpt/html/ $(INSTALL_DATA_DIR) bin/docs/html $(DESTDIR)$(PREFIX)/share/doc/libopenmpt/html Modified: trunk/OpenMPT/README.md =================================================================== --- trunk/OpenMPT/README.md 2013-12-15 13:51:15 UTC (rev 3477) +++ trunk/OpenMPT/README.md 2013-12-15 14:45:08 UTC (rev 3478) @@ -123,8 +123,20 @@ `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. + + + Coding conventions ------------------ Modified: trunk/OpenMPT/libopenmpt/dox/quickstart.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/quickstart.md 2013-12-15 13:51:15 UTC (rev 3477) +++ trunk/OpenMPT/libopenmpt/dox/quickstart.md 2013-12-15 14:45:08 UTC (rev 3478) @@ -11,7 +11,9 @@ make TEST=1 check make clean make + make doc sudo make install + sudo make install-doc openmpt123 $SOMEMODULE ### Windows This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-12-16 14:50:28
|
Revision: 3480 http://sourceforge.net/p/modplug/code/3480 Author: manxorist Date: 2013-12-16 14:50:15 +0000 (Mon, 16 Dec 2013) Log Message: ----------- [Imp] libopenmpt doc: Add dependency documentation to quick start doc. [Imp] libopenmpt doc: Document Makefile. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/libopenmpt/dox/quickstart.md Added Paths: ----------- trunk/OpenMPT/build/make/Makefile.config.gcc Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2013-12-16 14:00:22 UTC (rev 3479) +++ trunk/OpenMPT/Makefile 2013-12-16 14:50:15 UTC (rev 3480) @@ -1,4 +1,71 @@ +# +# libopenmpt and openmpt123 GNU Makefile +# +# Authors: Joern Heusipp +# OpenMPT Devs +# +# The OpenMPT source code is released under the BSD license. +# Read LICENSE for more details. +# +# +# Supported parameters: +# +# +# Build configuration (provide on each `make` invocation): +# +# CONFIG=[gcc|clang|mingw64-win32|mingw64-win64] (default: CONFIG=) +# +# Build configurations can override or change defaults of other build otions. +# See below and in `build/make/` for details. +# +# +# Compiler options (provide on each `make` invocation): +# +# CPPFLAGS +# CXXFLAGS +# CFLAGS +# LDFLAGS +# ARFLAGS +# +# +# Build flags (provide on each `make` invocation) (defaults are shown): +# +# DYNLINK=1 Dynamically link examples and openmpt123 against libopenmpt +# SHARED_LIB=1 Build shared library +# STATIC_LIB=1 Build static library +# EXAMPLES=1 Build examples +# OPENMPT123=1 Build openmpt123 +# SHARED_SONAME=1 Set SONAME of shared library +# TEST=0 Build libopenmpt in test mode +# +# +# Install options (provide on each `make install` invocation) +# +# PREFIX (e.g.: PREFIX=$HOME/opt, default: PREFIX=/usr/local) +# DESTDIR (e.g.: DESTDIR=bin/dest, default: DESTDIR=) +# +# +# Verbosity: +# +# QUIET=[0,1] (default: QUIET=0) +# VERBOSE=[0,1,2] (default: VERBOSE=0) +# +# +# Supported targets: +# +# make clean +# make [all] +# make doc +# make TEST=1 check +# make dist +# make dist-doc +# make install +# make install-doc +# + + + INFO = @echo SILENT = @ VERYSILENT = @ @@ -34,14 +101,6 @@ SHARED_SONAME=1 -# version - -LIBOPENMPT_VERSION_MAJOR=0 -LIBOPENMPT_VERSION_MINOR=1 - -LIBOPENMPT_SONAME=libopenmpt.so.0 - - # get commandline or defaults CPPFLAGS := $(CPPFLAGS) @@ -62,6 +121,14 @@ #endif +# version + +LIBOPENMPT_VERSION_MAJOR=0 +LIBOPENMPT_VERSION_MINOR=1 + +LIBOPENMPT_SONAME=libopenmpt.so.0 + + # host setup ifeq ($(OS),Windows_NT) Added: trunk/OpenMPT/build/make/Makefile.config.gcc =================================================================== --- trunk/OpenMPT/build/make/Makefile.config.gcc (rev 0) +++ trunk/OpenMPT/build/make/Makefile.config.gcc 2013-12-16 14:50:15 UTC (rev 3480) @@ -0,0 +1,2 @@ + +include Makefile.config.defaults Property changes on: trunk/OpenMPT/build/make/Makefile.config.gcc ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-makefile \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Modified: trunk/OpenMPT/libopenmpt/dox/quickstart.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/quickstart.md 2013-12-16 14:00:22 UTC (rev 3479) +++ trunk/OpenMPT/libopenmpt/dox/quickstart.md 2013-12-16 14:50:15 UTC (rev 3480) @@ -5,21 +5,38 @@ ### Unix - svn checkout http://svn.code.sf.net/p/modplug/code/trunk/OpenMPT/ openmpt-trunk - cd openmpt-trunk - make TEST=1 - make TEST=1 check - make clean - make - make doc - sudo make install - sudo make install-doc - openmpt123 $SOMEMODULE + 1. Get dependencies: + - *GNU make* + - *gcc >= 4.4* or *clang >= 3.0* + - *pkg-config* + - *portaudio-v19* + - *zlib* + 2. *Optional*: + - *doxygen >= 1.8* + - *help2man* + - *libSDL* + - *libFLAC* + - *libsndfile* + 3. Run: + + svn checkout http://svn.code.sf.net/p/modplug/code/trunk/OpenMPT/ openmpt-trunk + cd openmpt-trunk + make TEST=1 + make TEST=1 check + make clean + make + make doc + sudo make install + sudo make install-doc + openmpt123 $SOMEMODULE ### Windows 1. Checkout `http://svn.code.sf.net/p/modplug/code/trunk/OpenMPT/` . - 2. Open `openmpt123\openmpt123.sln` or `libopenmpt\libopenmpt.sln` in *Microsoft Visual Studio 2010*. - 3. Select appropriate configuration and build. Binaries are generated in `bin\` - 4. Drag a module onto `openmpt123.exe` or copy the player plugin DLLs (`in_openmpt.dll`, `xmp-openmpt.dll` or `foo_openmpt.dll`) and `libopenmpt_settings.dll` into the respective player directory. + 2. *Optional*: Get dependencies: + - *Winamp SDK* + - *XMPlay SDK* + 3. Open `openmpt123\openmpt123.sln` or `libopenmpt\libopenmpt.sln` in *Microsoft Visual Studio 2010*. + 4. Select appropriate configuration and build. Binaries are generated in `bin\` + 5. Drag a module onto `openmpt123.exe` or copy the player plugin DLLs (`in_openmpt.dll`, `xmp-openmpt.dll` or `foo_openmpt.dll`) and `libopenmpt_settings.dll` into the respective player directory. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2013-12-16 17:04:40
|
Revision: 3481 http://sourceforge.net/p/modplug/code/3481 Author: saga-games Date: 2013-12-16 17:04:30 +0000 (Mon, 16 Dec 2013) Log Message: ----------- [Ref] Small oneliner changes here and there. [Mod] mpt::strnlen uses built-in ::strnlen when compiling with MSVC now. Modified Paths: -------------- trunk/OpenMPT/common/mptString.h trunk/OpenMPT/mptrack/AutoSaver.cpp trunk/OpenMPT/mptrack/ExceptionHandler.cpp trunk/OpenMPT/mptrack/Moptions.cpp trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/Vstplug.cpp trunk/OpenMPT/soundlib/Load_mo3.cpp trunk/OpenMPT/soundlib/Tables.cpp trunk/OpenMPT/soundlib/modcommand.h Modified: trunk/OpenMPT/common/mptString.h =================================================================== --- trunk/OpenMPT/common/mptString.h 2013-12-16 14:50:15 UTC (rev 3480) +++ trunk/OpenMPT/common/mptString.h 2013-12-16 17:04:30 UTC (rev 3481) @@ -45,6 +45,7 @@ // Remove whitespace at start of string static inline std::string LTrim(std::string str, const std::string &whitespace = " \n\r\t") +//----------------------------------------------------------------------------------------- { std::string::size_type pos = str.find_first_not_of(whitespace); if(pos != std::string::npos) @@ -72,6 +73,7 @@ // Remove whitespace at end of string static inline std::string RTrim(std::string str, const std::string &whitespace = " \n\r\t") +//----------------------------------------------------------------------------------------- { std::string::size_type pos = str.find_last_not_of(whitespace); if(pos != std::string::npos) @@ -99,6 +101,7 @@ // Remove whitespace at start and end of string static inline std::string Trim(std::string str, const std::string &whitespace = " \n\r\t") +//---------------------------------------------------------------------------------------- { return RTrim(LTrim(str, whitespace), whitespace); } @@ -109,6 +112,7 @@ static inline std::string Replace(std::string str, const std::string &oldStr, const std::string &newStr) +//------------------------------------------------------------------------------------------------------ { std::size_t pos = 0; while((pos = str.find(oldStr, pos)) != std::string::npos) @@ -138,6 +142,9 @@ static inline std::size_t strnlen(const char *str, std::size_t n) //--------------------------------------------------------------- { +#if MPT_COMPILER_MSVC + return ::strnlen(str, n); +#else if(n >= SIZE_MAX) { return std::strlen(str); @@ -150,10 +157,12 @@ } } return n; +#endif } static inline int strnicmp(const char *a, const char *b, size_t count) +//-------------------------------------------------------------------- { #if MPT_COMPILER_MSVC return _strnicmp(a, b, count); Modified: trunk/OpenMPT/mptrack/AutoSaver.cpp =================================================================== --- trunk/OpenMPT/mptrack/AutoSaver.cpp 2013-12-16 14:50:15 UTC (rev 3480) +++ trunk/OpenMPT/mptrack/AutoSaver.cpp 2013-12-16 17:04:30 UTC (rev 3481) @@ -311,17 +311,13 @@ HANDLE hFindFile = FindFirstFileW(searchPattern.AsNative().c_str(), &findData); if(hFindFile != INVALID_HANDLE_VALUE) { - while(true) + do { if(!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) { foundfiles.push_back(path + mpt::PathString::FromNative(findData.cFileName)); } - if(FindNextFileW(hFindFile, &findData) == FALSE) - { - break; - } - } + } while(FindNextFileW(hFindFile, &findData)); FindClose(hFindFile); hFindFile = INVALID_HANDLE_VALUE; } Modified: trunk/OpenMPT/mptrack/ExceptionHandler.cpp =================================================================== --- trunk/OpenMPT/mptrack/ExceptionHandler.cpp 2013-12-16 14:50:15 UTC (rev 3480) +++ trunk/OpenMPT/mptrack/ExceptionHandler.cpp 2013-12-16 17:04:30 UTC (rev 3481) @@ -53,7 +53,8 @@ baseRescuePath += timestampDir; if(!PathIsDirectoryW(baseRescuePath.AsNative().c_str()) && !CreateDirectoryW(baseRescuePath.AsNative().c_str(), nullptr)) { - errorMessage.AppendFormat("\n\nCould not create the following directory for saving debug information and modified files to:\n%s", mpt::ToCString(baseRescuePath.ToWide())); + errorMessage += "\n\nCould not create the following directory for saving debug information and modified files to:\n" + + mpt::ToCString(baseRescuePath.ToWide()); } } @@ -90,7 +91,8 @@ pExceptionInfo ? &ExInfo : NULL, NULL, NULL); ::CloseHandle(hFile); - errorMessage.AppendFormat("\n\nDebug information has been saved to\n%s", mpt::ToCString(baseRescuePath.ToWide())); + errorMessage += "\n\nDebug information has been saved to\n" + + mpt::ToCString(baseRescuePath.ToWide()); } } ::FreeLibrary(hDll); @@ -149,7 +151,7 @@ } -// Try to close the audio device and rescue unsaved work if an unhandled exception occours... +// Try to close the audio device and rescue unsaved work if an unhandled exception occurrs... LONG ExceptionHandler::UnhandledExceptionFilter(_EXCEPTION_POINTERS *pExceptionInfo) //---------------------------------------------------------------------------------- { @@ -174,7 +176,7 @@ } CString errorMessage; - errorMessage.Format("Unhandled exception 0x%X at address %p occoured.", pExceptionInfo->ExceptionRecord->ExceptionCode, pExceptionInfo->ExceptionRecord->ExceptionAddress); + errorMessage.Format("Unhandled exception 0x%X at address %p occurred.", pExceptionInfo->ExceptionRecord->ExceptionCode, pExceptionInfo->ExceptionRecord->ExceptionAddress); GenerateDump(errorMessage, pExceptionInfo); Modified: trunk/OpenMPT/mptrack/Moptions.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moptions.cpp 2013-12-16 14:50:15 UTC (rev 3480) +++ trunk/OpenMPT/mptrack/Moptions.cpp 2013-12-16 17:04:30 UTC (rev 3481) @@ -25,10 +25,10 @@ static const struct ColorDescriptions { - char *name; + const char *name; int previewImage; uint32 colorIndex1, colorIndex2, colorIndex3; - char *descText1, *descText2, *descText3; + const char *descText1, *descText2, *descText3; } colorDefs[] = { {"Pattern Editor", 0, MODCOLOR_BACKNORMAL, MODCOLOR_TEXTNORMAL, MODCOLOR_BACKHILIGHT, "Background:", "Foreground:", "Highlighted:"}, @@ -550,7 +550,7 @@ static const struct GeneralOptionsDescriptions { uint32 flag; - char *name, *description; + const char *name, *description; } generalOptionsList[] = { {PATTERN_PLAYNEWNOTE, "Play new notes while recording", "When this option is enabled, notes entered in the pattern editor will always be played (If not checked, notes won't be played in record mode)."}, Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2013-12-16 14:50:15 UTC (rev 3480) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2013-12-16 17:04:30 UTC (rev 3481) @@ -333,7 +333,6 @@ BOOL CTrackApp::ImportMidiConfig(SettingsContainer &file, bool forgetSettings) //---------------------------------------------------------------------------- { - TCHAR s[_MAX_PATH]; mpt::PathString UltraSndPath; UltraSndPath = file.Read<mpt::PathString>("Ultrasound", "PatchDir", mpt::PathString()); @@ -348,21 +347,22 @@ for (UINT iMidi=0; iMidi<256; iMidi++) { mpt::PathString filename; - wsprintf(s, (iMidi < 128) ? _T("Midi%d") : _T("Perc%d"), iMidi & 0x7f); - filename = file.Read<mpt::PathString>("Midi Library", s, mpt::PathString()); - if(forgetSettings) file.Forget("Midi Library", s); + char section[32]; + sprintf(section, (iMidi < 128) ? _T("Midi%d") : _T("Perc%d"), iMidi & 0x7f); + filename = file.Read<mpt::PathString>("Midi Library", section, mpt::PathString()); + if(forgetSettings) file.Forget("Midi Library", section); // Check for ULTRASND.INI if(filename.empty()) { LPCSTR pszSection = (iMidi < 128) ? _T("Melodic Patches") : _T("Drum Patches"); - wsprintf(s, _T("%d"), iMidi & 0x7f); - filename = file.Read<mpt::PathString>(pszSection, s, mpt::PathString()); - if(forgetSettings) file.Forget(pszSection, s); + sprintf(section, _T("%d"), iMidi & 0x7f); + filename = file.Read<mpt::PathString>(pszSection, section, mpt::PathString()); + if(forgetSettings) file.Forget(pszSection, section); if(filename.empty()) { pszSection = (iMidi < 128) ? _T("Melodic Bank 0") : _T("Drum Bank 0"); - filename = file.Read<mpt::PathString>(pszSection, s, mpt::PathString()); - if(forgetSettings) file.Forget(pszSection, s); + filename = file.Read<mpt::PathString>(pszSection, section, mpt::PathString()); + if(forgetSettings) file.Forget(pszSection, section); } if(!filename.empty()) { @@ -401,21 +401,21 @@ BOOL CTrackApp::ExportMidiConfig(SettingsContainer &file) //------------------------------------------------------- { - CHAR s[128]; - for(size_t iMidi = 0; iMidi < 256; iMidi++) if (!midiLibrary.MidiMap[iMidi].empty()) { - if (iMidi < 128) - wsprintf(s, _T("Midi%d"), iMidi); - else - wsprintf(s, _T("Perc%d"), iMidi & 0x7F); - mpt::PathString szFileName = midiLibrary.MidiMap[iMidi]; if(!szFileName.empty()) { if(theApp.IsPortableMode()) szFileName = theApp.AbsolutePathToRelative(szFileName); + + char s[16]; + if (iMidi < 128) + sprintf(s, _T("Midi%d"), iMidi); + else + sprintf(s, _T("Perc%d"), iMidi & 0x7F); + file.Write<mpt::PathString>("Midi Library", s, szFileName); } } @@ -438,7 +438,7 @@ for(size_t i = 0; i < numBanks; i++) { char s[16]; - wsprintf(s, _T("Bank%d"), i + 1); + sprintf(s, _T("Bank%d"), i + 1); mpt::PathString path = theApp.GetSettings().Read<mpt::PathString>("DLS Banks", s, mpt::PathString()); path = theApp.RelativePathToAbsolute(path); AddDLSBank(path); @@ -483,7 +483,6 @@ BOOL CTrackApp::SaveDefaultDLSBanks() //----------------------------------- { - TCHAR s[64]; DWORD nBanks = 0; for(size_t i = 0; i < gpDLSBanks.size(); i++) { @@ -497,7 +496,8 @@ path = theApp.AbsolutePathToRelative(path); } - wsprintf(s, _T("Bank%d"), nBanks+1); + char s[16]; + sprintf(s, _T("Bank%d"), nBanks + 1); theApp.GetSettings().Write<mpt::PathString>("DLS Banks", s, path); nBanks++; @@ -776,8 +776,6 @@ AfxOleInit(); // Standard initialization - // Change the registry key under which our settings are stored. - //SetRegistryKey(_T("Olivier Lapicque")); // Start loading BeginWaitCursor(); @@ -827,7 +825,7 @@ ImportMidiConfig(theApp.GetSettings(), true); // create main MDI Frame window - CMainFrame* pMainFrame = new CMainFrame(/*cmdInfo.m_csExtension*/); + CMainFrame* pMainFrame = new CMainFrame(); if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) return FALSE; m_pMainWnd = pMainFrame; @@ -960,12 +958,8 @@ CModDoc *pModDoc = CMainFrame::GetMainFrame()->GetActiveDoc(); if(pModDoc != nullptr) { - CSoundFile *pSndFile = pModDoc->GetSoundFile(); - if(pSndFile != nullptr) - { - nNewType = pSndFile->GetBestSaveFormat(); - bIsProject = pSndFile->m_SongFlags[SONG_ITPROJECT]; - } + nNewType = pModDoc->GetrSoundFile().GetBestSaveFormat(); + bIsProject = pModDoc->GetrSoundFile().m_SongFlags[SONG_ITPROJECT]; } switch(nNewType) @@ -1932,7 +1926,7 @@ for(size_t plug = 0; plug < numPlugins; plug++) { char tmp[32]; - wsprintf(tmp, "Plugin%d", plug); + sprintf(tmp, "Plugin%d", plug); mpt::PathString plugPath = theApp.GetSettings().Read<mpt::PathString>("VST Plugins", tmp, MPT_PATHSTRING("")); if(!plugPath.empty()) { @@ -1970,7 +1964,7 @@ if((**pPlug).pluginId1 != kDmoMagic) { char tmp[32]; - wsprintf(tmp, "Plugin%d", plug); + sprintf(tmp, "Plugin%d", plug); mpt::PathString plugPath = (**pPlug).dllPath; if(theApp.IsPortableMode()) { Modified: trunk/OpenMPT/mptrack/Vstplug.cpp =================================================================== --- trunk/OpenMPT/mptrack/Vstplug.cpp 2013-12-16 14:50:15 UTC (rev 3480) +++ trunk/OpenMPT/mptrack/Vstplug.cpp 2013-12-16 17:04:30 UTC (rev 3481) @@ -433,7 +433,7 @@ // (called from writeChunk) void* in <ptr> (char[2048], or sizeof(FSSpec)) - DEPRECATED in VST 2.4 case audioMasterGetChunkFile: #ifdef MODPLUG_TRACKER - if(pVstPlugin) + if(pVstPlugin && pVstPlugin->GetModDoc()) { strcpy(ptr, pVstPlugin->GetModDoc()->GetPathNameMpt().ToLocale().c_str()); return 1; Modified: trunk/OpenMPT/soundlib/Load_mo3.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_mo3.cpp 2013-12-16 14:50:15 UTC (rev 3480) +++ trunk/OpenMPT/soundlib/Load_mo3.cpp 2013-12-16 17:04:30 UTC (rev 3481) @@ -89,19 +89,17 @@ const void *stream = file.GetRawData(); uint32 length = mpt::saturate_cast<uint32>(file.GetLength()); + int32 unmo3result; #ifdef _WIN32 - int32 unmo3result; if(UNMO3_GetVersion == nullptr) { // Old API version: No "flags" parameter. unmo3result = static_cast<UNMO3_DECODE_OLD>(UNMO3_Decode)(&stream, &length); } else +#endif // _WIN32 { unmo3result = static_cast<UNMO3_DECODE>(UNMO3_Decode)(&stream, &length, (loadFlags & loadSampleData) ? 0 : 1); } -#else - int32 unmo3result = UNMO3_Decode(&stream, &length, (loadFlags & loadSampleData) ? 0 : 1); -#endif // _WIN32 if(unmo3result == 0) { Modified: trunk/OpenMPT/soundlib/Tables.cpp =================================================================== --- trunk/OpenMPT/soundlib/Tables.cpp 2013-12-16 14:50:15 UTC (rev 3480) +++ trunk/OpenMPT/soundlib/Tables.cpp 2013-12-16 17:04:30 UTC (rev 3481) @@ -639,7 +639,10 @@ }; -const uint32 LinearSlideUpTable[256] = +// floor(65536 * 2**(n/192)) +// 192 = 16 finetune steps for 12 notes +// Table content is in 16.16 format +const uint32 LinearSlideUpTable[256] = { 65536, 65773, 66010, 66249, 66489, 66729, 66971, 67213, 67456, 67700, 67945, 68190, 68437, 68685, 68933, 69182, @@ -676,8 +679,10 @@ }; - -const uint32 LinearSlideDownTable[256] = +// floor(65536 * 2**(-n/192)) +// 192 = 16 finetune steps for 12 notes +// Table content is in 16.16 format +const uint32 LinearSlideDownTable[256] = { 65536, 65299, 65064, 64830, 64596, 64363, 64131, 63900, 63670, 63440, 63212, 62984, 62757, 62531, 62305, 62081, @@ -824,8 +829,6 @@ - - ///////////////////////////////////////////////////////////////////////////////////////////// @@ -872,7 +875,6 @@ } } - #if 0 // this code is currently unused Modified: trunk/OpenMPT/soundlib/modcommand.h =================================================================== --- trunk/OpenMPT/soundlib/modcommand.h 2013-12-16 14:50:15 UTC (rev 3480) +++ trunk/OpenMPT/soundlib/modcommand.h 2013-12-16 17:04:30 UTC (rev 3481) @@ -88,13 +88,13 @@ CMD_PANNINGSLIDE = 29, CMD_SETENVPOSITION = 30, CMD_MIDI = 31, - CMD_SMOOTHMIDI = 32, //rewbs.smoothVST + CMD_SMOOTHMIDI = 32, CMD_DELAYCUT = 33, CMD_XPARAM = 34, // -> CODE#0010 -> DESC="add extended parameter mechanism to pattern effects" -! NEW_FEATURE#0010 - CMD_NOTESLIDEUP = 35, // IMF Gxy / PTM Jxy (Slide y notes up every ticks) - CMD_NOTESLIDEDOWN = 36, // IMF Hxy / PTM Kxy (Slide y notes down every ticks) - CMD_NOTESLIDEUPRETRIG = 37, // PTM Lxy (Slide y notes up every ticks + retrigger note) - CMD_NOTESLIDEDOWNRETRIG = 38, // PTM Mxy (Slide y notes down every ticks + retrigger note) + CMD_NOTESLIDEUP = 35, // IMF Gxy / PTM Jxy (Slide y notes up every x ticks) + CMD_NOTESLIDEDOWN = 36, // IMF Hxy / PTM Kxy (Slide y notes down every x ticks) + CMD_NOTESLIDEUPRETRIG = 37, // PTM Lxy (Slide y notes up every x ticks + retrigger note) + CMD_NOTESLIDEDOWNRETRIG = 38, // PTM Mxy (Slide y notes down every x ticks + retrigger note) CMD_REVERSEOFFSET = 39, // PTM Nxx Revert sample + offset MAX_EFFECTS = 40 }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2013-12-16 17:07:16
|
Revision: 3482 http://sourceforge.net/p/modplug/code/3482 Author: saga-games Date: 2013-12-16 17:07:08 +0000 (Mon, 16 Dec 2013) Log Message: ----------- [Mod] Instead of testing if the moddoc associated with a sndfile is null, add a separate loading flag to not load any plugins. [Mod] When normalizing loaded samples, prevent sample volume from being 0. [Ref] Further small changes. Modified Paths: -------------- trunk/OpenMPT/mptrack/Mptrack.h trunk/OpenMPT/mptrack/View_tre.cpp trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/Sndfile.h Modified: trunk/OpenMPT/mptrack/Mptrack.h =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.h 2013-12-16 17:04:30 UTC (rev 3481) +++ trunk/OpenMPT/mptrack/Mptrack.h 2013-12-16 17:07:08 UTC (rev 3482) @@ -48,10 +48,24 @@ ////////////////////////////////////////////////////////////////////////// // Dragon Droppings +enum DragonDropType +{ + DRAGONDROP_NOTHING=0, // |------< Drop Type >-------------|--< dwDropItem >---|--< lDropParam >---| + DRAGONDROP_DLS, // | Instrument from a DLS bank | DLS Bank # | DLS Instrument | + DRAGONDROP_SAMPLE, // | Sample from a song | Sample # | NULL | + DRAGONDROP_INSTRUMENT, // | Instrument from a song | Instrument # | NULL | + DRAGONDROP_SOUNDFILE, // | File from instrument library | ? | File Name | + DRAGONDROP_MIDIINSTR, // | File from midi library | Midi Program/Perc | File Name | + DRAGONDROP_PATTERN, // | Pattern from a song | Pattern # | NULL | + DRAGONDROP_ORDER, // | Pattern index in a song | Order # | NULL | + DRAGONDROP_SONG, // | Song file (mod/s3m/xm/it) | 0 | File Name | + DRAGONDROP_SEQUENCE // | Sequence (a set of orders) | Sequence # | NULL | +}; + struct DRAGONDROP { CModDoc *pModDoc; - DWORD dwDropType; + DragonDropType dwDropType; DWORD dwDropItem; LPARAM lDropParam; @@ -67,20 +81,7 @@ } }; -enum { - DRAGONDROP_NOTHING=0, // |------< Drop Type >-------------|--< dwDropItem >---|--< lDropParam >---| - DRAGONDROP_DLS, // | Instrument from a DLS bank | DLS Bank # | DLS Instrument | - DRAGONDROP_SAMPLE, // | Sample from a song | Sample # | NULL | - DRAGONDROP_INSTRUMENT, // | Instrument from a song | Instrument # | NULL | - DRAGONDROP_SOUNDFILE, // | File from instrument library | ? | pszFileName | - DRAGONDROP_MIDIINSTR, // | File from midi library | Midi Program/Perc | pszFileName | - DRAGONDROP_PATTERN, // | Pattern from a song | Pattern # | NULL | - DRAGONDROP_ORDER, // | Pattern index in a song | Order # | NULL | - DRAGONDROP_SONG, // | Song file (mod/s3m/xm/it) | 0 | pszFileName | - DRAGONDROP_SEQUENCE // | Sequence (a set of orders) | Sequence # | NULL | -}; - ///////////////////////////////////////////////////////////////////////////// // Document Template @@ -232,7 +233,7 @@ static bool OpenDirectory(const mpt::PathString &directory) { return OpenURL(directory); }; int GetOpenDocumentCount() const; - std::vector<CModDoc *>GetOpenDocuments() const; + std::vector<CModDoc *> GetOpenDocuments() const; public: bool InGuiThread() const { return GetCurrentThreadId() == m_GuiThreadId; } Modified: trunk/OpenMPT/mptrack/View_tre.cpp =================================================================== --- trunk/OpenMPT/mptrack/View_tre.cpp 2013-12-16 17:04:30 UTC (rev 3481) +++ trunk/OpenMPT/mptrack/View_tre.cpp 2013-12-16 17:07:08 UTC (rev 3482) @@ -340,7 +340,7 @@ } if(m_SongFile != nullptr) { - if(!m_SongFile->Create(file, CSoundFile::loadNoPatternData, nullptr)) + if(!m_SongFile->Create(file, CSoundFile::loadNoPatternOrPluginData, nullptr)) { return false; } Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2013-12-16 17:04:30 UTC (rev 3481) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2013-12-16 17:07:08 UTC (rev 3482) @@ -766,18 +766,9 @@ { if (ChnSettings[ich].nVolume > 64) ChnSettings[ich].nVolume = 64; if (ChnSettings[ich].nPan > 256) ChnSettings[ich].nPan = 128; - Chn[ich].nPan = ChnSettings[ich].nPan; - Chn[ich].nGlobalVol = ChnSettings[ich].nVolume; - Chn[ich].dwFlags = ChnSettings[ich].dwFlags; - Chn[ich].nVolume = 256; - Chn[ich].nCutOff = 0x7F; - Chn[ich].nEFxSpeed = 0; - //IT compatibility 15. Retrigger - if(IsCompatibleMode(TRK_IMPULSETRACKER)) - { - Chn[ich].nRetrigParam = Chn[ich].nRetrigCount = 1; - } + Chn[ich].Reset(ModChannel::resetTotal, *this, ich); } + // Checking samples ModSample *pSmp = Samples; for(SAMPLEINDEX nSmp = 0; nSmp < MAX_SAMPLES; nSmp++, pSmp++) @@ -836,8 +827,7 @@ std::vector<PLUGINDEX> notFoundIDs; #ifndef NO_VST - // Load plugins only when m_pModDoc is valid. (can be invalid for example when examining module samples in treeview. - if (gpMixPluginCreateProc && GetpModDoc() != nullptr) + if (gpMixPluginCreateProc && (loadFlags & loadPluginData)) { for(PLUGINDEX iPlug = 0; iPlug < MAX_MIXPLUGINS; iPlug++) { @@ -847,15 +837,15 @@ if (m_MixPlugins[iPlug].pMixPlugin) { // plugin has been found - m_MixPlugins[iPlug].pMixPlugin->RestoreAllParameters(m_MixPlugins[iPlug].defaultProgram); //rewbs.plugDefaultProgram: added param - } - else + m_MixPlugins[iPlug].pMixPlugin->RestoreAllParameters(m_MixPlugins[iPlug].defaultProgram); + } else { // plugin not found - add to list bool found = false; for(std::vector<PLUGINDEX>::iterator i = notFoundIDs.begin(); i != notFoundIDs.end(); ++i) { - if(m_MixPlugins[*i].Info.dwPluginId2 == m_MixPlugins[iPlug].Info.dwPluginId2) + if(m_MixPlugins[*i].Info.dwPluginId2 == m_MixPlugins[iPlug].Info.dwPluginId2 + && m_MixPlugins[*i].Info.dwPluginId1 == m_MixPlugins[iPlug].Info.dwPluginId1) { found = true; break; @@ -873,7 +863,7 @@ } } - // Display a nice message so the user sees what plugins are missing + // Display a nice message so the user sees which plugins are missing // TODO: Use IDD_MODLOADING_WARNINGS dialog (NON-MODAL!) to display all warnings that are encountered when loading a module. if(!notFoundIDs.empty()) { Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2013-12-16 17:04:30 UTC (rev 3481) +++ trunk/OpenMPT/soundlib/Sndfile.h 2013-12-16 17:07:08 UTC (rev 3482) @@ -462,9 +462,10 @@ onlyVerifyHeader = 0x00, loadPatternData = 0x01, // If unset, advise loaders to not process any pattern data (if possible) loadSampleData = 0x02, // If unset, advise loaders to not process any sample data (if possible) + loadPluginData = 0x04, // If unset, plugins are not instanciated. // Shortcuts - loadCompleteModule = loadSampleData | loadPatternData, - loadNoPatternData = loadSampleData, + loadCompleteModule = loadSampleData | loadPatternData | loadPluginData, + loadNoPatternOrPluginData = loadSampleData, }; #ifdef MODPLUG_TRACKER This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2013-12-16 17:10:57
|
Revision: 3483 http://sourceforge.net/p/modplug/code/3483 Author: saga-games Date: 2013-12-16 17:10:39 +0000 (Mon, 16 Dec 2013) Log Message: ----------- [Ref] MIDI mapping deserialization uses FileReader now. [Ref] Further readability improvements in song extension writing. [Mod] When normalizing loaded samples, prevent sample volume from being 0. [Mod] OpenMPT: Version is now 1.22.07.08 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/MIDIMapping.cpp trunk/OpenMPT/mptrack/MIDIMapping.h trunk/OpenMPT/soundlib/Load_it.cpp trunk/OpenMPT/soundlib/SampleIO.cpp Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2013-12-16 17:07:08 UTC (rev 3482) +++ trunk/OpenMPT/common/versionNumber.h 2013-12-16 17:10:39 UTC (rev 3483) @@ -17,7 +17,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 22 #define VER_MINOR 07 -#define VER_MINORMINOR 07 +#define VER_MINORMINOR 08 //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/MIDIMapping.cpp =================================================================== --- trunk/OpenMPT/mptrack/MIDIMapping.cpp 2013-12-16 17:07:08 UTC (rev 3482) +++ trunk/OpenMPT/mptrack/MIDIMapping.cpp 2013-12-16 17:10:39 UTC (rev 3483) @@ -12,6 +12,7 @@ #include "MIDIMapping.h" #include "../soundlib/MIDIEvents.h" #include "Mainfrm.h" +#include "../soundlib/FileReader.h" std::string CMIDIMappingDirective::ToString() const @@ -64,7 +65,7 @@ } else temp8 |= (2 << 6); - fwrite(&temp8, 1, sizeof(temp8), f); + fwrite(&temp8, 1, sizeof(temp8), f); fwrite(&temp16, 1, sizeof(temp16), f); temp8 = citer->GetPlugIndex(); fwrite(&temp8, 1, sizeof(temp8), f); @@ -73,37 +74,35 @@ } -bool CMIDIMapper::Deserialize(const char *ptr, const size_t size) -//--------------------------------------------------------------- +bool CMIDIMapper::Deserialize(FileReader &file) +//--------------------------------------------- { m_Directives.clear(); - const char* endptr = ptr + size; - while(ptr + 5 <= endptr) + while(file.AreBytesLeft()) { - uint8 i8 = 0; - uint16 i16 = 0; - uint32 i32 = 0; - memcpy(&i8, ptr, 1); ptr++; - BYTE psize = 0; + uint8 i8 = file.ReadUint8(); + uint8 psize = 0; + // Determine size of this event (depends on size of plugin parameter index) switch(i8 >> 6) { - case 0: psize = 5; break; - case 1: psize = 6; break; - case 2: psize = 8; break; - case 3: default: psize = 12; break; + case 0: psize = 4; break; + case 1: psize = 5; break; + case 2: psize = 7; break; + case 3: default: psize = 11; break; } - if(ptr + psize - 1 > endptr) return true; - if(((i8 >> 2) & 7) != 0) {ptr += psize - 1; continue;} //Skipping unrecognised mapping types. + if(!file.CanRead(psize)) return true; + if(((i8 >> 2) & 7) != 0) { file.Skip(psize); continue;} //Skipping unrecognised mapping types. CMIDIMappingDirective s; s.SetActive((i8 & 1) != 0); s.SetCaptureMIDI((i8 & (1 << 1)) != 0); s.SetAllowPatternEdit((i8 & (1 << 5)) != 0); - memcpy(&i16, ptr, 2); ptr += 2; //Channel, event, MIDIbyte1. - memcpy(&i8, ptr, 1); ptr++; //Plugindex - const BYTE remainingbytes = psize - 4; - memcpy(&i32, ptr, MIN(4, remainingbytes)); ptr += remainingbytes; + uint16 i16 = file.ReadUint16LE(); //Channel, event, MIDIbyte1. + i8 = file.ReadUint8(); //Plugindex + uint32 i32; + file.ReadStructPartial(i32, psize - 3); + SwapBytesLE(i32); s.SetChannel(((i16 & 1) != 0) ? 0 : 1 + ((i16 >> 1) & 0xF)); s.SetEvent(static_cast<BYTE>((i16 >> 5) & 0xF)); Modified: trunk/OpenMPT/mptrack/MIDIMapping.h =================================================================== --- trunk/OpenMPT/mptrack/MIDIMapping.h 2013-12-16 17:07:08 UTC (rev 3482) +++ trunk/OpenMPT/mptrack/MIDIMapping.h 2013-12-16 17:10:39 UTC (rev 3483) @@ -72,6 +72,8 @@ }; class CSoundFile; +class FileReader; + inline bool operator<(const CMIDIMappingDirective& a, const CMIDIMappingDirective& b) {return a.GetController() < b.GetController();} inline bool operator<(const CMIDIMappingDirective& d, const BYTE& ctrlVal) {return d.GetController() < ctrlVal;} inline bool operator<(const BYTE& ctrlVal, const CMIDIMappingDirective& d) {return ctrlVal < d.GetController();} @@ -111,7 +113,7 @@ size_t GetSerializationSize() const; void Serialize(FILE* f) const; - bool Deserialize(const char *ptr, const size_t size); //Return false if succesful, true otherwise. + bool Deserialize(FileReader &file); //Return false if succesful, true otherwise. bool AreOrderEqual(const size_t a, const size_t b) {return !(m_Directives[a] < m_Directives[b] || m_Directives[b] < m_Directives[a]);} Modified: trunk/OpenMPT/soundlib/Load_it.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_it.cpp 2013-12-16 17:07:08 UTC (rev 3482) +++ trunk/OpenMPT/soundlib/Load_it.cpp 2013-12-16 17:10:39 UTC (rev 3483) @@ -1895,13 +1895,7 @@ void CSoundFile::SaveExtendedInstrumentProperties(UINT nInstruments, FILE* f) const //--------------------------------------------------------------------------------- { - uint32 code=0; - -/* if(Instruments[1] == NULL) { - return; - }*/ - - code = MULTICHAR4_LE_MSVC('M','P','T','X'); // write extension header code + uint32 code = MULTICHAR4_LE_MSVC('M','P','T','X'); // write extension header code fwrite(&code, 1, sizeof(uint32), f); if (nInstruments == 0) @@ -1934,12 +1928,12 @@ if(GetType() & MOD_TYPE_MPT) { - UINT maxNodes = 0; + uint32 maxNodes = 0; for(INSTRUMENTINDEX nIns = 1; nIns <= m_nInstruments; nIns++) if(Instruments[nIns] != nullptr) { - maxNodes = MAX(maxNodes, Instruments[nIns]->VolEnv.nNodes); - maxNodes = MAX(maxNodes, Instruments[nIns]->PanEnv.nNodes); - maxNodes = MAX(maxNodes, Instruments[nIns]->PitchEnv.nNodes); + maxNodes = std::max(maxNodes, Instruments[nIns]->VolEnv.nNodes); + maxNodes = std::max(maxNodes, Instruments[nIns]->PanEnv.nNodes); + maxNodes = std::max(maxNodes, Instruments[nIns]->PitchEnv.nNodes); } // write full envelope information for MPTM files (more env points) if(maxNodes > 25) @@ -1962,7 +1956,7 @@ } void CSoundFile::WriteInstrumentPropertyForAllInstruments(uint32 code, int16 size, FILE* f, UINT nInstruments) const -//--------------------------------------------------------------------------------------------------------------------- +//------------------------------------------------------------------------------------------------------------------ { fwrite(&code, 1, sizeof(uint32), f); //write code fwrite(&size, 1, sizeof(int16), f); //write size @@ -1973,9 +1967,8 @@ WriteInstrumentHeaderStructOrField(Instruments[nins], f, code, size); } else { - ModInstrument *emptyInstrument = new ModInstrument(); - WriteInstrumentHeaderStructOrField(emptyInstrument, f, code, size); - delete emptyInstrument; + ModInstrument emptyInstrument; + WriteInstrumentHeaderStructOrField(&emptyInstrument, f, code, size); } } } @@ -1984,46 +1977,38 @@ //-------------------------------------------------------- { //Extra song data - Yet Another Hack. - uint16 size; - uint32 code = MULTICHAR4_LE_MSVC('M','P','T','S'); //Extra song file data + const uint32 code = MULTICHAR4_LE_MSVC('M','P','T','S'); fwrite(&code, 1, sizeof(uint32), f); +#define WRITEMODULARHEADER(c1, c2, c3, c4, fsize) \ + { \ + const uint32 code = MULTICHAR4_LE_MSVC(c1, c2, c3, c4); \ + fwrite(&code, 1, sizeof(code), f); \ + const uint16 size = (fsize); \ + fwrite(&size, 1, sizeof(size), f); \ + } +#define WRITEMODULAR(c1, c2, c3, c4, field) \ + { \ + WRITEMODULARHEADER(c1, c2, c3, c4, sizeof(field)) \ + fwrite(&(field), 1, sizeof(field), f); \ + } + if(m_nDefaultTempo > 255) { - code = MULTICHAR4_LE_MSVC('D','T','.','.'); //write m_nDefaultTempo field code - fwrite(&code, 1, sizeof(uint32), f); - size = sizeof(m_nDefaultTempo); //write m_nDefaultTempo field size - fwrite(&size, 1, sizeof(uint16), f); - fwrite(&m_nDefaultTempo, 1, size, f); //write m_nDefaultTempo + WRITEMODULAR('D','T','.','.', m_nDefaultTempo); } - code = MULTICHAR4_LE_MSVC('R','P','B','.'); //write m_nRowsPerBeat - fwrite(&code, 1, sizeof(uint32), f); - size = sizeof(m_nDefaultRowsPerBeat); - fwrite(&size, 1, sizeof(uint16), f); - fwrite(&m_nDefaultRowsPerBeat, 1, size, f); + WRITEMODULAR('R','P','B','.', m_nDefaultRowsPerBeat); + WRITEMODULAR('R','P','M','.', m_nDefaultRowsPerMeasure); - code = MULTICHAR4_LE_MSVC('R','P','M','.'); //write m_nRowsPerMeasure - fwrite(&code, 1, sizeof(uint32), f); - size = sizeof(m_nDefaultRowsPerMeasure); - fwrite(&size, 1, sizeof(uint16), f); - fwrite(&m_nDefaultRowsPerMeasure, 1, size, f); - if(GetType() != MOD_TYPE_XM) { - code = MULTICHAR4_LE_MSVC('C','.','.','.'); //write m_nChannels - fwrite(&code, 1, sizeof(uint32), f); - size = sizeof(m_nChannels); - fwrite(&size, 1, sizeof(uint16), f); - fwrite(&m_nChannels, 1, size, f); + WRITEMODULAR('C','.','.','.', m_nChannels); } if(TypeIsIT_MPT() && GetNumChannels() > 64) //IT header has room only for 64 channels. Save the { //settings that do not fit to the header here as an extension. - code = MULTICHAR4_LE_MSVC('C','h','n','S'); - fwrite(&code, 1, sizeof(uint32), f); - size = (GetNumChannels() - 64) * 2; - fwrite(&size, 1, sizeof(uint16), f); + WRITEMODULARHEADER('C','h','n','S', (GetNumChannels() - 64) * 2); for(CHANNELINDEX chn = 64; chn < GetNumChannels(); chn++) { uint8 panvol[2]; @@ -2035,71 +2020,33 @@ } } - code = MULTICHAR4_LE_MSVC('T','M','.','.'); //write m_nTempoMode - fwrite(&code, 1, sizeof(uint32), f); - size = sizeof(m_nTempoMode); - fwrite(&size, 1, sizeof(uint16), f); - fwrite(&m_nTempoMode, 1, size, f); + WRITEMODULAR('T','M','.','.', m_nTempoMode); - code = MULTICHAR4_LE_MSVC('P','M','M','.'); //write m_nMixLevels - fwrite(&code, 1, sizeof(uint32), f); - size = sizeof(m_nMixLevels); - fwrite(&size, 1, sizeof(uint16), f); - fwrite(&m_nMixLevels, 1, size, f); + WRITEMODULAR('P','M','M','.', m_nMixLevels); if(m_dwCreatedWithVersion) { - code = MULTICHAR4_LE_MSVC('C','W','V','.'); //write m_dwCreatedWithVersion - fwrite(&code, 1, sizeof(uint32), f); - size = sizeof(m_dwCreatedWithVersion); - fwrite(&size, 1, sizeof(uint16), f); - fwrite(&m_dwCreatedWithVersion, 1, size, f); + WRITEMODULAR('C','W','V','.', m_dwCreatedWithVersion); } - code = MULTICHAR4_LE_MSVC('L','S','W','V'); //write m_dwLastSavedWithVersion - fwrite(&code, 1, sizeof(uint32), f); - size = sizeof(m_dwLastSavedWithVersion); - fwrite(&size, 1, sizeof(uint16), f); - fwrite(&m_dwLastSavedWithVersion, 1, size, f); + WRITEMODULAR('L','S','W','V', m_dwLastSavedWithVersion); + WRITEMODULAR('S','P','A','.', m_nSamplePreAmp); + WRITEMODULAR('V','S','T','V', m_nVSTiVolume); - code = MULTICHAR4_LE_MSVC('S','P','A','.'); //write m_nSamplePreAmp - fwrite(&code, 1, sizeof(uint32), f); - size = sizeof(m_nSamplePreAmp); - fwrite(&size, 1, sizeof(uint16), f); - fwrite(&m_nSamplePreAmp, 1, size, f); - - code = MULTICHAR4_LE_MSVC('V','S','T','V'); //write m_nVSTiVolume - fwrite(&code, 1, sizeof(uint32), f); - size = sizeof(m_nVSTiVolume); - fwrite(&size, 1, sizeof(uint16), f); - fwrite(&m_nVSTiVolume, 1, size, f); - if(GetType() == MOD_TYPE_XM && m_nDefaultGlobalVolume != MAX_GLOBAL_VOLUME) { - code = MULTICHAR4_LE_MSVC('D','G','V','.'); //write m_nDefaultGlobalVolume - fwrite(&code, 1, sizeof(uint32), f); - size = sizeof(m_nDefaultGlobalVolume); - fwrite(&size, 1, sizeof(uint16), f); - fwrite(&m_nDefaultGlobalVolume, 1, size, f); + WRITEMODULAR('D','G','V','.', m_nDefaultGlobalVolume); } if(GetType() != MOD_TYPE_XM && m_nRestartPos != 0) { - code = MULTICHAR4_LE_MSVC('R','P','.','.'); //write m_nRestartPos - fwrite(&code, 1, sizeof(uint32), f); - size = sizeof(m_nRestartPos); - fwrite(&size, 1, sizeof(uint16), f); - fwrite(&m_nRestartPos, 1, size, f); + WRITEMODULAR('R','P','.','.', m_nRestartPos); } //Additional flags for XM/IT/MPTM if(m_ModFlags) { - code = MULTICHAR4_LE_MSVC('M','S','F','.'); - fwrite(&code, 1, sizeof(uint32), f); - size = sizeof(m_ModFlags); - fwrite(&size, 1, sizeof(uint16), f); - fwrite(&m_ModFlags, 1, size, f); + WRITEMODULAR('M','S','F','.', m_ModFlags); } #ifdef MODPLUG_TRACKER @@ -2110,19 +2057,16 @@ if(objectsize > size_t(int16_max)) { AddToLog("Datafield overflow with MIDI to plugparam mappings; data won't be written."); - } - else + } else { - code = MULTICHAR4_LE_MSVC('M','I','M','A'); - fwrite(&code, 1, sizeof(uint32), f); - size = static_cast<int16>(objectsize); - fwrite(&size, 1, sizeof(uint16), f); + WRITEMODULARHEADER('M','I','M','A', static_cast<uint16>(objectsize)); GetMIDIMapper().Serialize(f); } } #endif - +#undef WRITEMODULAR +#undef WRITEMODULARHEADER return; } @@ -2233,7 +2177,7 @@ case MULTICHAR4_LE_MSVC('R','P','.','.'): if(modtype != MOD_TYPE_XM) ReadField(chunk, size, m_nRestartPos); break; case MULTICHAR4_LE_MSVC('M','S','F','.'): ReadFieldFlagSet(chunk, size, m_ModFlags); break; #ifdef MODPLUG_TRACKER - case MULTICHAR4_LE_MSVC('M','I','M','A'): GetMIDIMapper().Deserialize(chunk.GetRawData(), size); break; + case MULTICHAR4_LE_MSVC('M','I','M','A'): GetMIDIMapper().Deserialize(chunk); break; #endif case MULTICHAR4_LE_MSVC('C','h','n','S'): if(size <= (MAX_BASECHANNELS - 64) * 2 && (size % 2u) == 0) Modified: trunk/OpenMPT/soundlib/SampleIO.cpp =================================================================== --- trunk/OpenMPT/soundlib/SampleIO.cpp 2013-12-16 17:07:08 UTC (rev 3482) +++ trunk/OpenMPT/soundlib/SampleIO.cpp 2013-12-16 17:10:39 UTC (rev 3483) @@ -323,7 +323,7 @@ if(bytesRead) { // Adjust sample volume so we do not affect relative volume of the sample. Normalizing is only done to increase precision. - sample.nGlobalVol = static_cast<uint16>(Clamp(Util::muldivr_unsigned(sample.nGlobalVol, srcPeak, uint32(1)<<31), uint32(0), uint32(64))); + sample.nGlobalVol = static_cast<uint16>(Clamp(Util::muldivr_unsigned(sample.nGlobalVol, srcPeak, uint32(1)<<31), uint32(1), uint32(64))); } } @@ -343,7 +343,7 @@ if(bytesRead) { // Adjust sample volume so we do not affect relative volume of the sample. Normalizing is only done to increase precision. - sample.nGlobalVol = static_cast<uint16>(Clamp(Util::muldivr_unsigned(sample.nGlobalVol, srcPeak, uint32(1)<<31), uint32(0), uint32(64))); + sample.nGlobalVol = static_cast<uint16>(Clamp(Util::muldivr_unsigned(sample.nGlobalVol, srcPeak, uint32(1)<<31), uint32(1), uint32(64))); } } @@ -363,7 +363,7 @@ if(bytesRead) { // Adjust sample volume so we do not affect relative volume of the sample. Normalizing is only done to increase precision. - sample.nGlobalVol = Util::Round<uint16>(Clamp(sample.nGlobalVol * srcPeak, 0.0f, 64.0f)); + sample.nGlobalVol = Util::Round<uint16>(Clamp(sample.nGlobalVol * srcPeak, 1.0f, 64.0f)); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-12-17 13:13:02
|
Revision: 3487 http://sourceforge.net/p/modplug/code/3487 Author: manxorist Date: 2013-12-17 13:12:53 +0000 (Tue, 17 Dec 2013) Log Message: ----------- [New] libopenmpt: Add openmpt::string::library_features . [Doc] libopenmpt: Small cleanups. [Ref] openmpt123: Small cleanups. Modified Paths: -------------- trunk/OpenMPT/README.md trunk/OpenMPT/common/version.cpp trunk/OpenMPT/common/version.h trunk/OpenMPT/libopenmpt/dox/dependencies.md trunk/OpenMPT/libopenmpt/dox/quickstart.md trunk/OpenMPT/libopenmpt/dox/tests.md trunk/OpenMPT/libopenmpt/libopenmpt.h trunk/OpenMPT/libopenmpt/libopenmpt.hpp trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp trunk/OpenMPT/openmpt123/openmpt123.cpp Modified: trunk/OpenMPT/README.md =================================================================== --- trunk/OpenMPT/README.md 2013-12-17 12:11:22 UTC (rev 3486) +++ trunk/OpenMPT/README.md 2013-12-17 13:12:53 UTC (rev 3487) @@ -98,7 +98,7 @@ make CONFIG=mingw64-win64 # for win64 - - gcc or clang (on unix, including Mac OS X with MacPorts): + - gcc or clang (on Unix-like systems, including Mac OS X with MacPorts): The minimum required compiler versions are: @@ -106,7 +106,7 @@ - clang 3.0 - The Makefile requires pkg-config for native unix builds. + 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. @@ -194,14 +194,14 @@ - Do not use ANY locale-dependant C functions. For locale-dependant C++ functionaly (especially iostream), always imbue the `std::locale::classic()` locale. - - Prefer unix_style_names over CamelCaseNames. + - 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 brackets are separated from keywords with a space. - - Opening brackets are not separated from function names. - - Place spaces around operators and inside brackets. + - 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. Modified: trunk/OpenMPT/common/version.cpp =================================================================== --- trunk/OpenMPT/common/version.cpp 2013-12-17 12:11:22 UTC (rev 3486) +++ trunk/OpenMPT/common/version.cpp 2013-12-17 13:12:53 UTC (rev 3487) @@ -177,6 +177,44 @@ { retval += " DEBUG"; } + return retval; +} + +std::string GetBuildFeaturesString() +{ + std::string retval; + #ifdef LIBOPENMPT_BUILD + #if MPT_COMPILER_GENERIC + retval += "*C++11"; + #elif MPT_COMPILER_MSVC + retval += mpt::String::Print("*MSVC-%1.%2", MPT_COMPILER_MSVC_VERSION / 100, MPT_COMPILER_MSVC_VERSION % 100); + #elif MPT_COMPILER_GCC + retval += mpt::String::Print("*GCC-%1.%2.%3", MPT_COMPILER_GCC_VERSION / 10000, (MPT_COMPILER_GCC_VERSION / 100) % 100, MPT_COMPILER_GCC_VERSION % 100); + #elif MPT_COMPILER_CLANG + retval += mpt::String::Print("*Clang-%1.%2.%3", MPT_COMPILER_CLANG_VERSION / 10000, (MPT_COMPILER_CLANG_VERSION / 100) % 100, MPT_COMPILER_CLANG_VERSION % 100); + #else + retval += "*unknown"; + #endif + #if defined(WIN32) + retval += " +WINAPI"; + #elif defined(MPT_CHARSET_CPP) + retval += " +CODECVT"; + #else + retval += " +ICONV"; + #endif + #if !defined(NO_ZLIB) + retval += " +ZLIB"; + #elif !defined(NO_MINIZ) + retval += " +MINIZ"; + #else + retval += " -INFLATE"; + #endif + #if !defined(NO_MO3) + retval += " +UNMO3"; + #else + retval += " -UNMO3"; + #endif + #endif #ifdef MODPLUG_TRACKER #ifdef NO_VST retval += " NO_VST"; @@ -221,6 +259,9 @@ { retval += GetRevisionString(); retval += GetBuildFlagsString(); + #ifdef MODPLUG_TRACKER + retval += GetBuildFeaturesString(); + #endif } return retval; } Modified: trunk/OpenMPT/common/version.h =================================================================== --- trunk/OpenMPT/common/version.h 2013-12-17 12:11:22 UTC (rev 3486) +++ trunk/OpenMPT/common/version.h 2013-12-17 13:12:53 UTC (rev 3487) @@ -69,9 +69,12 @@ // Return a string decribing the time of the build process (if built from a svn working copy and tsvn was available during build, otherwise it returns the time version.cpp was last rebuild which could be unreliable as it does not get rebuild every time without tsvn) std::string GetBuildDateString(); - // Return a string decribing some of the buidl features and/or flags - std::string GetBuildFlagsString(); // e.g. " TEST DEBUG NO_VST" + // Return a string decribing some of the build flags + std::string GetBuildFlagsString(); // e.g. " TEST DEBUG" + // Return a string decribing some of the build features + std::string GetBuildFeaturesString(); // e.g. " NO_VST NO_DSOUND" + // Return a string decribing the revision of the svn working copy and if it was dirty (+) or had mixed revisions (!) (if built from a svn working copy and tsvn was available during build) std::string GetRevisionString(); // e.g. "-r1234+" Modified: trunk/OpenMPT/libopenmpt/dox/dependencies.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/dependencies.md 2013-12-17 12:11:22 UTC (rev 3486) +++ trunk/OpenMPT/libopenmpt/dox/dependencies.md 2013-12-17 13:12:53 UTC (rev 3487) @@ -23,7 +23,7 @@ * **J2B** support requires a inflate (deflate decompression) implementation: * **zlib** * **miniz** can be used internally if no zlib is available. - * Building on unix systems requires: + * Building on Unix-like systems requires: * **GNU make** * **pkg-config** Modified: trunk/OpenMPT/libopenmpt/dox/quickstart.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/quickstart.md 2013-12-17 12:11:22 UTC (rev 3486) +++ trunk/OpenMPT/libopenmpt/dox/quickstart.md 2013-12-17 13:12:53 UTC (rev 3487) @@ -3,40 +3,44 @@ =========== -### Unix +### Unix-like 1. Get dependencies: - - *GNU make* - - *gcc >= 4.4* or *clang >= 3.0* - - *pkg-config* - - *portaudio-v19* - - *zlib* + - **GNU make** + - **gcc >= 4.4** or **clang >= 3.0** + - **pkg-config** + - **portaudio-v19** + - **zlib** 2. *Optional*: - - *doxygen >= 1.8* - - *help2man* - - *libSDL* - - *libFLAC* - - *libsndfile* + - **doxygen >= 1.8** + - **help2man** + - **libSDL** + - **libFLAC** + - **libsndfile** + - **WavPack** 3. Run: svn checkout http://svn.code.sf.net/p/modplug/code/trunk/OpenMPT/ openmpt-trunk cd openmpt-trunk + make TEST=1 clean make TEST=1 make TEST=1 check make clean make make doc - sudo make install - sudo make install-doc + sudo make install # installs into /usr/local by default + sudo make install-doc # installs into /usr/local by default openmpt123 $SOMEMODULE ### Windows - 1. Checkout `http://svn.code.sf.net/p/modplug/code/trunk/OpenMPT/` . - 2. *Optional*: Get dependencies: - - *Winamp SDK* - - *XMPlay SDK* - 3. Open `openmpt123\openmpt123.sln` or `libopenmpt\libopenmpt.sln` in *Microsoft Visual Studio 2010*. - 4. Select appropriate configuration and build. Binaries are generated in `bin\` - 5. Drag a module onto `openmpt123.exe` or copy the player plugin DLLs (`in_openmpt.dll`, `xmp-openmpt.dll` or `foo_openmpt.dll`) and `libopenmpt_settings.dll` into the respective player directory. + 1. Get dependencies: + - **Microsoft Visual Studio 2010** + 2. *Optionally* get dependencies: + - **Winamp SDK** + - **XMPlay SDK** + 3. Checkout `http://svn.code.sf.net/p/modplug/code/trunk/OpenMPT/` . + 4. Open `openmpt123\openmpt123.sln` or `libopenmpt\libopenmpt.sln` in *Microsoft Visual Studio 2010*. + 5. Select appropriate configuration and build. Binaries are generated in `bin\` + 6. Drag a module onto `openmpt123.exe` or copy the player plugin DLLs (`in_openmpt.dll`, `xmp-openmpt.dll` or `foo_openmpt.dll`) and `libopenmpt_settings.dll` into the respective player directory. Modified: trunk/OpenMPT/libopenmpt/dox/tests.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/tests.md 2013-12-17 12:11:22 UTC (rev 3486) +++ trunk/OpenMPT/libopenmpt/dox/tests.md 2013-12-17 13:12:53 UTC (rev 3487) @@ -10,7 +10,7 @@ ### Running Tests -#### On Unix +#### On Unix-like systems Compile with Modified: trunk/OpenMPT/libopenmpt/libopenmpt.h =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.h 2013-12-17 12:11:22 UTC (rev 3486) +++ trunk/OpenMPT/libopenmpt/libopenmpt.h 2013-12-17 13:12:53 UTC (rev 3487) @@ -79,13 +79,15 @@ LIBOPENMPT_API uint32_t openmpt_get_core_version(void); /*! Return a verbose library version string from openmpt_string_get(). */ -#define OPENMPT_STRING_LIBRARY_VERSION "library_version" +#define OPENMPT_STRING_LIBRARY_VERSION "library_version" +/*! Return a verbose library features string from openmpt_string_get(). */ +#define OPENMPT_STRING_LIBRARY_FEATURES "library_features" /*! Return a verbose OpenMPT core version string from openmpt_string_get(). */ -#define OPENMPT_STRING_CORE_VERSION "core_version" +#define OPENMPT_STRING_CORE_VERSION "core_version" /*! Return information about the current build (e.g. the build date or compiler used) from openmpt_string_get(). */ -#define OPENMPT_STRING_BUILD "build" +#define OPENMPT_STRING_BUILD "build" /*! Return all contributors from openmpt_string_get(). */ -#define OPENMPT_STRING_CREDITS "credits" +#define OPENMPT_STRING_CREDITS "credits" /*! Return contact infromation about libopenmpt from openmpt_string_get(). */ #define OPENMPT_STRING_CONTACT "contact" Modified: trunk/OpenMPT/libopenmpt/libopenmpt.hpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.hpp 2013-12-17 12:11:22 UTC (rev 3486) +++ trunk/OpenMPT/libopenmpt/libopenmpt.hpp 2013-12-17 13:12:53 UTC (rev 3487) @@ -86,15 +86,17 @@ namespace string { //! Return a verbose library version string from openmpt::string::get(). -static const char library_version[] = "library_version"; +static const char library_version [] = "library_version"; +//! Return a verbose library features string from openmpt::string::get(). +static const char library_features[] = "library_features"; //! Return a verbose OpenMPT core version string from openmpt::string::get(). -static const char core_version [] = "core_version"; +static const char core_version [] = "core_version"; //! Return information about the current build (e.g. the build date or compiler used) from openmpt::string::get(). -static const char build [] = "build"; +static const char build [] = "build"; //! Return all contributors from openmpt::string::get(). -static const char credits [] = "credits"; +static const char credits [] = "credits"; //! Return contact infromation about libopenmpt from openmpt::string::get(). -static const char contact [] = "contact"; +static const char contact [] = "contact"; //! Get library related metadata. /*! Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-12-17 12:11:22 UTC (rev 3486) +++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-12-17 13:12:53 UTC (rev 3487) @@ -76,6 +76,10 @@ return str; } +static std::string get_library_features_string() { + return MptVersion::GetBuildFeaturesString(); +} + static std::string get_core_version_string() { return MptVersion::GetVersionStringExtended(); } @@ -97,6 +101,8 @@ return std::string(); } else if ( key == string::library_version ) { return get_library_version_string(); + } else if ( key == string::library_features ) { + return get_library_features_string(); } else if ( key == string::core_version ) { return get_core_version_string(); } else if ( key == string::build ) { Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-12-17 12:11:22 UTC (rev 3486) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-12-17 13:12:53 UTC (rev 3487) @@ -325,23 +325,43 @@ static void show_info( std::ostream & log, bool verbose ) { log << "openmpt123" << " v" << OPENMPT123_VERSION_STRING << ", libopenmpt " << openmpt::string::get( openmpt::string::library_version ) << " (" << "OpenMPT " << openmpt::string::get( openmpt::string::core_version ) << ")" << std::endl; - log << "Copyright (c) 2013 OpenMPT developers (http://openmpt.org/)" << std::endl; + log << "Copyright (c) 2013 OpenMPT developers <http://openmpt.org/>" << std::endl; if ( !verbose ) { log << std::endl; return; } - log << " (built " << openmpt::string::get( openmpt::string::build ) << ")" << std::endl; + log << " libopenmpt Features: " << openmpt::string::get( openmpt::string::library_features ) << std::endl; + log << " libopenmpt Build: " << openmpt::string::get( openmpt::string::build ) << std::endl; #ifdef MPT_WITH_PORTAUDIO - log << " " << Pa_GetVersionText() << " (http://portaudio.com/)" << std::endl; + log << " " << Pa_GetVersionText() << " (" << Pa_GetVersion() << ") <http://portaudio.com/>" << std::endl; #endif +#ifdef MPT_WITH_SDL + const SDL_version * linked_sdlver = SDL_Linked_Version(); + log << " libSDL "; + if ( linked_sdlver ) { + log << (int)linked_sdlver->major << "." << (int)linked_sdlver->minor << "." << (int)linked_sdlver->patch << " "; + } + SDL_version sdlver; + std::memset( &sdlver, 0, sizeof( SDL_version ) ); + SDL_VERSION( &sdlver ); + log << "(API: " << (int)sdlver.major << "." << (int)sdlver.minor << "." << (int)sdlver.patch << ")"; + log << " <https://libsdl.org/>" << std::endl; +#endif #ifdef MPT_WITH_FLAC - log << " FLAC " << FLAC__VERSION_STRING << ", " << FLAC__VENDOR_STRING << ", API " << FLAC_API_VERSION_CURRENT << "." << FLAC_API_VERSION_REVISION << "." << FLAC_API_VERSION_AGE << " (https://xiph.org/flac/)" << std::endl; + log << " FLAC " << FLAC__VERSION_STRING << ", " << FLAC__VENDOR_STRING << ", API " << FLAC_API_VERSION_CURRENT << "." << FLAC_API_VERSION_REVISION << "." << FLAC_API_VERSION_AGE << " <https://xiph.org/flac/>" << std::endl; #endif #ifdef MPT_WITH_SNDFILE char sndfile_info[128]; + std::memset( sndfile_info, 0, sizeof( sndfile_info ) ); sf_command( 0, SFC_GET_LIB_VERSION, sndfile_info, sizeof( sndfile_info ) ); - log << " libsndfile " << sndfile_info << " (http://mega-nerd.com/libsndfile/)" << std::endl; + sndfile_info[127] = '\0'; + log << " libsndfile " << sndfile_info << " <http://mega-nerd.com/libsndfile/>" << std::endl; #endif +#ifdef MPT_WITH_WAVPACK + std::ostringstream wpver; + wpver << std::hex << std::setfill('0') << std::setw(8) << WavpackGetLibraryVersion(); + log << " WavPack " << WavpackGetLibraryVersionString() << " (" << wpver.str() << ") (http://wavpack.com/)" << std::endl; +#endif log << std::endl; } @@ -390,8 +410,8 @@ return str.str(); } -static void show_help( textout & log, bool longhelp = false, const std::string & message = std::string(), bool verbose = false ) { - show_info( log, verbose ); +static void show_help( textout & log, bool longhelp = false, const std::string & message = std::string() ) { + show_info( log, false ); { log << "Usage: openmpt123 [options] [--] file1 [file2] ..." << std::endl; log << std::endl; @@ -1627,7 +1647,7 @@ show_help( std_out ); return 1; } catch ( show_help_exception & e ) { - show_help( std_out, e.longhelp, e.message, flags.verbose ); + show_help( std_out, e.longhelp, e.message ); if ( flags.verbose ) { show_credits( std_out ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-12-17 21:43:19
|
Revision: 3490 http://sourceforge.net/p/modplug/code/3490 Author: manxorist Date: 2013-12-17 21:43:12 +0000 (Tue, 17 Dec 2013) Log Message: ----------- [Fix] openmpt123: Fix typo in UI. [Doc] libopenmpt: Document libopenmpt_settings.dll dependency on .Net. [Doc] libopenmpt build: Document makefile settings for linking dependencies. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/libopenmpt/dox/dependencies.md trunk/OpenMPT/openmpt123/openmpt123.cpp Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2013-12-17 20:44:47 UTC (rev 3489) +++ trunk/OpenMPT/Makefile 2013-12-17 21:43:12 UTC (rev 3490) @@ -40,10 +40,26 @@ # TEST=0 Build libopenmpt in test mode # # +# Build flags for libopenmpt (provide on each `make` invocation) +# (defaults are 0): +# +# NO_ZLIB=1 Avoid using zlib, even if found +# +# +# 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_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 +# NO_SNDFILE=1 Avoid using libsndfile, even if found +# +# # Install options (provide on each `make install` invocation) # -# PREFIX (e.g.: PREFIX=$HOME/opt, default: PREFIX=/usr/local) -# DESTDIR (e.g.: DESTDIR=bin/dest, default: DESTDIR=) +# PREFIX (e.g.: PREFIX=$HOME/opt, default: PREFIX=/usr/local) +# DESTDIR (e.g.: DESTDIR=bin/dest, default: DESTDIR=) # # # Verbosity: @@ -211,9 +227,6 @@ LDLIBS_LIBOPENMPT += -lopenmpt endif -#CXXFLAGS += -mtune=generic -#CFLAGS += -mtune=generic - ifeq ($(HOST),unix) ifeq ($(shell help2man --version > /dev/null 2>&1 && echo yes ),yes) Modified: trunk/OpenMPT/libopenmpt/dox/dependencies.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/dependencies.md 2013-12-17 20:44:47 UTC (rev 3489) +++ trunk/OpenMPT/libopenmpt/dox/dependencies.md 2013-12-17 21:43:12 UTC (rev 3490) @@ -60,3 +60,7 @@ * **Win32** for WAVE * raw PCM has no external dependencies * **help2man** is required to build the documentation. + +### in_openmpt and xmp-openmpt + + * The **plugin configuration dialog** currently requires **Microsoft .NET Framework 4** on the user machine. Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-12-17 20:44:47 UTC (rev 3489) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-12-17 21:43:12 UTC (rev 3490) @@ -1045,7 +1045,7 @@ log << "Gain: " << flags.gain * 0.01f << " dB" << " "; log << "Stereo: " << flags.separation << " %" << " "; log << "Filter: " << flags.filtertaps << " taps" << " "; - log << "Ramping " << flags.ramping << " "; + log << "Ramping: " << flags.ramping << " "; log << std::endl; } if ( flags.show_details ) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-12-18 22:04:05
|
Revision: 3496 http://sourceforge.net/p/modplug/code/3496 Author: manxorist Date: 2013-12-18 22:03:54 +0000 (Wed, 18 Dec 2013) Log Message: ----------- [Ref] Test !NO_LOGGING instead if _DEBUG in typedefs.cpp for tracker logging code. This makes it easier to build release builds with logging enabled. [Ref] Log() OpenMPT startup so that the log file (if enabled) gets created in the current directory by default. Modified Paths: -------------- trunk/OpenMPT/common/typedefs.cpp trunk/OpenMPT/mptrack/Mptrack.cpp Modified: trunk/OpenMPT/common/typedefs.cpp =================================================================== --- trunk/OpenMPT/common/typedefs.cpp 2013-12-18 20:04:23 UTC (rev 3495) +++ trunk/OpenMPT/common/typedefs.cpp 2013-12-18 22:03:54 UTC (rev 3496) @@ -37,7 +37,7 @@ static const std::size_t LOGBUF_SIZE = 1024; -#if defined(MODPLUG_TRACKER) && defined(_DEBUG) +#if defined(MODPLUG_TRACKER) && !defined(NO_LOGGING) static uint64 GetTimeMS() @@ -93,7 +93,7 @@ static noinline void DoLog(const char *file, int line, const char *function, std::wstring message) //------------------------------------------------------------------------------------------------ { -#if !defined(MODPLUG_TRACKER) || (defined(MODPLUG_TRACKER) && defined(_DEBUG)) +#if !defined(MODPLUG_TRACKER) || (defined(MODPLUG_TRACKER) && !defined(NO_LOGGING)) if(!file) { file = "unknown"; @@ -146,7 +146,7 @@ static noinline void DoLog(const char *file, int line, const char *function, const char *format, va_list args) //------------------------------------------------------------------------------------------------------------ { -#if !defined(MODPLUG_TRACKER) || (defined(MODPLUG_TRACKER) && defined(_DEBUG)) +#if !defined(MODPLUG_TRACKER) || (defined(MODPLUG_TRACKER) && !defined(NO_LOGGING)) char message[LOGBUF_SIZE]; va_list va; va_copy(va, args); Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2013-12-18 20:04:23 UTC (rev 3495) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2013-12-18 22:03:54 UTC (rev 3496) @@ -779,6 +779,8 @@ // Start loading BeginWaitCursor(); + Log("OpenMPT Start"); + // Initialize Audio #ifdef ENABLE_ASM InitProcSupport(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-12-18 22:20:30
|
Revision: 3498 http://sourceforge.net/p/modplug/code/3498 Author: manxorist Date: 2013-12-18 22:20:24 +0000 (Wed, 18 Dec 2013) Log Message: ----------- [Fix] libopenmpt: Actually read artist information from module formats that store it (ams, dmf, gdm, mdl). [New] openmpt123: Display artist. Modified Paths: -------------- trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp trunk/OpenMPT/openmpt123/openmpt123.cpp trunk/OpenMPT/soundlib/Load_ams.cpp trunk/OpenMPT/soundlib/Load_dmf.cpp trunk/OpenMPT/soundlib/Load_gdm.cpp trunk/OpenMPT/soundlib/Load_mdl.cpp trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/Sndfile.h Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-12-18 22:13:57 UTC (rev 3497) +++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-12-18 22:20:24 UTC (rev 3498) @@ -657,6 +657,8 @@ return CSoundFile::ModContainerTypeToTracker( m_sndFile->GetContainerType() ); } else if ( key == std::string("tracker") ) { return m_sndFile->madeWithTracker; + } else if ( key == std::string("artist") ) { + return mod_string_to_utf8( m_sndFile->songArtist ); } else if ( key == std::string("title") ) { return mod_string_to_utf8( m_sndFile->GetTitle() ); } else if ( key == std::string("message") ) { Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-12-18 22:13:57 UTC (rev 3497) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-12-18 22:20:24 UTC (rev 3498) @@ -1233,6 +1233,7 @@ set_field( fields, "Container" ).ostream() << ( mod.get_metadata( "container" ).empty() ? std::string("none") : ( mod.get_metadata( "container" ) + " (" + mod.get_metadata( "container_long" ) + ")" ) ); set_field( fields, "Type" ).ostream() << mod.get_metadata( "type" ) << " (" << mod.get_metadata( "type_long" ) << ")"; set_field( fields, "Tracker" ).ostream() << mod.get_metadata( "tracker" ); + set_field( fields, "Artist" ).ostream() << mod.get_metadata( "artist" ); } if ( true ) { set_field( fields, "Title" ).ostream() << mod.get_metadata( "title" ); Modified: trunk/OpenMPT/soundlib/Load_ams.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_ams.cpp 2013-12-18 22:13:57 UTC (rev 3497) +++ trunk/OpenMPT/soundlib/Load_ams.cpp 2013-12-18 22:20:24 UTC (rev 3498) @@ -889,6 +889,7 @@ file.ReadString<mpt::String::spacePadded>(str, composerLength); str = mpt::To(mpt::CharsetCP437, mpt::CharsetCP437AMS2, str); songMessage.Read(str.c_str(), str.length(), SongMessage::leAutodetect); + songArtist = str; } // Channel names Modified: trunk/OpenMPT/soundlib/Load_dmf.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_dmf.cpp 2013-12-18 22:13:57 UTC (rev 3497) +++ trunk/OpenMPT/soundlib/Load_dmf.cpp 2013-12-18 22:20:24 UTC (rev 3498) @@ -974,6 +974,7 @@ InitializeGlobals(); mpt::String::Read<mpt::String::spacePadded>(songName, fileHeader.songname); + mpt::String::Read<mpt::String::spacePadded>(songArtist, fileHeader.composer); #ifdef MODPLUG_TRACKER if(GetpModDoc() != nullptr) Modified: trunk/OpenMPT/soundlib/Load_gdm.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_gdm.cpp 2013-12-18 22:13:57 UTC (rev 3497) +++ trunk/OpenMPT/soundlib/Load_gdm.cpp 2013-12-18 22:20:24 UTC (rev 3498) @@ -164,6 +164,9 @@ // Song name mpt::String::Read<mpt::String::maybeNullTerminated>(songName, fileHeader.songTitle); + // Artist name + mpt::String::Read<mpt::String::maybeNullTerminated>(songArtist, fileHeader.songMusician); + // Read channel pan map... 0...15 = channel panning, 16 = surround channel, 255 = channel does not exist m_nChannels = 32; for(CHANNELINDEX i = 0; i < 32; i++) Modified: trunk/OpenMPT/soundlib/Load_mdl.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_mdl.cpp 2013-12-18 22:13:57 UTC (rev 3497) +++ trunk/OpenMPT/soundlib/Load_mdl.cpp 2013-12-18 22:20:24 UTC (rev 3498) @@ -339,6 +339,7 @@ #endif pmib = (MDLInfoBlock *)(lpStream+dwMemPos); mpt::String::Read<mpt::String::maybeNullTerminated>(songName, pmib->songname); + mpt::String::Read<mpt::String::maybeNullTerminated>(songArtist, pmib->composer); norders = pmib->norders; if (norders > MAX_ORDERS) norders = MAX_ORDERS; Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2013-12-18 22:13:57 UTC (rev 3497) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2013-12-18 22:20:24 UTC (rev 3498) @@ -617,6 +617,7 @@ Patterns.ClearPatterns(); songName.clear(); + songArtist.clear(); songMessage.clear(); madeWithTracker.clear(); } @@ -923,6 +924,7 @@ Patterns.DestroyPatterns(); songName.clear(); + songArtist.clear(); songMessage.clear(); madeWithTracker.clear(); Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2013-12-18 22:13:57 UTC (rev 3497) +++ trunk/OpenMPT/soundlib/Sndfile.h 2013-12-18 22:20:24 UTC (rev 3498) @@ -425,6 +425,7 @@ public: std::string songName; + std::string songArtist; // Song message SongMessage songMessage; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-12-19 13:57:59
|
Revision: 3500 http://sourceforge.net/p/modplug/code/3500 Author: manxorist Date: 2013-12-19 13:57:47 +0000 (Thu, 19 Dec 2013) Log Message: ----------- [Ref] Move MakeGmTime back to misc_util.h . [Ref] Move FileHistory from CModDoc into CSoundFile. [New] libopenmpt: Add 'date' metadata for DMF and IT files. [Fix] xmp-openmpt: Set 'date' tag. [New] openmpt123: Display 'Date' and write tag via FLAC and libsndfile. [New] xmp-openmpt: Display Artist and Date in general info window. Modified Paths: -------------- trunk/OpenMPT/common/misc_util.cpp trunk/OpenMPT/common/misc_util.h trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp trunk/OpenMPT/mptrack/MPTrackUtil.cpp trunk/OpenMPT/mptrack/MPTrackUtil.h trunk/OpenMPT/mptrack/Moddoc.cpp trunk/OpenMPT/mptrack/Moddoc.h trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/mptrack/dlg_misc.cpp trunk/OpenMPT/openmpt123/openmpt123.cpp trunk/OpenMPT/openmpt123/openmpt123_flac.hpp trunk/OpenMPT/openmpt123/openmpt123_sndfile.hpp trunk/OpenMPT/soundlib/ITTools.cpp trunk/OpenMPT/soundlib/ITTools.h trunk/OpenMPT/soundlib/Load_dmf.cpp trunk/OpenMPT/soundlib/Load_it.cpp trunk/OpenMPT/soundlib/Sndfile.cpp trunk/OpenMPT/soundlib/Sndfile.h trunk/OpenMPT/test/test.cpp Modified: trunk/OpenMPT/common/misc_util.cpp =================================================================== --- trunk/OpenMPT/common/misc_util.cpp 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/common/misc_util.cpp 2013-12-19 13:57:47 UTC (rev 3500) @@ -15,7 +15,9 @@ #include <sstream> #include <string> +#include <time.h> + template<typename T> inline T ConvertStrToHelper(const std::string &str) { @@ -79,6 +81,47 @@ long double ConvertStrToLongDouble(const std::wstring &str) { return ConvertStrToHelper<long double>(str); } +namespace Util +{ + +time_t Util::MakeGmTime(tm *timeUtc) +//---------------------------------- +{ + #if MPT_COMPILER_MSVC + return _mkgmtime(timeUtc); + #else // !MPT_COMPILER_MSVC + // There is no portable way in C/C++ to convert between time_t and struct tm in UTC. + // Approximate it as good as possible without implementing full date handling logic. + // NOTE: + // This can be wrong for dates during DST switch. + if(!timeUtc) + { + return time_t(); + } + tm t = *timeUtc; + time_t localSinceEpoch = mktime(&t); + const tm * tmpLocal = localtime(&localSinceEpoch); + if(!tmpLocal) + { + return localSinceEpoch; + } + tm localTM = *tmpLocal; + const tm * tmpUTC = gmtime(&localSinceEpoch); + if(!tmpUTC) + { + return localSinceEpoch; + } + tm utcTM = *tmpUTC; + double offset = difftime(mktime(&localTM), mktime(&utcTM)); + double timeScaleFactor = difftime(2, 1); + time_t utcSinceEpoch = localSinceEpoch + Util::Round<time_t>(offset / timeScaleFactor); + return utcSinceEpoch; + #endif // MPT_COMPILER_MSVC +} + +} // namespace Util + + #ifdef MODPLUG_TRACKER namespace Util Modified: trunk/OpenMPT/common/misc_util.h =================================================================== --- trunk/OpenMPT/common/misc_util.h 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/common/misc_util.h 2013-12-19 13:57:47 UTC (rev 3500) @@ -18,6 +18,7 @@ #include <cstdlib> #include <string.h> +#include <time.h> #include "typedefs.h" @@ -402,6 +403,8 @@ namespace Util { + time_t MakeGmTime(tm *timeUtc); + // Minimum of 3 values template <class T> inline const T& Min(const T& a, const T& b, const T& c) {return std::min(std::min(a, b), c);} Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-12-19 13:57:47 UTC (rev 3500) @@ -642,6 +642,7 @@ retval.push_back("tracker"); retval.push_back("artist"); retval.push_back("title"); + retval.push_back("date"); retval.push_back("message"); retval.push_back("warnings"); return retval; @@ -661,6 +662,11 @@ return mod_string_to_utf8( m_sndFile->songArtist ); } else if ( key == std::string("title") ) { return mod_string_to_utf8( m_sndFile->GetTitle() ); + } else if ( key == std::string("date") ) { + if ( m_sndFile->GetFileHistory().empty() ) { + return std::string(); + } + return mod_string_to_utf8( m_sndFile->GetFileHistory()[m_sndFile->GetFileHistory().size() - 1].AsISO8601() ); } else if ( key == std::string("message") ) { std::string retval = m_sndFile->songMessage.GetFormatted( SongMessage::leLF ); if ( retval.empty() ) { Modified: trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp 2013-12-19 13:57:47 UTC (rev 3500) @@ -454,7 +454,7 @@ write_xmplay_tag( &tags[0], convert_to_native( mod.get_metadata("title") ) ); write_xmplay_tag( &tags[1], convert_to_native( mod.get_metadata("artist") ) ); write_xmplay_tag( &tags[2], convert_to_native( mod.get_metadata("xmplay-album") ) ); // todo, libopenmpt does not support that - write_xmplay_tag( &tags[3], convert_to_native( mod.get_metadata("xmplay-date") ) ); // todo, libopenmpt does not support that + write_xmplay_tag( &tags[3], convert_to_native( mod.get_metadata("date") ) ); write_xmplay_tag( &tags[4], convert_to_native( mod.get_metadata("xmplay-tracknumber") ) ); // todo, libopenmpt does not support that write_xmplay_tag( &tags[5], convert_to_native( mod.get_metadata("xmplay-genre") ) ); // todo, libopenmpt does not support that write_xmplay_tag( &tags[6], convert_to_native( mod.get_metadata("message") ) ); @@ -739,6 +739,18 @@ str << "\r" << "Format" << "\t" << sanitize_xmplay_info_string( self->mod->get_metadata("type") ) << " (" << sanitize_xmplay_info_string( self->mod->get_metadata("type_long") ) << ")" << "\r"; + bool metadatainfo = false; + if ( !self->mod->get_metadata("artist").empty() ) { + metadatainfo = true; + str << "Artist" << "\t" << sanitize_xmplay_info_string( self->mod->get_metadata("artist") ) << "\r"; + } + if ( !self->mod->get_metadata("date").empty() ) { + metadatainfo = true; + str << "Date" << "\t" << sanitize_xmplay_info_string( self->mod->get_metadata("date") ) << "\r"; + } + if ( metadatainfo ) { + str << "\r"; + } if ( !self->mod->get_metadata("container").empty() ) { str << "Container" << "\t" << sanitize_xmplay_info_string( self->mod->get_metadata("container") ) << " (" << sanitize_xmplay_info_string( self->mod->get_metadata("container_long") ) << ")" << "\r"; } Modified: trunk/OpenMPT/mptrack/MPTrackUtil.cpp =================================================================== --- trunk/OpenMPT/mptrack/MPTrackUtil.cpp 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/mptrack/MPTrackUtil.cpp 2013-12-19 13:57:47 UTC (rev 3500) @@ -65,12 +65,6 @@ } -time_t Util::sdTime::MakeGmTime(tm& timeUtc) -{ - return _mkgmtime(&timeUtc); -} - - bool Util::sdOs::IsPathFileAvailable(const mpt::PathString &pszFilePath, FileMode fm) { return (_waccess(pszFilePath.AsNative().c_str(), fm) == 0); Modified: trunk/OpenMPT/mptrack/MPTrackUtil.h =================================================================== --- trunk/OpenMPT/mptrack/MPTrackUtil.h 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/mptrack/MPTrackUtil.h 2013-12-19 13:57:47 UTC (rev 3500) @@ -12,20 +12,12 @@ #include <string> -#include <time.h> LPCCH LoadResource(LPCTSTR lpName, LPCTSTR lpType, LPCCH& pData, size_t& nSize, HGLOBAL& hglob); std::string GetErrorMessage(DWORD nErrorCode); -namespace Util { namespace sdTime -{ - - time_t MakeGmTime(tm& timeUtc); - -}} // namespace Util::sdTime - namespace Util { namespace sdOs { /// Checks whether file or folder exists and whether it has the given mode. Modified: trunk/OpenMPT/mptrack/Moddoc.cpp =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.cpp 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/mptrack/Moddoc.cpp 2013-12-19 13:57:47 UTC (rev 3500) @@ -140,7 +140,6 @@ // Set the creation date of this file (or the load time if we're loading an existing file) time(&m_creationTime); - m_FileHistory.clear(); m_bsInstrumentModified.reset(); Modified: trunk/OpenMPT/mptrack/Moddoc.h =================================================================== --- trunk/OpenMPT/mptrack/Moddoc.h 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/mptrack/Moddoc.h 2013-12-19 13:57:47 UTC (rev 3500) @@ -94,21 +94,6 @@ ///////////////////////////////////////////////////////////////////////// -// File edit history - -#define HISTORY_TIMER_PRECISION 18.2f - -//================ -struct FileHistory -//================ -{ - // Date when the file was loaded in the the tracker or created. - tm loadDate; - // Time the file was open in the editor, in 1/18.2th seconds (frequency of a standard DOS timer, to keep compatibility with Impulse Tracker easy). - uint32 openTime; -}; - -///////////////////////////////////////////////////////////////////////// // Split Keyboard Settings (pattern editor) //========================== @@ -193,7 +178,6 @@ CPatternUndo m_PatternUndo; CSampleUndo m_SampleUndo; SplitKeyboardSettings m_SplitKeyboardSettings; // this is maybe not the best place to keep them, but it should do the job - std::vector<FileHistory> m_FileHistory; // File edit history time_t m_creationTime; bool bModifiedAutosave; // Modified since last autosave? @@ -265,8 +249,6 @@ CSampleUndo &GetSampleUndo() { return m_SampleUndo; } SplitKeyboardSettings &GetSplitKeyboardSettings() { return m_SplitKeyboardSettings; } - std::vector<FileHistory> &GetFileHistory() { return m_FileHistory; } - const std::vector<FileHistory> &GetFileHistory() const { return m_FileHistory; } time_t GetCreationTime() const { return m_creationTime; } // operations Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-12-19 13:57:47 UTC (rev 3500) @@ -288,7 +288,7 @@ lastUpdate.tm_year -= 1900; lastUpdate.tm_mon--; } - time_t outTime = Util::sdTime::MakeGmTime(lastUpdate); + time_t outTime = Util::MakeGmTime(&lastUpdate); if(outTime < 0) outTime = 0; CUpdateCheck::SetUpdateSettings ( Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp =================================================================== --- trunk/OpenMPT/mptrack/dlg_misc.cpp 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2013-12-19 13:57:47 UTC (rev 3500) @@ -1065,11 +1065,11 @@ CString s; uint64 totalTime = 0; - const size_t num = m_pModDoc->GetFileHistory().size(); + const size_t num = m_pModDoc->GetrSoundFile().GetFileHistory().size(); for(size_t n = 0; n < num; n++) { - const FileHistory *hist = &(m_pModDoc->GetFileHistory().at(n)); + const FileHistory *hist = &(m_pModDoc->GetrSoundFile().GetFileHistory().at(n)); totalTime += hist->openTime; // Date @@ -1099,7 +1099,7 @@ SetWindowText(s); } // Enable or disable Clear button - GetDlgItem(IDC_BTN_CLEAR)->EnableWindow((m_pModDoc->GetFileHistory().empty()) ? FALSE : TRUE); + GetDlgItem(IDC_BTN_CLEAR)->EnableWindow((m_pModDoc->GetrSoundFile().GetFileHistory().empty()) ? FALSE : TRUE); return TRUE; @@ -1109,9 +1109,9 @@ void CEditHistoryDlg::OnClearHistory() //------------------------------------ { - if(m_pModDoc != nullptr && !m_pModDoc->GetFileHistory().empty()) + if(m_pModDoc != nullptr && !m_pModDoc->GetrSoundFile().GetFileHistory().empty()) { - m_pModDoc->GetFileHistory().clear(); + m_pModDoc->GetrSoundFile().GetFileHistory().clear(); m_pModDoc->SetModified(); OnInitDialog(); } Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-12-19 13:57:47 UTC (rev 3500) @@ -1233,6 +1233,7 @@ set_field( fields, "Container" ).ostream() << ( mod.get_metadata( "container" ).empty() ? std::string("none") : ( mod.get_metadata( "container" ) + " (" + mod.get_metadata( "container_long" ) + ")" ) ); set_field( fields, "Type" ).ostream() << mod.get_metadata( "type" ) << " (" << mod.get_metadata( "type_long" ) << ")"; set_field( fields, "Tracker" ).ostream() << mod.get_metadata( "tracker" ); + set_field( fields, "Date" ).ostream() << mod.get_metadata( "date" ); set_field( fields, "Artist" ).ostream() << mod.get_metadata( "artist" ); } if ( true ) { Modified: trunk/OpenMPT/openmpt123/openmpt123_flac.hpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123_flac.hpp 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/openmpt123/openmpt123_flac.hpp 2013-12-19 13:57:47 UTC (rev 3500) @@ -67,6 +67,7 @@ tags.clear(); tags.push_back( std::make_pair( "TITLE", metadata[ "title" ] ) ); tags.push_back( std::make_pair( "ARTIST", metadata[ "artist" ] ) ); + tags.push_back( std::make_pair( "DATE", metadata[ "date" ] ) ); tags.push_back( std::make_pair( "COMMENT", metadata[ "message" ] ) ); if ( !metadata[ "type" ].empty() && !metadata[ "tracker" ].empty() ) { tags.push_back( std::make_pair( "SOURCEMEDIA", std::string() + "'" + metadata[ "type" ] + "' tracked music file, made with '" + metadata[ "tracker" ] + "', rendered with '" + get_encoder_tag() + "'" ) ); Modified: trunk/OpenMPT/openmpt123/openmpt123_sndfile.hpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123_sndfile.hpp 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/openmpt123/openmpt123_sndfile.hpp 2013-12-19 13:57:47 UTC (rev 3500) @@ -177,6 +177,7 @@ void write_metadata( std::map<std::string,std::string> metadata ) { write_metadata_field( SF_STR_TITLE, metadata[ "title" ] ); write_metadata_field( SF_STR_ARTIST, metadata[ "artist" ] ); + write_metadata_field( SF_STR_DATE, metadata[ "date" ] ); write_metadata_field( SF_STR_COMMENT, metadata[ "message" ] ); write_metadata_field( SF_STR_SOFTWARE, append_software_tag( metadata[ "tracker" ] ) ); } Modified: trunk/OpenMPT/soundlib/ITTools.cpp =================================================================== --- trunk/OpenMPT/soundlib/ITTools.cpp 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/soundlib/ITTools.cpp 2013-12-19 13:57:47 UTC (rev 3500) @@ -641,10 +641,6 @@ } -#ifdef MODPLUG_TRACKER - -#include "../mptrack/Moddoc.h" - // Convert all multi-byte numeric values to current platform's endianness or vice versa. void ITHistoryStruct::ConvertEndianness() //--------------------------------------- @@ -680,5 +676,3 @@ fattime = static_cast<uint16>((mptHistory.loadDate.tm_sec / 2) | (mptHistory.loadDate.tm_min << 5) | (mptHistory.loadDate.tm_hour << 11)); runtime = static_cast<uint32>(mptHistory.openTime * (18.2f / HISTORY_TIMER_PRECISION)); } - -#endif // MODPLUG_TRACKER Modified: trunk/OpenMPT/soundlib/ITTools.h =================================================================== --- trunk/OpenMPT/soundlib/ITTools.h 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/soundlib/ITTools.h 2013-12-19 13:57:47 UTC (rev 3500) @@ -297,9 +297,7 @@ STATIC_ASSERT(sizeof(ITSample) == 80); -#ifdef MODPLUG_TRACKER struct FileHistory; -#endif // MODPLUG_TRACKER // IT Header extension: Save history struct PACKED ITHistoryStruct @@ -308,8 +306,6 @@ uint16 fattime; // DOS / FAT time when the file was opened / created in the editor. uint32 runtime; // The time how long the file was open in the editor, in 1/18.2th seconds. (= ticks of the DOS timer) -#ifdef MODPLUG_TRACKER - // Convert all multi-byte numeric values to current platform's endianness or vice versa. void ConvertEndianness(); @@ -318,8 +314,6 @@ // Convert OpenMPT's internal edit history representation to an ITHistoryStruct void ConvertToIT(const FileHistory &mptHistory); -#endif // MODPLUG_TRACKER - }; STATIC_ASSERT(sizeof(ITHistoryStruct) == 8); Modified: trunk/OpenMPT/soundlib/Load_dmf.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_dmf.cpp 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/soundlib/Load_dmf.cpp 2013-12-19 13:57:47 UTC (rev 3500) @@ -976,18 +976,13 @@ mpt::String::Read<mpt::String::spacePadded>(songName, fileHeader.songname); mpt::String::Read<mpt::String::spacePadded>(songArtist, fileHeader.composer); -#ifdef MODPLUG_TRACKER - if(GetpModDoc() != nullptr) - { - FileHistory mptHistory; - MemsetZero(mptHistory); - mptHistory.loadDate.tm_mday = Clamp(fileHeader.creationDay, uint8(0), uint8(31)); - mptHistory.loadDate.tm_mon = Clamp(fileHeader.creationMonth, uint8(1), uint8(12)) - 1; - mptHistory.loadDate.tm_year = fileHeader.creationYear; - GetpModDoc()->GetFileHistory().clear(); - GetpModDoc()->GetFileHistory().push_back(mptHistory); - } -#endif // MODPLUG_TRACKER + FileHistory mptHistory; + MemsetZero(mptHistory); + mptHistory.loadDate.tm_mday = Clamp(fileHeader.creationDay, uint8(0), uint8(31)); + mptHistory.loadDate.tm_mon = Clamp(fileHeader.creationMonth, uint8(1), uint8(12)) - 1; + mptHistory.loadDate.tm_year = fileHeader.creationYear; + m_FileHistory.clear(); + m_FileHistory.push_back(mptHistory); // Go through all chunks now ChunkReader chunkFile(file); Modified: trunk/OpenMPT/soundlib/Load_it.cpp =================================================================== --- trunk/OpenMPT/soundlib/Load_it.cpp 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/soundlib/Load_it.cpp 2013-12-19 13:57:47 UTC (rev 3500) @@ -530,22 +530,14 @@ if(file.CanRead(nflt * sizeof(ITHistoryStruct)) && file.GetPosition() + nflt * sizeof(ITHistoryStruct) <= minPtr) { -#ifdef MODPLUG_TRACKER - if(GetpModDoc() != nullptr) + m_FileHistory.reserve(nflt); + for(size_t n = 0; n < nflt; n++) { - GetpModDoc()->GetFileHistory().reserve(nflt); - for(size_t n = 0; n < nflt; n++) - { - FileHistory mptHistory; - ITHistoryStruct itHistory; - file.Read(itHistory); - itHistory.ConvertToMPT(mptHistory); - GetpModDoc()->GetFileHistory().push_back(mptHistory); - } - } else -#endif // MODPLUG_TRACKER - { - file.Skip(nflt * sizeof(ITHistoryStruct)); + FileHistory mptHistory; + ITHistoryStruct itHistory; + file.Read(itHistory); + itHistory.ConvertToMPT(mptHistory); + m_FileHistory.push_back(mptHistory); } } else { @@ -1057,12 +1049,10 @@ uint32 SaveITEditHistory(const CSoundFile *pSndFile, FILE *f) //----------------------------------------------------------- { + size_t num = pSndFile->GetFileHistory().size(); #ifdef MODPLUG_TRACKER CModDoc *pModDoc = pSndFile->GetpModDoc(); - const size_t num = (pModDoc != nullptr) ? pModDoc->GetFileHistory().size() + 1 : 0; // + 1 for this session -#else - const size_t num = 0; - MPT_UNREFERENCED_PARAMETER(pSndFile); + num += (pModDoc != nullptr) ? 1 : 0; // + 1 for this session #endif // MODPLUG_TRACKER uint16 fnum = (uint16)MIN(num, uint16_max); // Number of entries that are actually going to be written @@ -1075,17 +1065,19 @@ SwapBytesLE(fnum); fwrite(&fnum, 2, 1, f); -#ifdef MODPLUG_TRACKER // Write history data const size_t start = (num > uint16_max) ? num - uint16_max : 0; for(size_t n = start; n < num; n++) { FileHistory mptHistory; - if(n < num - 1) +#ifdef MODPLUG_TRACKER + if(n < pSndFile->GetFileHistory().size()) +#endif // MODPLUG_TRACKER { // Previous timestamps - mptHistory = pModDoc->GetFileHistory().at(n); + mptHistory = pSndFile->GetFileHistory().at(n); +#ifdef MODPLUG_TRACKER } else { // Current ("new") timestamp @@ -1100,6 +1092,7 @@ pSndFile->AddToLog("localtime() returned nullptr."); mptHistory.openTime = (uint32)(difftime(time(nullptr), creationTime) * (double)HISTORY_TIMER_PRECISION); +#endif // MODPLUG_TRACKER } ITHistoryStruct itHistory; @@ -1107,7 +1100,6 @@ fwrite(&itHistory, 1, sizeof(itHistory), f); } -#endif // MODPLUG_TRACKER return bytes_written; } Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2013-12-19 13:57:47 UTC (rev 3500) @@ -23,6 +23,7 @@ #include "../common/StringFixer.h" #include "FileReader.h" #include <iostream> +#include <time.h> #ifndef NO_ARCHIVE_SUPPORT #include "../unarchiver/unarchiver.h" @@ -484,6 +485,74 @@ // -! NEW_FEATURE#0027 +std::string FileHistory::AsISO8601() const +//---------------------------------------- +{ + tm date = loadDate; + if(openTime > 0) + { + // Calculate the date when editing finished. + double openSeconds = (double)openTime / (double)HISTORY_TIMER_PRECISION; + tm tmpLoadDate = loadDate; + time_t loadDateSinceEpoch = Util::MakeGmTime(&tmpLoadDate); + double timeScaleFactor = difftime(2, 1); + time_t saveDateSinceEpoch = loadDateSinceEpoch + Util::Round<time_t>(openSeconds / timeScaleFactor); + const tm * tmpSaveDate = gmtime(&saveDateSinceEpoch); + if(tmpSaveDate) + { + date = *tmpSaveDate; + } + } + // We assume date in UTC here. + // This is not 100% correct because FileHistory does not contain complete timezone information. + // There are too many differences in supported format specifiers in strftime() + // and strftime does not support reduced precision ISO8601 at all. + // Just do the formatting ourselves. + std::string result; + std::string timezone = std::string("Z"); + if(date.tm_year == 0) + { + return result; + } + result += mpt::fmt::dec0<4>(date.tm_year + 1900); + if(date.tm_mon < 0 || date.tm_mon > 11) + { + return result; + } + result += std::string("-") + mpt::fmt::dec0<2>(date.tm_mon + 1); + if(date.tm_mday < 1 || date.tm_mday > 31) + { + return result; + } + result += std::string("-") + mpt::fmt::dec0<2>(date.tm_mday); + if(date.tm_hour == 0 && date.tm_min == 0 && date.tm_sec == 0) + { + return result; + } + if(date.tm_hour < 0 || date.tm_hour > 23) + { + return result; + } + if(date.tm_min < 0 || date.tm_min > 59) + { + return result; + } + result += std::string("T"); + if(date.tm_isdst > 0) + { + timezone = std::string("+01:00"); + } + result += mpt::fmt::dec0<2>(date.tm_hour) + std::string(":") + mpt::fmt::dec0<2>(date.tm_min); + if(date.tm_sec < 0 || date.tm_sec > 61) + { + return result + timezone; + } + result += std::string(":") + mpt::fmt::dec0<2>(date.tm_sec); + result += timezone; + return result; +} + + ////////////////////////////////////////////////////////// // CSoundFile @@ -620,6 +689,7 @@ songArtist.clear(); songMessage.clear(); madeWithTracker.clear(); + m_FileHistory.clear(); } @@ -927,6 +997,7 @@ songArtist.clear(); songMessage.clear(); madeWithTracker.clear(); + m_FileHistory.clear(); for(SAMPLEINDEX i = 1; i < MAX_SAMPLES; i++) { Modified: trunk/OpenMPT/soundlib/Sndfile.h =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.h 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/soundlib/Sndfile.h 2013-12-19 13:57:47 UTC (rev 3500) @@ -195,6 +195,24 @@ #endif // MODPLUG_TRACKER +///////////////////////////////////////////////////////////////////////// +// File edit history + +#define HISTORY_TIMER_PRECISION 18.2f + +//================ +struct FileHistory +//================ +{ + // Date when the file was loaded in the the tracker or created. + tm loadDate; + // Time the file was open in the editor, in 1/18.2th seconds (frequency of a standard DOS timer, to keep compatibility with Impulse Tracker easy). + uint32 openTime; + // Return the date as a (possibly truncated if not enough precision is available) ISO 8601 formatted date. + std::string AsISO8601() const; +}; + + struct TimingInfo { double InputLatency; // seconds @@ -431,6 +449,12 @@ SongMessage songMessage; std::string madeWithTracker; +protected: + std::vector<FileHistory> m_FileHistory; // File edit history +public: + std::vector<FileHistory> &GetFileHistory() { return m_FileHistory; } + const std::vector<FileHistory> &GetFileHistory() const { return m_FileHistory; } + #ifdef MODPLUG_TRACKER // -> CODE#0023 // -> DESC="IT project files (.itp)" Modified: trunk/OpenMPT/test/test.cpp =================================================================== --- trunk/OpenMPT/test/test.cpp 2013-12-19 10:41:47 UTC (rev 3499) +++ trunk/OpenMPT/test/test.cpp 2013-12-19 13:57:47 UTC (rev 3500) @@ -1168,9 +1168,6 @@ void TestLoadMPTMFile(const CSoundFile &sndFile) //---------------------------------------------- { -#ifdef MODPLUG_TRACKER - const CModDoc *pModDoc = sndFile.GetpModDoc(); -#endif // MODPLUG_TRACKER // Global Variables VERIFY_EQUAL_NONCONT(sndFile.GetTitle(), "Test Module_____________X"); @@ -1192,10 +1189,9 @@ VERIFY_EQUAL_NONCONT(sndFile.m_dwCreatedWithVersion, MAKE_VERSION_NUMERIC(1, 19, 02, 05)); VERIFY_EQUAL_NONCONT(sndFile.m_nRestartPos, 1); -#ifdef MODPLUG_TRACKER // Edit history - VERIFY_EQUAL_NONCONT(pModDoc->GetFileHistory().size() > 0, true); - const FileHistory &fh = pModDoc->GetFileHistory().at(0); + VERIFY_EQUAL_NONCONT(sndFile.GetFileHistory().size() > 0, true); + const FileHistory &fh = sndFile.GetFileHistory().at(0); VERIFY_EQUAL_NONCONT(fh.loadDate.tm_year, 111); VERIFY_EQUAL_NONCONT(fh.loadDate.tm_mon, 5); VERIFY_EQUAL_NONCONT(fh.loadDate.tm_mday, 14); @@ -1203,7 +1199,6 @@ VERIFY_EQUAL_NONCONT(fh.loadDate.tm_min, 8); VERIFY_EQUAL_NONCONT(fh.loadDate.tm_sec, 32); VERIFY_EQUAL_NONCONT((uint32)((double)fh.openTime / HISTORY_TIMER_PRECISION), 31); -#endif // MODPLUG_TRACKER // Macros VERIFY_EQUAL_NONCONT(sndFile.m_MidiCfg.GetParameteredMacroType(0), sfx_reso); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2013-12-19 18:30:02
|
Revision: 3507 http://sourceforge.net/p/modplug/code/3507 Author: saga-games Date: 2013-12-19 18:29:51 +0000 (Thu, 19 Dec 2013) Log Message: ----------- [Fix] XM: Support F00 "stop song" behaviour (it actually just sets the ticks/row to 65536 in FT2, so we can emulate that easily) [Mod] OpenMPT: Version is now 1.22.07.09 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/soundlib/Snd_fx.cpp trunk/OpenMPT/soundlib/Sndfile.cpp Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2013-12-19 18:23:14 UTC (rev 3506) +++ trunk/OpenMPT/common/versionNumber.h 2013-12-19 18:29:51 UTC (rev 3507) @@ -17,7 +17,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 22 #define VER_MINOR 07 -#define VER_MINORMINOR 08 +#define VER_MINORMINOR 09 //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/soundlib/Snd_fx.cpp =================================================================== --- trunk/OpenMPT/soundlib/Snd_fx.cpp 2013-12-19 18:23:14 UTC (rev 3506) +++ trunk/OpenMPT/soundlib/Snd_fx.cpp 2013-12-19 18:29:51 UTC (rev 3507) @@ -306,6 +306,14 @@ break; // Set Speed case CMD_SPEED: +#ifdef MODPLUG_TRACKER + // FT2 appears to be decrementing the tick count before checking for zero, + // so it effectively counts down 65536 ticks with speed = 0 (song speed is a 16-bit variable in FT2) + if(GetType() == MOD_TYPE_XM && !param) + { + memory.musicSpeed = uint16_max; + } +#endif // MODPLUG_TRACKER if (!param) break; // Allow high speed values here for VBlank MODs. (Maybe it would be better to have a "VBlank MOD" flag somewhere? Is it worth the effort?) if ((param <= GetModSpecifications().speedMax) || GetType() == MOD_TYPE_MOD) @@ -4482,6 +4490,15 @@ void CSoundFile::SetSpeed(UINT param) //----------------------------------- { +#ifdef MODPLUG_TRACKER + // FT2 appears to be decrementing the tick count before checking for zero, + // so it effectively counts down 65536 ticks with speed = 0 (song speed is a 16-bit variable in FT2) + if(GetType() == MOD_TYPE_XM && !param) + { + m_nMusicSpeed = uint16_max; + } +#endif // MODPLUG_TRACKER + // Allow high speed values here for VBlank MODs. (Maybe it would be better to have a "VBlank MOD" flag somewhere? Is it worth the effort?) if ((param) && (param <= GetModSpecifications().speedMax || (GetType() & MOD_TYPE_MOD))) m_nMusicSpeed = param; } Modified: trunk/OpenMPT/soundlib/Sndfile.cpp =================================================================== --- trunk/OpenMPT/soundlib/Sndfile.cpp 2013-12-19 18:23:14 UTC (rev 3506) +++ trunk/OpenMPT/soundlib/Sndfile.cpp 2013-12-19 18:29:51 UTC (rev 3507) @@ -2330,6 +2330,12 @@ const uint16 param = static_cast<uint16>(m.param) + static_cast<uint16>(m.vol << 4); m.param = mpt::saturate_cast<uint8>(param); } + + if(sndFile.m_dwLastSavedWithVersion < MAKE_VERSION_NUMERIC(1, 22, 07, 09) && m.command == CMD_SPEED && m.param == 0) + { + // OpenMPT can emulate FT2's F00 behaviour now. + m.command = CMD_NONE; + } } chn++; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-12-21 11:30:33
|
Revision: 3514 http://sourceforge.net/p/modplug/code/3514 Author: manxorist Date: 2013-12-21 11:30:26 +0000 (Sat, 21 Dec 2013) Log Message: ----------- [Imp] libopenmpt build: Add OPTIMIZE= make option (defaults to 1). Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/build/make/Makefile.config.clang trunk/OpenMPT/build/make/Makefile.config.defaults trunk/OpenMPT/build/make/Makefile.config.mingw64-win32 trunk/OpenMPT/build/make/Makefile.config.mingw64-win64 Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2013-12-21 11:00:35 UTC (rev 3513) +++ trunk/OpenMPT/Makefile 2013-12-21 11:30:26 UTC (rev 3514) @@ -20,12 +20,17 @@ # See below and in `build/make/` for details. # # -# Compiler options (provide on each `make` invocation): +# Compiler options (environment variables): # +# CC +# CXX +# LD +# AR # CPPFLAGS # CXXFLAGS # CFLAGS # LDFLAGS +# LDLIBS # ARFLAGS # # @@ -38,6 +43,8 @@ # OPENMPT123=1 Build openmpt123 # SHARED_SONAME=1 Set SONAME of shared library # TEST=0 Build libopenmpt in test mode +# DEBUG=0 Build debug binaries without optimization and with symbols +# OPTIMIZE=1 Build optimized binaries # # # Build flags for libopenmpt (provide on each `make` invocation) @@ -115,6 +122,8 @@ EXAMPLES=1 OPENMPT123=1 SHARED_SONAME=1 +DEBUG=0 +OPTIMIZE=1 # get commandline or defaults @@ -210,10 +219,12 @@ CXXFLAGS += -O0 -g CFLAGS += -O0 -g else +ifeq ($(OPTIMIZE),1) # should be -O3, but current stable GCC (4.8.2) mis-analyzes code with -O3 CXXFLAGS += -O2 -fno-strict-aliasing -ffast-math CFLAGS += -O2 -fno-strict-aliasing -ffast-math endif +endif ifeq ($(TEST),1) CPPFLAGS += -DLIBOPENMPT_BUILD_TEST Modified: trunk/OpenMPT/build/make/Makefile.config.clang =================================================================== --- trunk/OpenMPT/build/make/Makefile.config.clang 2013-12-21 11:00:35 UTC (rev 3513) +++ trunk/OpenMPT/build/make/Makefile.config.clang 2013-12-21 11:30:26 UTC (rev 3514) @@ -1,8 +1,8 @@ -CC = clang -CXX = clang++ -LD = clang++ -AR = ar +CC ?= clang +CXX ?= clang++ +LD ?= clang++ +AR ?= ar #CPPFLAGS += -DMPT_COMPILER_GENERIC CPPFLAGS += Modified: trunk/OpenMPT/build/make/Makefile.config.defaults =================================================================== --- trunk/OpenMPT/build/make/Makefile.config.defaults 2013-12-21 11:00:35 UTC (rev 3513) +++ trunk/OpenMPT/build/make/Makefile.config.defaults 2013-12-21 11:30:26 UTC (rev 3514) @@ -1,8 +1,8 @@ -CC = gcc -CXX = g++ -LD = g++ -AR = ar +CC ?= gcc +CXX ?= g++ +LD ?= g++ +AR ?= ar #CPPFLAGS += -DMPT_COMPILER_GENERIC CPPFLAGS += Modified: trunk/OpenMPT/build/make/Makefile.config.mingw64-win32 =================================================================== --- trunk/OpenMPT/build/make/Makefile.config.mingw64-win32 2013-12-21 11:00:35 UTC (rev 3513) +++ trunk/OpenMPT/build/make/Makefile.config.mingw64-win32 2013-12-21 11:30:26 UTC (rev 3514) @@ -1,8 +1,8 @@ -CC = i686-w64-mingw32-gcc -CXX = i686-w64-mingw32-g++ -LD = i686-w64-mingw32-g++ -AR = i686-w64-mingw32-ar +CC ?= i686-w64-mingw32-gcc +CXX ?= i686-w64-mingw32-g++ +LD ?= i686-w64-mingw32-g++ +AR ?= i686-w64-mingw32-ar CPPFLAGS += -DWIN32 -D_WIN32 CXXFLAGS += -std=c++0x -municode -mconsole Modified: trunk/OpenMPT/build/make/Makefile.config.mingw64-win64 =================================================================== --- trunk/OpenMPT/build/make/Makefile.config.mingw64-win64 2013-12-21 11:00:35 UTC (rev 3513) +++ trunk/OpenMPT/build/make/Makefile.config.mingw64-win64 2013-12-21 11:30:26 UTC (rev 3514) @@ -1,8 +1,8 @@ -CC = x86_64-w64-mingw32-gcc -CXX = x86_64-w64-mingw32-g++ -LD = x86_64-w64-mingw32-g++ -AR = x86_64-w64-mingw32-ar +CC ?= x86_64-w64-mingw32-gcc +CXX ?= x86_64-w64-mingw32-g++ +LD ?= x86_64-w64-mingw32-g++ +AR ?= x86_64-w64-mingw32-ar CPPFLAGS += -DWIN32 -D_WIN32 -DWIN64 -D_WIN64 CXXFLAGS += -std=c++0x -municode -mconsole This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2013-12-23 22:56:26
|
Revision: 3521 http://sourceforge.net/p/modplug/code/3521 Author: saga-games Date: 2013-12-23 22:56:18 +0000 (Mon, 23 Dec 2013) Log Message: ----------- [Imp] Re-implement MRU list without MFC. This adds support for unicode paths and will hopefully get rid of the idiosyncratic behaviour that MFC's MRU list shows in some cases... [Imp] Change minimum width of help text in status bar a bit so that everything fits on the screen at 1024x768 (http://bugs.openmpt.org/view.php?id=458). Modified Paths: -------------- trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/Mainfrm.h trunk/OpenMPT/mptrack/Mptrack.cpp trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/mptrack/TrackerSettings.h trunk/OpenMPT/mptrack/mptrack.rc trunk/OpenMPT/mptrack/resource.h trunk/OpenMPT/soundlib/plugins/PluginManager.cpp Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2013-12-23 22:11:54 UTC (rev 3520) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2013-12-23 22:56:18 UTC (rev 3521) @@ -89,7 +89,6 @@ ON_UPDATE_COMMAND_UI(ID_INDICATOR_USER, OnUpdateUser) ON_UPDATE_COMMAND_UI(ID_INDICATOR_INFO, OnUpdateInfo) ON_UPDATE_COMMAND_UI(ID_INDICATOR_XINFO,OnUpdateXInfo) //rewbs.xinfo - ON_UPDATE_COMMAND_UI(ID_INDICATOR_CPU, OnUpdateCPU) ON_UPDATE_COMMAND_UI(IDD_TREEVIEW, OnUpdateControlBarMenu) ON_MESSAGE(WM_MOD_UPDATEPOSITION, OnUpdatePosition) ON_MESSAGE(WM_MOD_INVALIDATEPATTERNS, OnInvalidatePatterns) @@ -98,6 +97,9 @@ ON_COMMAND(ID_INTERNETUPDATE, OnInternetUpdate) ON_COMMAND(ID_HELP_SHOWSETTINGSFOLDER, OnShowSettingsFolder) ON_COMMAND(ID_HELPSHOW, OnHelp) + + ON_COMMAND_RANGE(ID_MRU_LIST_FIRST, ID_MRU_LIST_LAST, OnOpenMRUItem) + ON_UPDATE_COMMAND_UI(ID_MRU_LIST_FIRST, OnUpdateMRUItem) //}}AFX_MSG_MAP ON_WM_INITMENU() ON_WM_KILLFOCUS() //rewbs.fix3116 @@ -173,7 +175,6 @@ ID_INDICATOR_INFO, ID_INDICATOR_USER, ID_INDICATOR_TIME, - ID_INDICATOR_CPU }; @@ -183,7 +184,6 @@ CMainFrame::CMainFrame() //---------------------- { - m_NotifyTimer = 0; gpSoundDevice = NULL; @@ -271,6 +271,7 @@ CreateExampleModulesMenu(); CreateTemplateModulesMenu(); + UpdateMRUList(); } @@ -329,7 +330,7 @@ // Cursors curDragging = theApp.LoadCursor(IDC_DRAGGING); curArrow = theApp.LoadStandardCursor(IDC_ARROW); - curNoDrop = theApp.LoadCursor(IDC_NODROP); + curNoDrop = theApp.LoadStandardCursor(IDC_NO); curNoDrop2 = theApp.LoadCursor(IDC_NODRAG); curVSplit = theApp.LoadCursor(AFX_IDC_HSPLITBAR); // bitmaps @@ -344,6 +345,7 @@ if (!m_wndStatusBar.Create(this)) return -1; if (!m_wndTree.Create(this, IDD_TREEVIEW, CBRS_LEFT|CBRS_BORDER_RIGHT, IDD_TREEVIEW)) return -1; m_wndStatusBar.SetIndicators(indicators, CountOf(indicators)); + m_wndStatusBar.SetPaneInfo(0, ID_SEPARATOR, SBPS_STRETCH, 256); m_wndToolBar.Init(this); m_wndTree.RecalcLayout(); @@ -1745,6 +1747,7 @@ VOID CMainFrame::OnDocumentCreated(CModDoc *pModDoc) //-------------------------------------------------- { + UpdateMRUList(); m_wndTree.OnDocumentCreated(pModDoc); } @@ -2104,24 +2107,11 @@ } -void CMainFrame::OnUpdateCPU(CCmdUI *) -//------------------------------------- -{ -/* CString s; - double totalCPUPercent = m_dTotalCPU*100; - UINT intPart = static_cast<int>(totalCPUPercent); - UINT decPart = static_cast<int>(totalCPUPercent-intPart)*100; - s.Format("%d.%d%%", intPart, decPart); - m_wndStatusBar.SetPaneText(m_wndStatusBar.CommandToIndex(ID_INDICATOR_CPU), s, TRUE);*/ -} - -//rewbs.xinfo void CMainFrame::OnUpdateXInfo(CCmdUI *) //------------------------------------- { m_wndStatusBar.SetPaneText(m_wndStatusBar.CommandToIndex(ID_INDICATOR_XINFO), m_szXInfoText, TRUE); } -//end rewbs.xinfo void CMainFrame::OnPlayerPause() //------------------------------ @@ -2193,10 +2183,24 @@ //-------------------------------------- { OpenMenuItemFile(nId, false/*open example menu file*/); +} + +void CMainFrame::OnOpenMRUItem(UINT nId) +//-------------------------------------- +{ + mpt::PathString file = TrackerSettings::Instance().mruFiles[nId - ID_MRU_LIST_FIRST]; + theApp.OpenDocumentFile(file); } +void CMainFrame::OnUpdateMRUItem(CCmdUI *cmd) +//------------------------------------------- +{ + cmd->Enable(!TrackerSettings::Instance().mruFiles.empty()); +} + + LRESULT CMainFrame::OnInvalidatePatterns(WPARAM wParam, LPARAM) //------------------------------------------------------------- { @@ -2638,6 +2642,78 @@ } +void CMainFrame::UpdateMRUList() +//------------------------------ +{ + CMenu *pMenu = (CMainFrame::GetMainFrame())->GetMenu()->GetSubMenu(0); + static int firstMenu = -1; + if(firstMenu == -1) + { + int numMenus = pMenu->GetMenuItemCount(); + for(int i = 0; i < numMenus; i++) + { + if(pMenu->GetMenuItemID(i) == ID_MRU_LIST_FIRST) + { + firstMenu = i; + break; + } + } + } + + for(int i = ID_MRU_LIST_FIRST; i <= ID_MRU_LIST_LAST; i++) + { + pMenu->DeleteMenu(i, MF_BYCOMMAND); + } + + if(TrackerSettings::Instance().mruFiles.empty()) + { + // MFC will automatically ignore if we set MF_GRAYED here because of CFrameWnd::m_bAutoMenuEnable. + // So we will have to install a ON_UPDATE_COMMAND_UI callback... + pMenu->InsertMenu(firstMenu, MF_STRING | MF_BYPOSITION, ID_MRU_LIST_FIRST, _T("Recent File")); + } else + { + const std::wstring dir = TrackerDirectories::Instance().GetWorkingDirectory(DIR_MODS).ToWide(); + const size_t dirLength = dir.size(); + + for(size_t i = 0; i < TrackerSettings::Instance().mruFiles.size(); i++) + { + std::wstring s = StringifyW(i + 1) + L" "; + // Add mnemonics + if(i < 9) + { + s = L"&" + s; + } else if(i == 9) + { + s = L"1&0 "; + } + + std::wstring path = TrackerSettings::Instance().mruFiles[i].ToWide(); + if(!lstrcmpiW(dir.c_str(), path.substr(0, dirLength).c_str())) + { + // Only show filename + s += path.substr(dirLength); + } else if(path.length() <= 30) + { + s += path; + } else + { + // Shorten path + size_t start = path.find_first_of(L"\\/"); + size_t end = path.find_last_of(L"\\/"); + if(start != end) + { + s += path.substr(0, start + 1) + L"..." + path.substr(end); + } else + { + s += path; + } + } + ::InsertMenuW(pMenu->m_hMenu, firstMenu + i, MF_STRING | MF_BYPOSITION, ID_MRU_LIST_FIRST + i, s.c_str()); + } + } +} + + ///////////////////////////////////////////// //Misc helper functions ///////////////////////////////////////////// Modified: trunk/OpenMPT/mptrack/Mainfrm.h =================================================================== --- trunk/OpenMPT/mptrack/Mainfrm.h 2013-12-23 22:11:54 UTC (rev 3520) +++ trunk/OpenMPT/mptrack/Mainfrm.h 2013-12-23 22:56:18 UTC (rev 3521) @@ -468,6 +468,8 @@ /// Opens either template or example menu item. void OpenMenuItemFile(const UINT nId, const bool bTemplateFile); + void UpdateMRUList(); + // Implementation public: virtual ~CMainFrame(); @@ -492,21 +494,15 @@ afx_msg void OnTimer(UINT_PTR); afx_msg void OnSongProperties(); -// -> CODE#0002 -// -> DESC="list box to choose VST plugin presets (programs)" afx_msg void OnPluginManager(); -// -! NEW_FEATURE#0002 - - afx_msg void OnChannelManager(); afx_msg void OnClipboardManager(); afx_msg void OnUpdateTime(CCmdUI *pCmdUI); afx_msg void OnUpdateUser(CCmdUI *pCmdUI); afx_msg void OnUpdateInfo(CCmdUI *pCmdUI); - afx_msg void OnUpdateXInfo(CCmdUI *pCmdUI); //rewbs.xinfo - afx_msg void OnUpdateCPU(CCmdUI *pCmdUI); + afx_msg void OnUpdateXInfo(CCmdUI *pCmdUI); afx_msg void OnUpdateMidiRecord(CCmdUI *pCmdUI); afx_msg void OnPlayerPause(); afx_msg void OnMidiRecord(); @@ -514,11 +510,13 @@ afx_msg void OnNextOctave(); afx_msg void OnOctaveChanged(); afx_msg void OnPanic(); - afx_msg void OnReportBug(); //rewbs.customKeys + afx_msg void OnReportBug(); afx_msg BOOL OnInternetLink(UINT nID); afx_msg LRESULT OnUpdatePosition(WPARAM, LPARAM lParam); + afx_msg void OnOpenTemplateModule(UINT nId); afx_msg void OnExampleSong(UINT nId); - afx_msg void OnOpenTemplateModule(UINT nId); + afx_msg void OnOpenMRUItem(UINT nId); + afx_msg void OnUpdateMRUItem(CCmdUI *cmd); afx_msg LRESULT OnInvalidatePatterns(WPARAM, LPARAM); afx_msg LRESULT OnSpecialKey(WPARAM, LPARAM); afx_msg LRESULT OnCustomKeyMsg(WPARAM, LPARAM); Modified: trunk/OpenMPT/mptrack/Mptrack.cpp =================================================================== --- trunk/OpenMPT/mptrack/Mptrack.cpp 2013-12-23 22:11:54 UTC (rev 3520) +++ trunk/OpenMPT/mptrack/Mptrack.cpp 2013-12-23 22:56:18 UTC (rev 3521) @@ -58,28 +58,46 @@ CDocument *CModDocTemplate::OpenDocumentFile(const mpt::PathString &filename, BOOL addToMru, BOOL makeVisible) //------------------------------------------------------------------------------------------------------------ { - if(!mpt::PathString::CompareNoCase(filename.GetFileExt(), MPT_PATHSTRING(".dll"))) { CVstPluginManager *pPluginManager = theApp.GetPluginManager(); - if(pPluginManager) + if(pPluginManager && pPluginManager->AddPlugin(filename) != nullptr) { - pPluginManager->AddPlugin(filename); - return NULL; + return nullptr; } } + // First, remove document from MRU list. + if(addToMru) + { + for(std::vector<mpt::PathString>::iterator i = TrackerSettings::Instance().mruFiles.begin(); i != TrackerSettings::Instance().mruFiles.end(); i++) + { + if(!mpt::PathString::CompareNoCase(*i, filename)) + { + TrackerSettings::Instance().mruFiles.erase(i); + break; + } + } + } + #if MPT_COMPILER_MSVC && MPT_MSVC_BEFORE(2010,0) CDocument *pDoc = CMultiDocTemplate::OpenDocumentFile(filename.empty() ? NULL : mpt::PathString::TunnelIntoCString(filename).GetString(), makeVisible); #else CDocument *pDoc = CMultiDocTemplate::OpenDocumentFile(filename.empty() ? NULL : mpt::PathString::TunnelIntoCString(filename).GetString(), addToMru, makeVisible); #endif if(pDoc) - { + { + if(addToMru) + { + TrackerSettings::Instance().mruFiles.insert(TrackerSettings::Instance().mruFiles.begin(), filename); + if(TrackerSettings::Instance().mruFiles.size() > TrackerSettings::Instance().mruListLength) + { + TrackerSettings::Instance().mruFiles.resize(TrackerSettings::Instance().mruListLength); + } + } CMainFrame *pMainFrm = CMainFrame::GetMainFrame(); if (pMainFrm) pMainFrm->OnDocumentCreated(static_cast<CModDoc *>(pDoc)); - } - else //Case: pDoc == 0, opening document failed. + } else //Case: pDoc == 0, opening document failed. { if(!filename.empty()) { @@ -119,7 +137,7 @@ { return OpenDocumentFile(lpszFileName ? mpt::PathString::TunnelOutofCString(lpszFileName) : mpt::PathString()); } - virtual CDocument* OpenDocumentFile(const mpt::PathString &filename) + virtual CDocument* OpenDocumentFile(const mpt::PathString &filename) { return CDocManager::OpenDocumentFile(filename.empty() ? NULL : mpt::PathString::TunnelIntoCString(filename).GetString()); } @@ -811,9 +829,7 @@ m_pPluginCache = new IniFileSettingsContainer(m_szPluginCacheFileName); - int mruListLength = GetSettings().Read<int32>("Misc", "MRUListLength", 10); - Limit(mruListLength, 0, 15); - LoadStdProfileSettings((UINT)mruListLength); // Load standard INI file options (including MRU) + LoadStdProfileSettings(0); // Load standard INI file options (without MRU) // Register document templates m_pModTemplate = new CModDocTemplate( Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-12-23 22:11:54 UTC (rev 3520) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-12-23 22:56:18 UTC (rev 3521) @@ -197,6 +197,8 @@ , m_MayNormalizeSamplesOnLoad(conf, "Sample Editor", "MayNormalizeSamplesOnLoad", true) // Export , ExportDefaultToSoundcardSamplerate(conf, "Export", "DefaultToSoundcardSamplerate", true) + // MRU List + , mruListLength(conf, "Misc", "MRUListLength", 10) { // Effects #ifndef NO_DSP @@ -316,6 +318,21 @@ } + // MRU list + Limit(mruListLength, 0u, 32u); + mruFiles.reserve(mruListLength); + for(uint32 i = 0; i < mruListLength; i++) + { + char key[16]; + sprintf(key, "File%d", i); + + mpt::PathString path = theApp.RelativePathToAbsolute(conf.Read<mpt::PathString>("Recent File List", key, mpt::PathString())); + if(!path.empty()) + { + mruFiles.push_back(path); + } + } + // Fixups: // ------- @@ -808,6 +825,25 @@ conf.Write<std::string>("Zxx Macros", mpt::String::Format("Z%02X", izxx | 0x80), macros.szMidiZXXExt[izxx]); } + // MRU list + for(uint32 i = 0; i < (ID_MRU_LIST_LAST - ID_MRU_LIST_FIRST + 1); i++) + { + char key[16]; + sprintf(key, "File%d", i); + + if(i < mruFiles.size()) + { + mpt::PathString path = mruFiles[i]; + if(theApp.IsPortableMode()) + { + path = theApp.AbsolutePathToRelative(path); + } + conf.Write<mpt::PathString>("Recent File List", key, path); + } else + { + conf.Remove("Recent File List", key); + } + } } @@ -923,20 +959,24 @@ if(bStripFilename) { path = szFilenameFrom.GetDrive() + szFilenameFrom.GetDir(); - } - else + } else { path = szFilenameFrom; } - mpt::PathString szOldDir = directories[dir]; // for comparison + if(!path.HasTrailingSlash()) + { + path += MPT_PATHSTRING("\\"); + } + const mpt::PathString oldDir = directories[dir]; // for comparison + directories[dir] = path; // When updating default directory, also update the working directory. if(!path.empty() && directories == m_szDefaultDirectory) { - if(szOldDir != path) // update only if default directory has changed + if(oldDir != path) // update only if default directory has changed SetWorkingDirectory(path, dir); } } Modified: trunk/OpenMPT/mptrack/TrackerSettings.h =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.h 2013-12-23 22:11:54 UTC (rev 3520) +++ trunk/OpenMPT/mptrack/TrackerSettings.h 2013-12-23 22:56:18 UTC (rev 3521) @@ -363,6 +363,9 @@ mpt::PathString m_szKbdFile; + Setting<uint32> mruListLength; + std::vector<mpt::PathString> mruFiles; + // Chords MPTChords Chords; Modified: trunk/OpenMPT/mptrack/mptrack.rc =================================================================== --- trunk/OpenMPT/mptrack/mptrack.rc 2013-12-23 22:11:54 UTC (rev 3520) +++ trunk/OpenMPT/mptrack/mptrack.rc 2013-12-23 22:56:18 UTC (rev 3521) @@ -1967,7 +1967,7 @@ MENUITEM "Import &MIDI Library...", ID_IMPORT_MIDILIB MENUITEM "Add Sound &Bank...", ID_ADD_SOUNDBANK MENUITEM SEPARATOR - MENUITEM "Recent File", ID_FILE_MRU_FILE1 + MENUITEM "Recent File", ID_MRU_LIST_FIRST, GRAYED MENUITEM SEPARATOR MENUITEM "E&xit", ID_APP_EXIT END Modified: trunk/OpenMPT/mptrack/resource.h =================================================================== --- trunk/OpenMPT/mptrack/resource.h 2013-12-23 22:11:54 UTC (rev 3520) +++ trunk/OpenMPT/mptrack/resource.h 2013-12-23 22:56:18 UTC (rev 3521) @@ -1206,6 +1206,8 @@ #define ID_SAMPLE_MONOCONVERT_SPLIT 44608 #define ID_SETQUANTIZE 44609 #define ID_PLUG_RECORD_MIDIOUT 44610 +#define ID_MRU_LIST_FIRST 44611 +#define ID_MRU_LIST_LAST 44642 // Next default values for new objects // @@ -1213,7 +1215,7 @@ #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 #define _APS_NEXT_RESOURCE_VALUE 541 -#define _APS_NEXT_COMMAND_VALUE 44611 +#define _APS_NEXT_COMMAND_VALUE 44643 #define _APS_NEXT_CONTROL_VALUE 2462 #define _APS_NEXT_SYMED_VALUE 901 #endif Modified: trunk/OpenMPT/soundlib/plugins/PluginManager.cpp =================================================================== --- trunk/OpenMPT/soundlib/plugins/PluginManager.cpp 2013-12-23 22:11:54 UTC (rev 3520) +++ trunk/OpenMPT/soundlib/plugins/PluginManager.cpp 2013-12-23 22:56:18 UTC (rev 3521) @@ -480,10 +480,6 @@ { fullPath = theApp.GetAppDirPath() + MPT_PATHSTRING("Plugins\\"); } - if(!fullPath.HasTrailingSlash()) - { - fullPath += MPT_PATHSTRING("\\"); - } fullPath += mpt::PathString::FromUTF8(mixPlugin.GetLibraryName()) + MPT_PATHSTRING(".dll"); pFound = AddPlugin(fullPath); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2013-12-24 14:25:23
|
Revision: 3526 http://sourceforge.net/p/modplug/code/3526 Author: saga-games Date: 2013-12-24 14:25:15 +0000 (Tue, 24 Dec 2013) Log Message: ----------- [Fix] Empty settings paths were changed to "\" since a few revisions ago. [Mod] OpenMPT: Version is now 1.22.07.10 Modified Paths: -------------- trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/TrackerSettings.cpp trunk/OpenMPT/mptrack/TrackerSettings.h Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2013-12-24 14:05:12 UTC (rev 3525) +++ trunk/OpenMPT/common/versionNumber.h 2013-12-24 14:25:15 UTC (rev 3526) @@ -17,7 +17,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 22 #define VER_MINOR 07 -#define VER_MINORMINOR 09 +#define VER_MINORMINOR 10 //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/TrackerSettings.cpp =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-12-24 14:05:12 UTC (rev 3525) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2013-12-24 14:25:15 UTC (rev 3526) @@ -463,15 +463,15 @@ } if(storedVersion < MAKE_VERSION_NUMERIC(1,20,00,04)) { - m_dwPatternSetup &= ~0x200000; // dito + m_dwPatternSetup &= ~0x200000; // ditto } if(storedVersion < MAKE_VERSION_NUMERIC(1,20,00,07)) { - m_dwPatternSetup &= ~0x400000; // dito + m_dwPatternSetup &= ~0x400000; // ditto } if(storedVersion < MAKE_VERSION_NUMERIC(1,20,00,39)) { - m_dwPatternSetup &= ~0x10000000; // dito + m_dwPatternSetup &= ~0x10000000; // ditto } // Effects @@ -949,22 +949,22 @@ } - -// retrieve / set default directory from given string and store it our setup variables -void TrackerDirectories::SetDirectory(const mpt::PathString &szFilenameFrom, Directory dir, mpt::PathString (&directories)[NUM_DIRS], bool bStripFilename) -//-------------------------------------------------------------------------------------------------------------------------------------------------------- +// Retrieve / set default directory from given string and store it our setup variables +// If stripFilename is true, the filenameFrom parameter is assumed to be a full path including a filename. +void TrackerDirectories::SetDirectory(const mpt::PathString &filenameFrom, Directory dir, mpt::PathString (&directories)[NUM_DIRS], bool stripFilename) +//----------------------------------------------------------------------------------------------------------------------------------------------------- { mpt::PathString path; - if(bStripFilename) + if(stripFilename) { - path = szFilenameFrom.GetDrive() + szFilenameFrom.GetDir(); + path = filenameFrom.GetDrive() + filenameFrom.GetDir(); } else { - path = szFilenameFrom; + path = filenameFrom; } - if(!path.HasTrailingSlash()) + if(!path.empty() && !path.HasTrailingSlash()) { path += MPT_PATHSTRING("\\"); } @@ -981,6 +981,7 @@ } } + void TrackerDirectories::SetDefaultDirectory(const mpt::PathString &szFilenameFrom, Directory dir, bool bStripFilename) //--------------------------------------------------------------------------------------------------------------------- { @@ -995,6 +996,7 @@ } +// Get slash-terminated default directory of given type. mpt::PathString TrackerDirectories::GetDefaultDirectory(Directory dir) const //-------------------------------------------------------------------------- { @@ -1002,6 +1004,7 @@ } +// Get slash-terminated working directory of given type. mpt::PathString TrackerDirectories::GetWorkingDirectory(Directory dir) const //-------------------------------------------------------------------------- { Modified: trunk/OpenMPT/mptrack/TrackerSettings.h =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.h 2013-12-24 14:05:12 UTC (rev 3525) +++ trunk/OpenMPT/mptrack/TrackerSettings.h 2013-12-24 14:25:15 UTC (rev 3526) @@ -415,9 +415,9 @@ ~TrackerDirectories(); // access to default + working directories - void SetWorkingDirectory(const mpt::PathString &szFilenameFrom, Directory dir, bool bStripFilename = false); + void SetWorkingDirectory(const mpt::PathString &filenameFrom, Directory dir, bool stripFilename = false); mpt::PathString GetWorkingDirectory(Directory dir) const; - void SetDefaultDirectory(const mpt::PathString &szFilenameFrom, Directory dir, bool bStripFilename = false); + void SetDefaultDirectory(const mpt::PathString &filenameFrom, Directory dir, bool stripFilename = false); mpt::PathString GetDefaultDirectory(Directory dir) const; static TrackerDirectories &Instance(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-12-31 12:37:59
|
Revision: 3532 http://sourceforge.net/p/modplug/code/3532 Author: manxorist Date: 2013-12-31 12:37:51 +0000 (Tue, 31 Dec 2013) Log Message: ----------- [Var] libopenmpt: Bump API version to 0.2 . Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/libopenmpt/Doxyfile trunk/OpenMPT/libopenmpt/libopenmpt_version.h trunk/OpenMPT/openmpt123/openmpt123.cpp trunk/OpenMPT/openmpt123/openmpt123_config.hpp Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2013-12-27 21:50:32 UTC (rev 3531) +++ trunk/OpenMPT/Makefile 2013-12-31 12:37:51 UTC (rev 3532) @@ -149,7 +149,7 @@ # version LIBOPENMPT_VERSION_MAJOR=0 -LIBOPENMPT_VERSION_MINOR=1 +LIBOPENMPT_VERSION_MINOR=2 LIBOPENMPT_SONAME=libopenmpt.so.0 Modified: trunk/OpenMPT/libopenmpt/Doxyfile =================================================================== --- trunk/OpenMPT/libopenmpt/Doxyfile 2013-12-27 21:50:32 UTC (rev 3531) +++ trunk/OpenMPT/libopenmpt/Doxyfile 2013-12-31 12:37:51 UTC (rev 3532) @@ -38,7 +38,7 @@ # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "0.1" +PROJECT_NUMBER = "0.2" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a Modified: trunk/OpenMPT/libopenmpt/libopenmpt_version.h =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_version.h 2013-12-27 21:50:32 UTC (rev 3531) +++ trunk/OpenMPT/libopenmpt/libopenmpt_version.h 2013-12-31 12:37:51 UTC (rev 3532) @@ -17,7 +17,7 @@ /*! \brief libopenmpt major version number */ #define OPENMPT_API_VERSION_MAJOR 0 /*! \brief libopenmpt minor version number */ -#define OPENMPT_API_VERSION_MINOR 1 +#define OPENMPT_API_VERSION_MINOR 2 /*! \brief libopenmpt API version number */ #define OPENMPT_API_VERSION ((OPENMPT_API_VERSION_MAJOR<<24)|(OPENMPT_API_VERSION_MINOR<<16)) Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-12-27 21:50:32 UTC (rev 3531) +++ trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-12-31 12:37:51 UTC (rev 3532) @@ -440,8 +440,8 @@ log << std::endl; log << " --[no-]progress Show playback progress [default: " << commandlineflags().show_progress << "]" << std::endl; log << " --[no-]meters Show peak meters [default: " << commandlineflags().show_meters << "]" << std::endl; - log << " --[no-]channel-meters Show channel peak meters [default: " << commandlineflags().show_channel_meters << "]" << std::endl; - log << " --[no-]pattern Show pattern [default: " << commandlineflags().show_pattern << "]" << std::endl; + log << " --[no-]channel-meters Show channel peak meters (EXPERIMENTAL) [default: " << commandlineflags().show_channel_meters << "]" << std::endl; + log << " --[no-]pattern Show pattern (EXPERIMENTAL) [default: " << commandlineflags().show_pattern << "]" << std::endl; log << std::endl; log << " --[no-]details Show song details [default: " << commandlineflags().show_details << "]" << std::endl; log << " --[no-]message Show song message [default: " << commandlineflags().show_message << "]" << std::endl; Modified: trunk/OpenMPT/openmpt123/openmpt123_config.hpp =================================================================== --- trunk/OpenMPT/openmpt123/openmpt123_config.hpp 2013-12-27 21:50:32 UTC (rev 3531) +++ trunk/OpenMPT/openmpt123/openmpt123_config.hpp 2013-12-31 12:37:51 UTC (rev 3532) @@ -56,6 +56,6 @@ #endif #endif -#define OPENMPT123_VERSION_STRING "0.1" +#define OPENMPT123_VERSION_STRING "0.2" #endif // OPENMPT123_CONFIG_HPP This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2013-12-31 17:36:43
|
Revision: 3535 http://sourceforge.net/p/modplug/code/3535 Author: manxorist Date: 2013-12-31 17:36:35 +0000 (Tue, 31 Dec 2013) Log Message: ----------- [Ref] Add mpt::Windows::GetWinNTVersion() . [Ref] Make CPriorityBooster independent from CAudioThread . Modified Paths: -------------- trunk/OpenMPT/common/misc_util.h trunk/OpenMPT/sounddev/SoundDevice.cpp trunk/OpenMPT/sounddev/SoundDevices.h Modified: trunk/OpenMPT/common/misc_util.h =================================================================== --- trunk/OpenMPT/common/misc_util.h 2013-12-31 16:46:21 UTC (rev 3534) +++ trunk/OpenMPT/common/misc_util.h 2013-12-31 17:36:35 UTC (rev 3535) @@ -649,3 +649,28 @@ std::vector<char> HexToBin(const std::wstring &src); } // namespace Util + +namespace mpt +{ + +#if defined(WIN32) + +namespace Windows +{ + +// returns version in the form of the _WIN32_WINNT_* macros +static inline uint32 GetWinNTVersion() +//------------------------------------ +{ + OSVERSIONINFO versioninfo; + MemsetZero(versioninfo); + versioninfo.dwOSVersionInfoSize = sizeof(versioninfo); + GetVersionEx(&versioninfo); + return ((uint32)mpt::saturate_cast<uint8>(versioninfo.dwMajorVersion) << 8) | (uint32)mpt::saturate_cast<uint8>(versioninfo.dwMinorVersion); +} + +} // namespace Windows + +#endif // WIN32 + +} // namespace mpt Modified: trunk/OpenMPT/sounddev/SoundDevice.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-12-31 16:46:21 UTC (rev 3534) +++ trunk/OpenMPT/sounddev/SoundDevice.cpp 2013-12-31 17:36:35 UTC (rev 3535) @@ -388,15 +388,9 @@ //------------------------------------------------------------------------------------------ { - OSVERSIONINFO versioninfo; - MemsetZero(versioninfo); - versioninfo.dwOSVersionInfoSize = sizeof(versioninfo); - GetVersionEx(&versioninfo); - m_HasXP = versioninfo.dwMajorVersion >= 6 || (versioninfo.dwMajorVersion == 5 && versioninfo.dwMinorVersion >= 1); - m_HasVista = versioninfo.dwMajorVersion >= 6; + m_HasXP = (mpt::Windows::GetWinNTVersion() >= _WIN32_WINNT_WINXP); m_hKernel32DLL = NULL; - m_hAvRtDLL = NULL; pCreateWaitableTimer = nullptr; pSetWaitableTimer = nullptr; @@ -420,22 +414,6 @@ } #endif - pAvSetMmThreadCharacteristics = nullptr; - pAvRevertMmThreadCharacteristics = nullptr; - if(m_HasVista) - { - m_hAvRtDLL = LoadLibrary(TEXT("avrt.dll")); - if(m_hAvRtDLL) - { - pAvSetMmThreadCharacteristics = (FAvSetMmThreadCharacteristics)GetProcAddress(m_hAvRtDLL, "AvSetMmThreadCharacteristicsA"); - pAvRevertMmThreadCharacteristics = (FAvRevertMmThreadCharacteristics)GetProcAddress(m_hAvRtDLL, "AvRevertMmThreadCharacteristics"); - } - if(!pAvSetMmThreadCharacteristics || !pAvRevertMmThreadCharacteristics) - { - m_HasVista = false; - } - } - m_WakeupInterval = 0.0; m_hPlayThread = NULL; m_dwPlayThreadId = 0; @@ -477,18 +455,10 @@ m_hAudioWakeUp = NULL; } - pAvRevertMmThreadCharacteristics = nullptr; - pAvSetMmThreadCharacteristics = nullptr; pCreateWaitableTimer = nullptr; pSetWaitableTimer = nullptr; pCancelWaitableTimer = nullptr; - if(m_hAvRtDLL) - { - FreeLibrary(m_hAvRtDLL); - m_hAvRtDLL = NULL; - } - if(m_hKernel32DLL) { FreeLibrary(m_hKernel32DLL); @@ -498,58 +468,78 @@ } -class CPriorityBooster +CPriorityBooster::CPriorityBooster(bool boostPriority) +//---------------------------------------------------- + : m_HasVista(false) + , m_hAvRtDLL(NULL) + , pAvSetMmThreadCharacteristics(nullptr) + , pAvRevertMmThreadCharacteristics(nullptr) + , m_BoostPriority(boostPriority) + , task_idx(0) + , hTask(NULL) { -private: - CAudioThread &self; - bool m_BoostPriority; - DWORD task_idx; - HANDLE hTask; -public: - CPriorityBooster(CAudioThread &self_, bool boostPriority) : self(self_), m_BoostPriority(boostPriority) - //----------------------------------------------------------------------------------------------------- + m_HasVista = (mpt::Windows::GetWinNTVersion() >= _WIN32_WINNT_VISTA); + + if(m_HasVista) { - #ifdef _DEBUG - m_BoostPriority = false; - #endif + m_hAvRtDLL = LoadLibrary(TEXT("avrt.dll")); + if(m_hAvRtDLL && m_hAvRtDLL != INVALID_HANDLE_VALUE) + { + pAvSetMmThreadCharacteristics = (FAvSetMmThreadCharacteristics)GetProcAddress(m_hAvRtDLL, "AvSetMmThreadCharacteristicsA"); + pAvRevertMmThreadCharacteristics = (FAvRevertMmThreadCharacteristics)GetProcAddress(m_hAvRtDLL, "AvRevertMmThreadCharacteristics"); + } + if(!pAvSetMmThreadCharacteristics || !pAvRevertMmThreadCharacteristics) + { + m_HasVista = false; + } + } - task_idx = 0; - hTask = NULL; + #ifdef _DEBUG + m_BoostPriority = false; + #endif - if(m_BoostPriority) + if(m_BoostPriority) + { + if(m_HasVista) { - if(self.m_HasVista) - { - hTask = self.pAvSetMmThreadCharacteristics(TEXT("Pro Audio"), &task_idx); - } else - { - SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL); - } + hTask = pAvSetMmThreadCharacteristics(TEXT("Pro Audio"), &task_idx); + } else + { + SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL); } - } - CPriorityBooster::~CPriorityBooster() - //----------------------------------- +} + + +CPriorityBooster::~CPriorityBooster() +//----------------------------------- +{ + + if(m_BoostPriority) { - - if(m_BoostPriority) + if(m_HasVista) { - if(self.m_HasVista) - { - self.pAvRevertMmThreadCharacteristics(hTask); - hTask = NULL; - task_idx = 0; - } else - { - SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_NORMAL); - } + pAvRevertMmThreadCharacteristics(hTask); + hTask = NULL; + task_idx = 0; + } else + { + SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_NORMAL); } + } + pAvRevertMmThreadCharacteristics = nullptr; + pAvSetMmThreadCharacteristics = nullptr; + + if(m_hAvRtDLL) + { + FreeLibrary(m_hAvRtDLL); + m_hAvRtDLL = NULL; } -}; +} class CPeriodicWaker @@ -691,7 +681,7 @@ if(!terminate) { - CPriorityBooster priorityBooster(*this, m_SoundDevice.m_Settings.BoostThreadPriority); + CPriorityBooster priorityBooster(m_SoundDevice.m_Settings.BoostThreadPriority); CPeriodicWaker periodicWaker(*this, m_WakeupInterval); m_SoundDevice.StartFromSoundThread(); Modified: trunk/OpenMPT/sounddev/SoundDevices.h =================================================================== --- trunk/OpenMPT/sounddev/SoundDevices.h 2013-12-31 16:46:21 UTC (rev 3534) +++ trunk/OpenMPT/sounddev/SoundDevices.h 2013-12-31 17:36:35 UTC (rev 3535) @@ -16,27 +16,40 @@ class CSoundDeviceWithThread; + +class CPriorityBooster +{ +private: + typedef HANDLE (WINAPI *FAvSetMmThreadCharacteristics)(LPCTSTR, LPDWORD); + typedef BOOL (WINAPI *FAvRevertMmThreadCharacteristics)(HANDLE); +private: + bool m_HasVista; + HMODULE m_hAvRtDLL; + FAvSetMmThreadCharacteristics pAvSetMmThreadCharacteristics; + FAvRevertMmThreadCharacteristics pAvRevertMmThreadCharacteristics; + bool m_BoostPriority; + DWORD task_idx; + HANDLE hTask; +public: + CPriorityBooster(bool boostPriority); + ~CPriorityBooster(); +}; + + class CAudioThread { - friend class CPriorityBooster; friend class CPeriodicWaker; private: CSoundDeviceWithThread & m_SoundDevice; bool m_HasXP; - bool m_HasVista; HMODULE m_hKernel32DLL; - HMODULE m_hAvRtDLL; typedef HANDLE (WINAPI *FCreateWaitableTimer)(LPSECURITY_ATTRIBUTES, BOOL, LPCTSTR); typedef BOOL (WINAPI *FSetWaitableTimer)(HANDLE, const LARGE_INTEGER *, LONG, PTIMERAPCROUTINE, LPVOID, BOOL); typedef BOOL (WINAPI *FCancelWaitableTimer)(HANDLE); - typedef HANDLE (WINAPI *FAvSetMmThreadCharacteristics)(LPCTSTR, LPDWORD); - typedef BOOL (WINAPI *FAvRevertMmThreadCharacteristics)(HANDLE); FCreateWaitableTimer pCreateWaitableTimer; FSetWaitableTimer pSetWaitableTimer; FCancelWaitableTimer pCancelWaitableTimer; - FAvSetMmThreadCharacteristics pAvSetMmThreadCharacteristics; - FAvRevertMmThreadCharacteristics pAvRevertMmThreadCharacteristics; double m_WakeupInterval; HANDLE m_hAudioWakeUp; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <sag...@us...> - 2014-01-01 19:05:03
|
Revision: 3540 http://sourceforge.net/p/modplug/code/3540 Author: saga-games Date: 2014-01-01 19:04:56 +0000 (Wed, 01 Jan 2014) Log Message: ----------- [Mod] 2014 [Mod] OpenMPT: Version is now 1.22.07.11 Modified Paths: -------------- trunk/OpenMPT/common/version.cpp trunk/OpenMPT/common/versionNumber.h trunk/OpenMPT/mptrack/res/MPTRACK.RC2 trunk/OpenMPT/packageTemplate/readme.txt Modified: trunk/OpenMPT/common/version.cpp =================================================================== --- trunk/OpenMPT/common/version.cpp 2014-01-01 19:01:43 UTC (rev 3539) +++ trunk/OpenMPT/common/version.cpp 2014-01-01 19:04:56 UTC (rev 3540) @@ -304,13 +304,13 @@ #else "libopenmpt (based on OpenMPT / ModPlug Tracker)\n" #endif - "Copyright \xC2\xA9 2004-2013 Contributors\n" + "Copyright \xC2\xA9 2004-2014 Contributors\n" "Copyright \xC2\xA9 1997-2003 Olivier Lapicque\n" "\n" "Contributors:\n" - "Johannes Schultz (2008-2013)\n" - "Ahti Lepp\xC3\xA4nen (2005-2011, 2013)\n" - "Joern Heusipp (2012-2013)\n" + "Johannes Schultz (2008-2014)\n" + "Joern Heusipp (2012-2014)\n" + "Ahti Lepp\xC3\xA4nen (2005-2011)\n" "Robin Fernandes (2004-2007)\n" "Sergiy Pylypenko (2007)\n" "Eric Chavanon (2004-2005)\n" Modified: trunk/OpenMPT/common/versionNumber.h =================================================================== --- trunk/OpenMPT/common/versionNumber.h 2014-01-01 19:01:43 UTC (rev 3539) +++ trunk/OpenMPT/common/versionNumber.h 2014-01-01 19:04:56 UTC (rev 3540) @@ -17,7 +17,7 @@ #define VER_MAJORMAJOR 1 #define VER_MAJOR 22 #define VER_MINOR 07 -#define VER_MINORMINOR 10 +#define VER_MINORMINOR 11 //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/res/MPTRACK.RC2 =================================================================== --- trunk/OpenMPT/mptrack/res/MPTRACK.RC2 2014-01-01 19:01:43 UTC (rev 3539) +++ trunk/OpenMPT/mptrack/res/MPTRACK.RC2 2014-01-01 19:04:56 UTC (rev 3540) @@ -43,7 +43,7 @@ VALUE "FileDescription", "OpenMPT / ModPlug Tracker" VALUE "FileVersion", VER_FILEVERSION_STR VALUE "InternalName", "ModPlug Tracker" - VALUE "LegalCopyright", "Copyright \xA91997-2003 Olivier Lapicque; \xA92004-2013 contributors." + VALUE "LegalCopyright", "Copyright \xA91997-2003 Olivier Lapicque; \xA92004-2014 contributors." VALUE "LegalTrademarks", "M.O.D.P.L.U.G" VALUE "OriginalFilename", "mptrack.exe" VALUE "PrivateBuild", "" Modified: trunk/OpenMPT/packageTemplate/readme.txt =================================================================== --- trunk/OpenMPT/packageTemplate/readme.txt 2014-01-01 19:01:43 UTC (rev 3539) +++ trunk/OpenMPT/packageTemplate/readme.txt 2014-01-01 19:04:56 UTC (rev 3540) @@ -75,7 +75,7 @@ OpenMPT is partially under the following license: -> Copyright (c) 2004-2013, OpenMPT contributors +> Copyright (c) 2004-2014, OpenMPT contributors > Copyright (c) 1997-2003, Olivier Lapicque > All rights reserved. > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-01-02 12:51:25
|
Revision: 3546 http://sourceforge.net/p/modplug/code/3546 Author: manxorist Date: 2014-01-02 12:51:18 +0000 (Thu, 02 Jan 2014) Log Message: ----------- [Fix] VS2008 with older SDKs has no _WINNT_WIN32_* macros for newer windows versions. Provide matching enum values. Modified Paths: -------------- trunk/OpenMPT/common/misc_util.h trunk/OpenMPT/sounddev/SoundDevice.cpp Modified: trunk/OpenMPT/common/misc_util.h =================================================================== --- trunk/OpenMPT/common/misc_util.h 2014-01-02 12:32:34 UTC (rev 3545) +++ trunk/OpenMPT/common/misc_util.h 2014-01-02 12:51:18 UTC (rev 3546) @@ -658,7 +658,18 @@ namespace Windows { -// returns version in the form of the _WIN32_WINNT_* macros +enum WinNTVersion +{ + VerWin2000 = 0x0500, + VerWinXP = 0x0501, + VerWinXPSP2 = 0x0502, + VerWinVista = 0x0600, + VerWinVista = 0x0600, + VerWin7 = 0x0601, + VerWin8 = 0x0602, +}; + +// returns version in the form of the _WIN32_WINNT_* macros or mpt::Windows::WinNTVersion static inline uint32 GetWinNTVersion() //------------------------------------ { Modified: trunk/OpenMPT/sounddev/SoundDevice.cpp =================================================================== --- trunk/OpenMPT/sounddev/SoundDevice.cpp 2014-01-02 12:32:34 UTC (rev 3545) +++ trunk/OpenMPT/sounddev/SoundDevice.cpp 2014-01-02 12:51:18 UTC (rev 3546) @@ -388,7 +388,7 @@ //------------------------------------------------------------------------------------------ { - m_HasXP = (mpt::Windows::GetWinNTVersion() >= _WIN32_WINNT_WINXP); + m_HasXP = (mpt::Windows::GetWinNTVersion() >= mpt::Windows::VerWinXP); m_hKernel32DLL = NULL; @@ -479,7 +479,7 @@ , hTask(NULL) { - m_HasVista = (mpt::Windows::GetWinNTVersion() >= _WIN32_WINNT_VISTA); + m_HasVista = (mpt::Windows::GetWinNTVersion() >= mpt::Windows::VerWinVista); if(m_HasVista) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <man...@us...> - 2014-01-02 14:14:01
|
Revision: 3548 http://sourceforge.net/p/modplug/code/3548 Author: manxorist Date: 2014-01-02 14:13:54 +0000 (Thu, 02 Jan 2014) Log Message: ----------- [Doc] in_openmpt / xmp-openmpt / foo_openmpt: Add text files that direct users to the website for docs and FAQ. [Mod] libopenmpt build: Include minimal docs in win32 binary package. Modified Paths: -------------- trunk/OpenMPT/build/auto/package_libopenmpt_win32.cmd Added Paths: ----------- trunk/OpenMPT/libopenmpt/doc/ trunk/OpenMPT/libopenmpt/doc/foo_openmpt.txt trunk/OpenMPT/libopenmpt/doc/in_openmpt.txt trunk/OpenMPT/libopenmpt/doc/xmp-openmpt.txt Modified: trunk/OpenMPT/build/auto/package_libopenmpt_win32.cmd =================================================================== --- trunk/OpenMPT/build/auto/package_libopenmpt_win32.cmd 2014-01-02 13:20:50 UTC (rev 3547) +++ trunk/OpenMPT/build/auto/package_libopenmpt_win32.cmd 2014-01-02 14:13:54 UTC (rev 3548) @@ -16,7 +16,10 @@ copy /y ..\..\libopenmpt\libopenmpt_version.h inc\libopenmpt\ || goto error copy /y libopenmpt.lib lib\Win32\ || goto error copy /y libopenmpt.dll bin\Win32\ || goto error -"C:\Program Files\7-Zip\7z.exe" a -t7z -mx=9 libopenmpt-win32-r%GOT_REVISION%.7z libopenmpt.dll libmodplug.dll in_openmpt.dll xmp-openmpt.dll foo_openmpt.dll libopenmpt_settings.dll openmpt123.exe inc\libopenmpt\libopenmpt.h inc\libopenmpt\libopenmpt.hpp inc\libopenmpt\libopenmpt_config.h inc\libopenmpt\libopenmpt_version.h lib\Win32\libopenmpt.lib bin\Win32\libopenmpt.dll || goto error +copy /y ..\..\libopenmpt\doc\in_openmpt.txt .\ || goto error +copy /y ..\..\libopenmpt\doc\xmp-openmpt.txt .\ || goto error +copy /y ..\..\libopenmpt\doc\foo_openmpt.txt .\ || goto error +"C:\Program Files\7-Zip\7z.exe" a -t7z -mx=9 libopenmpt-win32-r%GOT_REVISION%.7z libopenmpt.dll libmodplug.dll in_openmpt.dll xmp-openmpt.dll foo_openmpt.dll libopenmpt_settings.dll openmpt123.exe inc\libopenmpt\libopenmpt.h inc\libopenmpt\libopenmpt.hpp inc\libopenmpt\libopenmpt_config.h inc\libopenmpt\libopenmpt_version.h lib\Win32\libopenmpt.lib bin\Win32\libopenmpt.dll in_openmpt.txt xmp-openmpt.txt foo_openmpt.txt || goto error "C:\Program Files\7-Zip\7z.exe" a -ttar libopenmpt-win32.tar libopenmpt-win32-r%GOT_REVISION%.7z || goto error del /f /q libopenmpt-win32-r%GOT_REVISION%.7z cd ..\.. || goto error Index: trunk/OpenMPT/libopenmpt/doc =================================================================== --- trunk/OpenMPT/libopenmpt/doc 2014-01-02 13:20:50 UTC (rev 3547) +++ trunk/OpenMPT/libopenmpt/doc 2014-01-02 14:13:54 UTC (rev 3548) Property changes on: trunk/OpenMPT/libopenmpt/doc ___________________________________________________________________ Added: tsvn:logminsize ## -0,0 +1 ## +10 \ No newline at end of property Added: trunk/OpenMPT/libopenmpt/doc/foo_openmpt.txt =================================================================== --- trunk/OpenMPT/libopenmpt/doc/foo_openmpt.txt (rev 0) +++ trunk/OpenMPT/libopenmpt/doc/foo_openmpt.txt 2014-01-02 14:13:54 UTC (rev 3548) @@ -0,0 +1 @@ +See http://lib.openmpt.org/ for documentation, FAQ and other details. Property changes on: trunk/OpenMPT/libopenmpt/doc/foo_openmpt.txt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: trunk/OpenMPT/libopenmpt/doc/in_openmpt.txt =================================================================== --- trunk/OpenMPT/libopenmpt/doc/in_openmpt.txt (rev 0) +++ trunk/OpenMPT/libopenmpt/doc/in_openmpt.txt 2014-01-02 14:13:54 UTC (rev 3548) @@ -0,0 +1 @@ +See http://lib.openmpt.org/ for documentation, FAQ and other details. Property changes on: trunk/OpenMPT/libopenmpt/doc/in_openmpt.txt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: trunk/OpenMPT/libopenmpt/doc/xmp-openmpt.txt =================================================================== --- trunk/OpenMPT/libopenmpt/doc/xmp-openmpt.txt (rev 0) +++ trunk/OpenMPT/libopenmpt/doc/xmp-openmpt.txt 2014-01-02 14:13:54 UTC (rev 3548) @@ -0,0 +1 @@ +See http://lib.openmpt.org/ for documentation, FAQ and other details. Property changes on: trunk/OpenMPT/libopenmpt/doc/xmp-openmpt.txt ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |