From: <man...@us...> - 2014-08-31 08:34:55
|
Revision: 4221 http://sourceforge.net/p/modplug/code/4221 Author: manxorist Date: 2014-08-31 08:34:39 +0000 (Sun, 31 Aug 2014) Log Message: ----------- [New] libopenmpt: It looks like there are still many VS2008 users out there. Make libopenmpt at least compile with VS2008 (with msinttypes) and provide basic project files in build/vs2008 (note that this is not a full build system for libopenmpt but only enough to get VS2008 users started). Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/common/typedefs.h trunk/OpenMPT/libopenmpt/dox/changelog.md trunk/OpenMPT/libopenmpt/libopenmpt.hpp trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp trunk/OpenMPT/libopenmpt/libopenmpt_config.h trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp trunk/OpenMPT/libopenmpt/libopenmpt_ext.cpp trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp Added Paths: ----------- trunk/OpenMPT/build/vs2008/ trunk/OpenMPT/build/vs2008/libopenmpt/ trunk/OpenMPT/build/vs2008/libopenmpt/cstdint.h trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj trunk/OpenMPT/build/vs2008/libopenmpt.sln trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c/ trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c/libopenmpt_example_c.c.vcproj Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/Makefile 2014-08-31 08:34:39 UTC (rev 4221) @@ -735,6 +735,7 @@ svn export ./include/foobar2000sdk bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/foobar2000sdk --native-eol CRLF svn export ./include/winamp bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/winamp --native-eol CRLF svn export ./include/xmplay bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/xmplay --native-eol CRLF + svn export ./include/msinttypes bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/include/msinttypes --native-eol CRLF cp bin/dist.mk bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/build/dist.mk cp bin/svn_version_dist.h bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/common/svn_version_default/svn_version.h cd bin/dist-zip/libopenmpt-$(DIST_LIBOPENMPT_VERSION)/ && zip -r ../libopenmpt-$(DIST_LIBOPENMPT_VERSION)-windows.zip --compression-method deflate -9 * Index: trunk/OpenMPT/build/vs2008 =================================================================== --- trunk/OpenMPT/build/vs2008 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/build/vs2008 2014-08-31 08:34:39 UTC (rev 4221) Property changes on: trunk/OpenMPT/build/vs2008 ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,4 ## +Debug +*.ncb +*.suo +Release Added: tsvn:logminsize ## -0,0 +1 ## +10 \ No newline at end of property Index: trunk/OpenMPT/build/vs2008/libopenmpt =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/build/vs2008/libopenmpt 2014-08-31 08:34:39 UTC (rev 4221) Property changes on: trunk/OpenMPT/build/vs2008/libopenmpt ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,3 ## +*.user +Debug +Release Added: tsvn:logminsize ## -0,0 +1 ## +10 \ No newline at end of property Added: trunk/OpenMPT/build/vs2008/libopenmpt/cstdint.h =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt/cstdint.h (rev 0) +++ trunk/OpenMPT/build/vs2008/libopenmpt/cstdint.h 2014-08-31 08:34:39 UTC (rev 4221) @@ -0,0 +1,14 @@ +#pragma once +#if (_MSC_VER >= 1500) && (_MSC_VER < 1600) // VS2008 +#include "stdint.h" +namespace std { + typedef int8_t int8_t; + typedef int16_t int16_t; + typedef int32_t int32_t; + typedef int64_t int64_t; + typedef uint8_t uint8_t; + typedef uint16_t uint16_t; + typedef uint32_t uint32_t; + typedef uint64_t uint64_t; +} +#endif Property changes on: trunk/OpenMPT/build/vs2008/libopenmpt/cstdint.h ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-chdr \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj (rev 0) +++ trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj 2014-08-31 08:34:39 UTC (rev 4221) @@ -0,0 +1,816 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="libopenmpt" + ProjectGUID="{D19450B0-4497-418C-B3EC-10D51967814E}" + RootNamespace="libopenmpt" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="4" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories=".;../../..;../../../common;../../../include/msinttypes/inttypes;../../../include/msinttypes/stdint;../../../common/svn_version_default;../../../include" + PreprocessorDefinitions="LIBOPENMPT_BUILD" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="4" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories=".;../../..;../../../common;../../../include/msinttypes/inttypes;../../../include/msinttypes/stdint;../../../common/svn_version_default;../../../include" + PreprocessorDefinitions="LIBOPENMPT_BUILD" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLibrarianTool" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="common" + > + <File + RelativePath="..\..\..\common\AudioCriticalSection.cpp" + > + </File> + <File + RelativePath="..\..\..\common\AudioCriticalSection.h" + > + </File> + <File + RelativePath="..\..\..\common\BuildSettings.h" + > + </File> + <File + RelativePath="..\..\..\common\CompilerDetect.h" + > + </File> + <File + RelativePath="..\..\..\common\Endianness.h" + > + </File> + <File + RelativePath="..\..\..\common\FlagSet.h" + > + </File> + <File + RelativePath="..\..\..\common\Logging.cpp" + > + </File> + <File + RelativePath="..\..\..\common\Logging.h" + > + </File> + <File + RelativePath="..\..\..\common\misc_util.cpp" + > + </File> + <File + RelativePath="..\..\..\common\misc_util.h" + > + </File> + <File + RelativePath="..\..\..\common\mptFstream.h" + > + </File> + <File + RelativePath="..\..\..\common\mptPathString.cpp" + > + </File> + <File + RelativePath="..\..\..\common\mptPathString.h" + > + </File> + <File + RelativePath="..\..\..\common\mptString.cpp" + > + </File> + <File + RelativePath="..\..\..\common\mptString.h" + > + </File> + <File + RelativePath="..\..\..\common\mutex.h" + > + </File> + <File + RelativePath="..\..\..\common\Profiler.cpp" + > + </File> + <File + RelativePath="..\..\..\common\Profiler.h" + > + </File> + <File + RelativePath="..\..\..\common\serialization_utils.cpp" + > + </File> + <File + RelativePath="..\..\..\common\serialization_utils.h" + > + </File> + <File + RelativePath="..\..\..\common\stdafx.cpp" + > + </File> + <File + RelativePath="..\..\..\common\stdafx.h" + > + </File> + <File + RelativePath="..\..\..\common\StringFixer.h" + > + </File> + <File + RelativePath="..\..\..\common\thread.h" + > + </File> + <File + RelativePath="..\..\..\common\typedefs.cpp" + > + </File> + <File + RelativePath="..\..\..\common\typedefs.h" + > + </File> + <File + RelativePath="..\..\..\common\version.cpp" + > + </File> + <File + RelativePath="..\..\..\common\version.h" + > + </File> + <File + RelativePath="..\..\..\common\versionNumber.h" + > + </File> + </Filter> + <Filter + Name="soundlib" + > + <File + RelativePath="..\..\..\soundlib\AudioReadTarget.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\ChunkReader.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Dither.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Dither.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Dlsbank.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Dlsbank.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Fastmix.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\FileReader.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\FloatMixer.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\IntMixer.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\ITCompression.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\ITCompression.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\ITTools.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\ITTools.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_669.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_amf.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_ams.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_dbm.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_digi.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_dmf.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_dsm.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_far.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_gdm.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_imf.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_it.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_itp.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\load_j2b.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_mdl.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_med.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_mid.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_mo3.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_mod.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_mt2.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_mtm.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_okt.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_psm.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_ptm.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_s3m.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_stm.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_ult.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_umx.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_wav.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Load_xm.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Loaders.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Message.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Message.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\MIDIEvents.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\MIDIEvents.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\MIDIMacros.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\MIDIMacros.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Mixer.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\MixerInterface.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\MixerLoops.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\MixerLoops.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\MixerSettings.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\MixerSettings.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Mmcmp.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\mod_specifications.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\mod_specifications.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\ModChannel.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\ModChannel.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\modcommand.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\modcommand.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\ModInstrument.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\ModInstrument.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\ModSample.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\ModSample.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\ModSequence.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\ModSequence.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\modsmp_ctrl.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\modsmp_ctrl.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\pattern.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\pattern.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\patternContainer.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\patternContainer.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Resampler.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\RowVisitor.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\RowVisitor.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\S3MTools.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\S3MTools.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\SampleFormat.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\SampleFormatConverters.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\SampleFormats.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\SampleIO.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\SampleIO.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Snd_defs.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Snd_flt.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Snd_fx.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Sndfile.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Sndfile.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Sndmix.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\SoundFilePlayConfig.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\SoundFilePlayConfig.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Tables.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Tables.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Tagging.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\Tagging.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\tuning.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\tuning.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\tuningbase.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\tuningbase.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\tuningCollection.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\tuningcollection.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\Wav.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\WAVTools.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\WAVTools.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\WindowedFIR.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\WindowedFIR.h" + > + </File> + <File + RelativePath="..\..\..\soundlib\XMTools.cpp" + > + </File> + <File + RelativePath="..\..\..\soundlib\XMTools.h" + > + </File> + </Filter> + <Filter + Name="libopenmpt" + > + <File + RelativePath="..\..\..\libopenmpt\libopenmpt.h" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt.hpp" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_c.cpp" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_config.h" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_cxx.cpp" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_ext.cpp" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_ext.hpp" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_impl.cpp" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_impl.hpp" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_internal.h" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_stream_callbacks_fd.h" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_stream_callbacks_file.h" + > + </File> + <File + RelativePath="..\..\..\libopenmpt\libopenmpt_version.h" + > + </File> + </Filter> + <Filter + Name="include" + > + <Filter + Name="miniz" + > + <File + RelativePath="..\..\..\include\miniz\miniz.c" + > + </File> + </Filter> + <Filter + Name="msinttypes" + > + <Filter + Name="stdint" + > + <File + RelativePath="..\..\..\include\msinttypes\stdint\stdint.h" + > + </File> + </Filter> + <Filter + Name="inttypes" + > + <File + RelativePath="..\..\..\include\msinttypes\inttypes\inttypes.h" + > + </File> + </Filter> + </Filter> + </Filter> + <Filter + Name="build" + > + <Filter + Name="vs2008" + > + <Filter + Name="libopenmt" + > + <File + RelativePath=".\cstdint.h" + > + </File> + </Filter> + </Filter> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Property changes on: trunk/OpenMPT/build/vs2008/libopenmpt/libopenmpt.vcproj ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-ms-vcproj \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +CRLF \ No newline at end of property Added: trunk/OpenMPT/build/vs2008/libopenmpt.sln =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt.sln (rev 0) +++ trunk/OpenMPT/build/vs2008/libopenmpt.sln 2014-08-31 08:34:39 UTC (rev 4221) @@ -0,0 +1,36 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libopenmpt", "libopenmpt\libopenmpt.vcproj", "{D19450B0-4497-418C-B3EC-10D51967814E}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portaudio", "..\gen\portaudio.vcproj", "{189B867F-FF4B-45A1-B741-A97492EE69AF}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libopenmpt_example_c.c", "libopenmpt_example_c.c\libopenmpt_example_c.c.vcproj", "{89D1117D-7787-45C1-9240-A24AACF4A414}" + ProjectSection(ProjectDependencies) = postProject + {189B867F-FF4B-45A1-B741-A97492EE69AF} = {189B867F-FF4B-45A1-B741-A97492EE69AF} + {D19450B0-4497-418C-B3EC-10D51967814E} = {D19450B0-4497-418C-B3EC-10D51967814E} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D19450B0-4497-418C-B3EC-10D51967814E}.Debug|Win32.ActiveCfg = Debug|Win32 + {D19450B0-4497-418C-B3EC-10D51967814E}.Debug|Win32.Build.0 = Debug|Win32 + {D19450B0-4497-418C-B3EC-10D51967814E}.Release|Win32.ActiveCfg = Release|Win32 + {D19450B0-4497-418C-B3EC-10D51967814E}.Release|Win32.Build.0 = Release|Win32 + {189B867F-FF4B-45A1-B741-A97492EE69AF}.Debug|Win32.ActiveCfg = Debug|Win32 + {189B867F-FF4B-45A1-B741-A97492EE69AF}.Debug|Win32.Build.0 = Debug|Win32 + {189B867F-FF4B-45A1-B741-A97492EE69AF}.Release|Win32.ActiveCfg = Release|Win32 + {189B867F-FF4B-45A1-B741-A97492EE69AF}.Release|Win32.Build.0 = Release|Win32 + {89D1117D-7787-45C1-9240-A24AACF4A414}.Debug|Win32.ActiveCfg = Debug|Win32 + {89D1117D-7787-45C1-9240-A24AACF4A414}.Debug|Win32.Build.0 = Debug|Win32 + {89D1117D-7787-45C1-9240-A24AACF4A414}.Release|Win32.ActiveCfg = Release|Win32 + {89D1117D-7787-45C1-9240-A24AACF4A414}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Property changes on: trunk/OpenMPT/build/vs2008/libopenmpt.sln ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-ms-sln \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +CRLF \ No newline at end of property Index: trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c 2014-08-31 08:34:39 UTC (rev 4221) Property changes on: trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c ___________________________________________________________________ Added: svn:ignore ## -0,0 +1,3 ## +Debug +*.user +Release Added: tsvn:logminsize ## -0,0 +1 ## +10 \ No newline at end of property Added: trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c/libopenmpt_example_c.c.vcproj =================================================================== --- trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c/libopenmpt_example_c.c.vcproj (rev 0) +++ trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c/libopenmpt_example_c.c.vcproj 2014-08-31 08:34:39 UTC (rev 4221) @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="libopenmpt_example_c.c" + ProjectGUID="{89D1117D-7787-45C1-9240-A24AACF4A414}" + RootNamespace="libopenmpt_example_cc" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="../../../include/msinttypes/stdint;../../..;../../../include/portaudio/include" + MinimalRebuild="true" + BasicRuntimeChecks="3" + RuntimeLibrary="3" + WarningLevel="3" + DebugInformationFormat="4" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="ksuser.lib ksguid.lib" + GenerateDebugInformation="true" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="$(SolutionDir)$(ConfigurationName)" + IntermediateDirectory="$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="2" + WholeProgramOptimization="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + Optimization="2" + EnableIntrinsicFunctions="true" + AdditionalIncludeDirectories="../../../include/msinttypes/stdint;../../..;../../../include/portaudio/include" + RuntimeLibrary="0" + EnableFunctionLevelLinking="true" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="ksuser.lib ksguid.lib" + GenerateDebugInformation="true" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCManifestTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCAppVerifierTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="..\..\..\libopenmpt\examples\libopenmpt_example_c.c" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> Property changes on: trunk/OpenMPT/build/vs2008/libopenmpt_example_c.c/libopenmpt_example_c.c.vcproj ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/x-ms-vcproj \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +CRLF \ No newline at end of property Modified: trunk/OpenMPT/common/typedefs.h =================================================================== --- trunk/OpenMPT/common/typedefs.h 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/common/typedefs.h 2014-08-31 08:34:39 UTC (rev 4221) @@ -426,11 +426,11 @@ // openmpt assumes these type have exact WIN32 semantics namespace mpt { namespace Legacy { -typedef std::uint8_t BYTE; -typedef std::uint16_t WORD; -typedef std::uint32_t DWORD; -typedef std::int32_t LONG; -typedef std::uint32_t UINT; +typedef uint8 BYTE; +typedef uint16 WORD; +typedef uint32 DWORD; +typedef int32 LONG; +typedef uint32 UINT; } } // namespace mpt::Legacy using namespace mpt::Legacy; Modified: trunk/OpenMPT/libopenmpt/dox/changelog.md =================================================================== --- trunk/OpenMPT/libopenmpt/dox/changelog.md 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/libopenmpt/dox/changelog.md 2014-08-31 08:34:39 UTC (rev 4221) @@ -10,6 +10,7 @@ * openmpt123: SDL is now also used by default if availble, in addition to PortAudio. * Support for emscripten is no longer experimental. + * libopenmpt itself can now also be compiled with VS2008. * [Bug] Fix all known crashes on platforms that do not support unaligned memory access. Modified: trunk/OpenMPT/libopenmpt/libopenmpt.hpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt.hpp 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/libopenmpt/libopenmpt.hpp 2014-08-31 08:34:39 UTC (rev 4221) @@ -20,7 +20,11 @@ #include <string> #include <vector> +#ifdef MPT_ANCIENT_VS2008 +#include "cstdint.h" +#else #include <cstdint> +#endif /*! * \page libopenmpt_cpp_overview C++ API Modified: trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp 2014-08-31 08:34:39 UTC (rev 4221) @@ -265,7 +265,11 @@ double openmpt_could_open_propability( openmpt_stream_callbacks stream_callbacks, void * stream, double effort, openmpt_log_func logfunc, void * user ) { try { openmpt::callbacks_istream istream( stream_callbacks, stream ); +#ifdef MPT_ANCIENT_VS2008 + return openmpt::module_impl::could_open_propability( istream, effort, std::tr1::shared_ptr<openmpt::logfunc_logger>( new openmpt::logfunc_logger( logfunc ? logfunc : openmpt_log_func_default, user ) ) ); +#else return openmpt::module_impl::could_open_propability( istream, effort, std::make_shared<openmpt::logfunc_logger>( logfunc ? logfunc : openmpt_log_func_default, user ) ); +#endif } OPENMPT_INTERFACE_CATCH_TO_LOG_FUNC; return 0.0; } @@ -291,7 +295,11 @@ } } openmpt::callbacks_istream istream( stream_callbacks, stream ); +#ifdef MPT_ANCIENT_VS2008 + mod->impl = new openmpt::module_impl( istream, std::tr1::shared_ptr<openmpt::logfunc_logger>( new openmpt::logfunc_logger( mod->logfunc, mod->user ) ), ctls_map ); +#else mod->impl = new openmpt::module_impl( istream, std::make_shared<openmpt::logfunc_logger>( mod->logfunc, mod->user ), ctls_map ); +#endif return mod; } OPENMPT_INTERFACE_CATCH_TO_MOD_LOG_FUNC; delete mod->impl; @@ -322,7 +330,11 @@ } } } +#ifdef MPT_ANCIENT_VS2008 + mod->impl = new openmpt::module_impl( filedata, filesize, std::tr1::shared_ptr<openmpt::logfunc_logger>( new openmpt::logfunc_logger( mod->logfunc, mod->user ) ), ctls_map ); +#else mod->impl = new openmpt::module_impl( filedata, filesize, std::make_shared<openmpt::logfunc_logger>( mod->logfunc, mod->user ), ctls_map ); +#endif return mod; } OPENMPT_INTERFACE_CATCH_TO_MOD_LOG_FUNC; delete mod->impl; Modified: trunk/OpenMPT/libopenmpt/libopenmpt_config.h =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_config.h 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/libopenmpt/libopenmpt_config.h 2014-08-31 08:34:39 UTC (rev 4221) @@ -95,6 +95,12 @@ @} */ +#if defined(_MSC_VER) +#if (_MSC_VER >= 1500) && (_MSC_VER < 1600) // VS2008 +#define MPT_ANCIENT_VS2008 +#endif +#endif + #include "libopenmpt_version.h" #endif /* LIBOPENMPT_CONFIG_H */ Modified: trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp 2014-08-31 08:34:39 UTC (rev 4221) @@ -77,7 +77,11 @@ } double could_open_propability( std::istream & stream, double effort, std::ostream & log ) { +#ifdef MPT_ANCIENT_VS2008 + return openmpt::module_impl::could_open_propability( stream, effort, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ) ); +#else return openmpt::module_impl::could_open_propability( stream, effort, std::make_shared<std_ostream_log>( log ) ); +#endif } module::module( const module & ) { @@ -97,35 +101,67 @@ } module::module( std::istream & stream, std::ostream & log, const std::map< std::string, std::string > & ctls ) : impl(0) { +#ifdef MPT_ANCIENT_VS2008 + impl = new module_impl( stream, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ); +#else impl = new module_impl( stream, std::make_shared<std_ostream_log>( log ), ctls ); +#endif } module::module( const std::vector<std::uint8_t> & data, std::ostream & log, const std::map< std::string, std::string > & ctls ) : impl(0) { +#ifdef MPT_ANCIENT_VS2008 + impl = new module_impl( data, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ); +#else impl = new module_impl( data, std::make_shared<std_ostream_log>( log ), ctls ); +#endif } module::module( const std::uint8_t * beg, const std::uint8_t * end, std::ostream & log, const std::map< std::string, std::string > & ctls ) : impl(0) { +#ifdef MPT_ANCIENT_VS2008 + impl = new module_impl( beg, end - beg, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ); +#else impl = new module_impl( beg, end - beg, std::make_shared<std_ostream_log>( log ), ctls ); +#endif } module::module( const std::uint8_t * data, std::size_t size, std::ostream & log, const std::map< std::string, std::string > & ctls ) : impl(0) { +#ifdef MPT_ANCIENT_VS2008 + impl = new module_impl( data, size, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ); +#else impl = new module_impl( data, size, std::make_shared<std_ostream_log>( log ), ctls ); +#endif } module::module( const std::vector<char> & data, std::ostream & log, const std::map< std::string, std::string > & ctls ) : impl(0) { +#ifdef MPT_ANCIENT_VS2008 + impl = new module_impl( data, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ); +#else impl = new module_impl( data, std::make_shared<std_ostream_log>( log ), ctls ); +#endif } module::module( const char * beg, const char * end, std::ostream & log, const std::map< std::string, std::string > & ctls ) : impl(0) { +#ifdef MPT_ANCIENT_VS2008 + impl = new module_impl( beg, end - beg, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ); +#else impl = new module_impl( beg, end - beg, std::make_shared<std_ostream_log>( log ), ctls ); +#endif } module::module( const char * data, std::size_t size, std::ostream & log, const std::map< std::string, std::string > & ctls ) : impl(0) { +#ifdef MPT_ANCIENT_VS2008 + impl = new module_impl( data, size, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ); +#else impl = new module_impl( data, size, std::make_shared<std_ostream_log>( log ), ctls ); +#endif } module::module( const void * data, std::size_t size, std::ostream & log, const std::map< std::string, std::string > & ctls ) : impl(0) { +#ifdef MPT_ANCIENT_VS2008 + impl = new module_impl( data, size, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ); +#else impl = new module_impl( data, size, std::make_shared<std_ostream_log>( log ), ctls ); +#endif } module::~module() { Modified: trunk/OpenMPT/libopenmpt/libopenmpt_ext.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_ext.cpp 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/libopenmpt/libopenmpt_ext.cpp 2014-08-31 08:34:39 UTC (rev 4221) @@ -29,16 +29,32 @@ { public: +#ifdef MPT_ANCIENT_VS2008 + module_ext_impl( std::istream & stream, std::ostream & log, const std::map< std::string, std::string > & ctls ) : module_impl( stream, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ) { +#else module_ext_impl( std::istream & stream, std::ostream & log, const std::map< std::string, std::string > & ctls ) : module_impl( stream, std::make_shared<std_ostream_log>( log ), ctls ) { +#endif init(); } +#ifdef MPT_ANCIENT_VS2008 + module_ext_impl( const std::vector<char> & data, std::ostream & log, const std::map< std::string, std::string > & ctls ) : module_impl( data, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ) { +#else module_ext_impl( const std::vector<char> & data, std::ostream & log, const std::map< std::string, std::string > & ctls ) : module_impl( data, std::make_shared<std_ostream_log>( log ), ctls ) { +#endif init(); } +#ifdef MPT_ANCIENT_VS2008 + module_ext_impl( const char * data, std::size_t size, std::ostream & log, const std::map< std::string, std::string > & ctls ) : module_impl( data, size, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ) { +#else module_ext_impl( const char * data, std::size_t size, std::ostream & log, const std::map< std::string, std::string > & ctls ) : module_impl( data, size, std::make_shared<std_ostream_log>( log ), ctls ) { +#endif init(); } +#ifdef MPT_ANCIENT_VS2008 + module_ext_impl( const void * data, std::size_t size, std::ostream & log, const std::map< std::string, std::string > & ctls ) : module_impl( data, size, std::tr1::shared_ptr<std_ostream_log>( new std_ostream_log( log ) ), ctls ) { +#else module_ext_impl( const void * data, std::size_t size, std::ostream & log, const std::map< std::string, std::string > & ctls ) : module_impl( data, size, std::make_shared<std_ostream_log>( log ), ctls ) { +#endif init(); } Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2014-08-31 08:34:39 UTC (rev 4221) @@ -172,9 +172,17 @@ class log_forwarder : public ILog { private: +#ifdef MPT_ANCIENT_VS2008 + std::tr1::shared_ptr<log_interface> destination; +#else std::shared_ptr<log_interface> destination; +#endif public: +#ifdef MPT_ANCIENT_VS2008 + log_forwarder( std::tr1::shared_ptr<log_interface> dest ) : destination(dest) { +#else log_forwarder( std::shared_ptr<log_interface> dest ) : destination(dest) { +#endif return; } virtual ~log_forwarder() { @@ -294,9 +302,21 @@ set_render_param( module::RENDER_STEREOSEPARATION_PERCENT, 100 ); } void module_impl::init( const std::map< std::string, std::string > & ctls ) { +#ifdef MPT_ANCIENT_VS2008 + m_sndFile = std::tr1::shared_ptr<CSoundFile>(new CSoundFile()); +#else m_sndFile = std::unique_ptr<CSoundFile>(new CSoundFile()); +#endif +#ifdef MPT_ANCIENT_VS2008 + m_Dither = std::tr1::shared_ptr<Dither>(new Dither()); +#else m_Dither = std::unique_ptr<Dither>(new Dither()); +#endif +#ifdef MPT_ANCIENT_VS2008 + m_LogForwarder = std::tr1::shared_ptr<log_forwarder>(new log_forwarder(m_Log)); +#else m_LogForwarder = std::unique_ptr<log_forwarder>(new log_forwarder(m_Log)); +#endif m_sndFile->SetCustomLog( m_LogForwarder.get() ); m_currentPositionSeconds = 0.0; m_Gain = 1.0f; @@ -412,9 +432,21 @@ std::transform( lowercase_ext.begin(), lowercase_ext.end(), lowercase_ext.begin(), tolower ); return std::find( extensions.begin(), extensions.end(), lowercase_ext ) != extensions.end(); } +#ifdef MPT_ANCIENT_VS2008 +double module_impl::could_open_propability( std::istream & stream, double effort, std::tr1::shared_ptr<log_interface> log ) { +#else double module_impl::could_open_propability( std::istream & stream, double effort, std::shared_ptr<log_interface> log ) { +#endif +#ifdef MPT_ANCIENT_VS2008 + std::tr1::shared_ptr<CSoundFile> sndFile( new CSoundFile() ); +#else std::unique_ptr<CSoundFile> sndFile( new CSoundFile() ); +#endif +#ifdef MPT_ANCIENT_VS2008 + std::tr1::shared_ptr<log_forwarder> logForwarder( new log_forwarder( log ) ); +#else std::unique_ptr<log_forwarder> logForwarder( new log_forwarder( log ) ); +#endif sndFile->SetCustomLog( logForwarder.get() ); try { @@ -447,32 +479,64 @@ } +#ifdef MPT_ANCIENT_VS2008 +module_impl::module_impl( std::istream & stream, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#else module_impl::module_impl( std::istream & stream, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#endif init( ctls ); load( FileReader( &stream ) ); apply_libopenmpt_defaults(); } +#ifdef MPT_ANCIENT_VS2008 +module_impl::module_impl( const std::vector<std::uint8_t> & data, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#else module_impl::module_impl( const std::vector<std::uint8_t> & data, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#endif init( ctls ); +#ifdef MPT_ANCIENT_VS2008 + load( FileReader( &(data[0]), data.size() ) ); +#else load( FileReader( data.data(), data.size() ) ); +#endif apply_libopenmpt_defaults(); } +#ifdef MPT_ANCIENT_VS2008 +module_impl::module_impl( const std::vector<char> & data, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#else module_impl::module_impl( const std::vector<char> & data, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#endif init( ctls ); +#ifdef MPT_ANCIENT_VS2008 + load( FileReader( &(data[0]), data.size() ) ); +#else load( FileReader( data.data(), data.size() ) ); +#endif apply_libopenmpt_defaults(); } +#ifdef MPT_ANCIENT_VS2008 +module_impl::module_impl( const std::uint8_t * data, std::size_t size, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#else module_impl::module_impl( const std::uint8_t * data, std::size_t size, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#endif init( ctls ); load( FileReader( data, size ) ); apply_libopenmpt_defaults(); } +#ifdef MPT_ANCIENT_VS2008 +module_impl::module_impl( const char * data, std::size_t size, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#else module_impl::module_impl( const char * data, std::size_t size, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#endif init( ctls ); load( FileReader( data, size ) ); apply_libopenmpt_defaults(); } +#ifdef MPT_ANCIENT_VS2008 +module_impl::module_impl( const void * data, std::size_t size, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#else module_impl::module_impl( const void * data, std::size_t size, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ) : m_Log(log) { +#endif init( ctls ); load( FileReader( data, size ) ); apply_libopenmpt_defaults(); Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp =================================================================== --- trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp 2014-08-30 15:30:40 UTC (rev 4220) +++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp 2014-08-31 08:34:39 UTC (rev 4221) @@ -54,11 +54,27 @@ class module_impl { protected: +#ifdef MPT_ANCIENT_VS2008 + std::tr1::shared_ptr<log_interface> m_Log; +#else std::shared_ptr<log_interface> m_Log; +#endif +#ifdef MPT_ANCIENT_VS2008 + std::tr1::shared_ptr<log_forwarder> m_LogForwarder; +#else std::unique_ptr<log_forwarder> m_LogForwarder; +#endif double m_currentPositionSeconds; +#ifdef MPT_ANCIENT_VS2008 + std::tr1::shared_ptr<OpenMPT::CSoundFile> m_sndFile; +#else std::unique_ptr<OpenMPT::CSoundFile> m_sndFile; +#endif +#ifdef MPT_ANCIENT_VS2008 + std::tr1::shared_ptr<OpenMPT::Dither> m_Dither; +#else std::unique_ptr<OpenMPT::Dither> m_Dither; +#endif float m_Gain; bool m_ctl_load_skip_samples; bool m_ctl_load_skip_patterns; @@ -82,13 +98,41 @@ public: static std::vector<std::string> get_supported_extensions(); static bool is_extension_supported( const std::string & extension ); +#ifdef MPT_ANCIENT_VS2008 + static double could_open_propability( std::istream & stream, double effort, std::tr1::shared_ptr<log_interface> log ); +#else static double could_open_propability( std::istream & stream, double effort, std::shared_ptr<log_interface> log ); +#endif +#ifdef MPT_ANCIENT_VS2008 + module_impl( std::istream & stream, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#else module_impl( std::istream & stream, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#endif +#ifdef MPT_ANCIENT_VS2008 + module_impl( const std::vector<std::uint8_t> & data, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#else module_impl( const std::vector<std::uint8_t> & data, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#endif +#ifdef MPT_ANCIENT_VS2008 + module_impl( const std::vector<char> & data, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#else module_impl( const std::vector<char> & data, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#endif +#ifdef MPT_ANCIENT_VS2008 + module_impl( const std::uint8_t * data, std::size_t size, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#else module_impl( const std::uint8_t * data, std::size_t size, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#endif +#ifdef MPT_ANCIENT_VS2008 + module_impl( const char * data, std::size_t size, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#else module_impl( const char * data, std::size_t size, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#endif +#ifdef MPT_ANCIENT_VS2008 + module_impl( const void * data, std::size_t size, std::tr1::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#else module_impl( const void * data, std::size_t size, std::shared_ptr<log_interface> log, const std::map< std::string, std::string > & ctls ); +#endif ~module_impl(); public: void select_subsong( std::int32_t subsong ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |