|
From: <man...@us...> - 2013-12-02 15:49:17
|
Revision: 3350
http://sourceforge.net/p/modplug/code/3350
Author: manxorist
Date: 2013-12-02 15:49:11 +0000 (Mon, 02 Dec 2013)
Log Message:
-----------
[Mod] ASIO: Make the device-playing-while-stopped behaviour optional and default to actually stopping the device.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mpdlgs.cpp
trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp
Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-12-02 15:04:47 UTC (rev 3349)
+++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-12-02 15:49:11 UTC (rev 3350)
@@ -526,6 +526,9 @@
if(m_CurrentDeviceInfo.id.GetType() == SNDDEV_DSOUND)
{
GetDlgItem(IDC_CHECK4)->SetWindowText("Use primary buffer");
+ } else if(m_CurrentDeviceInfo.id.GetType() == SNDDEV_ASIO)
+ {
+ GetDlgItem(IDC_CHECK4)->SetWindowText("Keep device running");
} else
{
GetDlgItem(IDC_CHECK4)->SetWindowText("Use device exclusively");
Modified: trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp
===================================================================
--- trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-12-02 15:04:47 UTC (rev 3349)
+++ trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-12-02 15:49:11 UTC (rev 3350)
@@ -500,10 +500,13 @@
{
ALWAYS_ASSERT_WARN_MESSAGE(!CriticalSection::IsLocked(), "AudioCriticalSection locked while starting ASIO");
- if(m_DeviceRunning)
+ if(m_Settings.ExclusiveMode)
{
- SetRenderSilence(false, true);
- return true;
+ if(m_DeviceRunning)
+ {
+ SetRenderSilence(false, true);
+ return true;
+ }
}
SetRenderSilence(false);
@@ -526,7 +529,23 @@
{
ALWAYS_ASSERT_WARN_MESSAGE(!CriticalSection::IsLocked(), "AudioCriticalSection locked while stopping ASIO");
- SetRenderSilence(true, true);
+ if(m_Settings.ExclusiveMode)
+ {
+ SetRenderSilence(true, true);
+ return;
+ }
+
+ m_DeviceRunning = false;
+ try
+ {
+ asioCall(stop());
+ } catch(...)
+ {
+ // continue
+ }
+ m_TotalFramesWritten = 0;
+ SetRenderSilence(false);
+
}
@@ -1173,7 +1192,7 @@
caps.CanUpdateInterval = false;
caps.CanSampleFormat = false;
- caps.CanExclusiveMode = false;
+ caps.CanExclusiveMode = true;
caps.CanBoostThreadPriority = false;
caps.CanUseHardwareTiming = true;
caps.CanChannelMapping = true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2013-12-03 14:22:32
|
Revision: 3355
http://sourceforge.net/p/modplug/code/3355
Author: manxorist
Date: 2013-12-03 14:22:11 +0000 (Tue, 03 Dec 2013)
Log Message:
-----------
[Ref] libopenmpt: Split static and DLL builds into separate project files.
[Ref] libopenmpt: Split test build into separate project file.
Modified Paths:
--------------
trunk/OpenMPT/build/auto/test_libopenmpt_win32.cmd
trunk/OpenMPT/build/auto/test_libopenmpt_win64.cmd
trunk/OpenMPT/build/auto/vs2010_libopenmpt_test_win32.cmd
trunk/OpenMPT/build/auto/vs2010_libopenmpt_test_win64.cmd
trunk/OpenMPT/libopenmpt/libopenmpt.sln
trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj
trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters
trunk/OpenMPT/libopenmpt/libopenmpt_foobar2000.sln
trunk/OpenMPT/openmpt123/openmpt123.sln
Added Paths:
-----------
trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj
trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj.filters
trunk/OpenMPT/libopenmpt/libopenmpt_test.sln
trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj
trunk/OpenMPT/libopenmpt/libopenmpt_test.vcxproj.filters
Removed Paths:
-------------
trunk/OpenMPT/libopenmpt/svn_version/
Property Changed:
----------------
trunk/OpenMPT/libopenmpt/
Modified: trunk/OpenMPT/build/auto/test_libopenmpt_win32.cmd
===================================================================
--- trunk/OpenMPT/build/auto/test_libopenmpt_win32.cmd 2013-12-02 18:04:41 UTC (rev 3354)
+++ trunk/OpenMPT/build/auto/test_libopenmpt_win32.cmd 2013-12-03 14:22:11 UTC (rev 3355)
@@ -6,7 +6,7 @@
cd bin || goto error
-Win32\libopenmpt-test.exe || goto error
+Win32\libopenmpt_test.exe || goto error
cd .. || goto error
Modified: trunk/OpenMPT/build/auto/test_libopenmpt_win64.cmd
===================================================================
--- trunk/OpenMPT/build/auto/test_libopenmpt_win64.cmd 2013-12-02 18:04:41 UTC (rev 3354)
+++ trunk/OpenMPT/build/auto/test_libopenmpt_win64.cmd 2013-12-03 14:22:11 UTC (rev 3355)
@@ -6,7 +6,7 @@
cd bin || goto error
-x64\libopenmpt-test.exe || goto error
+x64\libopenmpt_test.exe || goto error
cd .. || goto error
Modified: trunk/OpenMPT/build/auto/vs2010_libopenmpt_test_win32.cmd
===================================================================
--- trunk/OpenMPT/build/auto/vs2010_libopenmpt_test_win32.cmd 2013-12-02 18:04:41 UTC (rev 3354)
+++ trunk/OpenMPT/build/auto/vs2010_libopenmpt_test_win32.cmd 2013-12-03 14:22:11 UTC (rev 3355)
@@ -22,8 +22,8 @@
xcopy /e /y /c ..\..\externals\*.* include
cd libopenmpt || goto error
- devenv libopenmpt.sln /clean "Test|Win32" || goto error
- devenv libopenmpt.sln /build "Test|Win32" || goto error
+ devenv libopenmpt_test.sln /clean "Release|Win32" || goto error
+ devenv libopenmpt_test.sln /build "Release|Win32" || goto error
cd .. || goto error
Modified: trunk/OpenMPT/build/auto/vs2010_libopenmpt_test_win64.cmd
===================================================================
--- trunk/OpenMPT/build/auto/vs2010_libopenmpt_test_win64.cmd 2013-12-02 18:04:41 UTC (rev 3354)
+++ trunk/OpenMPT/build/auto/vs2010_libopenmpt_test_win64.cmd 2013-12-03 14:22:11 UTC (rev 3355)
@@ -22,8 +22,8 @@
xcopy /e /y /c ..\..\externals\*.* include
cd libopenmpt || goto error
- devenv libopenmpt.sln /clean "Test|x64" || goto error
- devenv libopenmpt.sln /build "Test|x64" || goto error
+ devenv libopenmpt_test.sln /clean "Release|x64" || goto error
+ devenv libopenmpt_test.sln /build "Release|x64" || goto error
cd .. || goto error
Index: trunk/OpenMPT/libopenmpt
===================================================================
--- trunk/OpenMPT/libopenmpt 2013-12-02 18:04:41 UTC (rev 3354)
+++ trunk/OpenMPT/libopenmpt 2013-12-03 14:22:11 UTC (rev 3355)
Property changes on: trunk/OpenMPT/libopenmpt
___________________________________________________________________
Modified: svn:ignore
## -4,11 +4,13 ##
Release
ReleaseStatic
Test
+docs
ipch
libopenmpt.opensdf
libopenmpt.sdf
libopenmpt.suo
libopenmpt.vcxproj.user
+libopenmptDLL.vcxproj.user
libopenmpt_foobar2000.opensdf
libopenmpt_foobar2000.sdf
libopenmpt_foobar2000.suo
## -16,5 +18,7 ##
libopenmpt_settings-Debug
libopenmpt_settings-Release
libopenmpt_settings.vcxproj.user
+libopenmpt_test.vcxproj.user
x64
-docs
+libopenmpt_test.sdf
+libopenmpt_test.suo
Modified: trunk/OpenMPT/libopenmpt/libopenmpt.sln
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt.sln 2013-12-02 18:04:41 UTC (rev 3354)
+++ trunk/OpenMPT/libopenmpt/libopenmpt.sln 2013-12-03 14:22:11 UTC (rev 3355)
@@ -8,14 +8,14 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libopenmpt_settings", "libopenmpt_settings.vcxproj", "{B2B6EE07-F662-496D-980C-FCA7CA144DBC}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libopenmptDLL", "libopenmptDLL.vcxproj", "{A1C5B6FA-F333-4999-8DF0-BE2F5FD4B882}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
- Test|Win32 = Test|Win32
- Test|x64 = Test|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{812A654D-99BE-4D13-B97F-86332AD3E363}.Debug|Win32.ActiveCfg = Debug|Win32
@@ -26,19 +26,20 @@
{812A654D-99BE-4D13-B97F-86332AD3E363}.Release|Win32.Build.0 = Release|Win32
{812A654D-99BE-4D13-B97F-86332AD3E363}.Release|x64.ActiveCfg = Release|x64
{812A654D-99BE-4D13-B97F-86332AD3E363}.Release|x64.Build.0 = Release|x64
- {812A654D-99BE-4D13-B97F-86332AD3E363}.Test|Win32.ActiveCfg = Test|Win32
- {812A654D-99BE-4D13-B97F-86332AD3E363}.Test|Win32.Build.0 = Test|Win32
- {812A654D-99BE-4D13-B97F-86332AD3E363}.Test|x64.ActiveCfg = Test|x64
- {812A654D-99BE-4D13-B97F-86332AD3E363}.Test|x64.Build.0 = Test|x64
{B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Debug|Win32.ActiveCfg = Debug|Win32
{B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Debug|Win32.Build.0 = Debug|Win32
{B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Debug|x64.ActiveCfg = Debug|Win32
{B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Release|Win32.ActiveCfg = Release|Win32
{B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Release|Win32.Build.0 = Release|Win32
{B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Release|x64.ActiveCfg = Release|Win32
- {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Test|Win32.ActiveCfg = Release|Win32
- {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Test|Win32.Build.0 = Release|Win32
- {B2B6EE07-F662-496D-980C-FCA7CA144DBC}.Test|x64.ActiveCfg = Release|Win32
+ {A1C5B6FA-F333-4999-8DF0-BE2F5FD4B882}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A1C5B6FA-F333-4999-8DF0-BE2F5FD4B882}.Debug|Win32.Build.0 = Debug|Win32
+ {A1C5B6FA-F333-4999-8DF0-BE2F5FD4B882}.Debug|x64.ActiveCfg = Debug|x64
+ {A1C5B6FA-F333-4999-8DF0-BE2F5FD4B882}.Debug|x64.Build.0 = Debug|x64
+ {A1C5B6FA-F333-4999-8DF0-BE2F5FD4B882}.Release|Win32.ActiveCfg = Release|Win32
+ {A1C5B6FA-F333-4999-8DF0-BE2F5FD4B882}.Release|Win32.Build.0 = Release|Win32
+ {A1C5B6FA-F333-4999-8DF0-BE2F5FD4B882}.Release|x64.ActiveCfg = Release|x64
+ {A1C5B6FA-F333-4999-8DF0-BE2F5FD4B882}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2013-12-02 18:04:41 UTC (rev 3354)
+++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj 2013-12-03 14:22:11 UTC (rev 3355)
@@ -1,14 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="DebugStatic|Win32">
- <Configuration>DebugStatic</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="DebugStatic|x64">
- <Configuration>DebugStatic</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
@@ -17,14 +9,6 @@
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="ReleaseStatic|Win32">
- <Configuration>ReleaseStatic</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="ReleaseStatic|x64">
- <Configuration>ReleaseStatic</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
@@ -33,14 +17,6 @@
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
- <ProjectConfiguration Include="Test|Win32">
- <Configuration>Test</Configuration>
- <Platform>Win32</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Test|x64">
- <Configuration>Test</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{812A654D-99BE-4D13-B97F-86332AD3E363}</ProjectGuid>
@@ -48,196 +24,72 @@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'" Label="Configuration">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>false</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>false</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>false</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'" Label="Configuration">
- <ConfigurationType>StaticLibrary</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <WholeProgramOptimization>false</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|Win32'" Label="PropertySheets">
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Test|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'" Label="PropertySheets">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- </ImportGroup>
<PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <OutDir>..\bin\$(Platform)\</OutDir>
- <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'">
- <OutDir>..\bin\$(Platform)\</OutDir>
- <TargetName>$(ProjectName)-test</TargetName>
- <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <OutDir>..\bin\$(Platform)\</OutDir>
- <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Test|x64'">
- <OutDir>..\bin\$(Platform)\</OutDir>
- <TargetName>$(ProjectName)-test</TargetName>
- <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <OutDir>..\bin\$(Platform)-Debug\</OutDir>
+ <OutDir>..\build\lib\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <OutDir>..\bin\$(Platform)-Debug\</OutDir>
- </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|Win32'">
<OutDir>..\build\lib\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>..\build\lib\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>..\build\lib\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
</PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">
- <OutDir>..\build\lib\$(Platform)\$(Configuration)\</OutDir>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">
- <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
- </PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..;../common;../libopenmpt/svn_version;../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <DelayLoadDLLs>
- </DelayLoadDLLs>
- </Link>
- <PreBuildEvent>
- <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\libopenmpt\svn_version\svn_version.h || del ..\libopenmpt\svn_version\svn_version.h || true</Command>
- </PreBuildEvent>
- <PostBuildEvent>
- <Command>
- </Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..;../common;../libopenmpt/svn_version;../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <DelayLoadDLLs>
- </DelayLoadDLLs>
- </Link>
- <PreBuildEvent>
- <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\libopenmpt\svn_version\svn_version.h || del ..\libopenmpt\svn_version\svn_version.h || true</Command>
- </PreBuildEvent>
- <PostBuildEvent>
- <Command>
- </Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..;../common;../libopenmpt/svn_version;../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
<PreprocessorDefinitions>LIBOPENMPT_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
</ClCompile>
@@ -245,17 +97,17 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
- <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\libopenmpt\svn_version\svn_version.h || del ..\libopenmpt\svn_version\svn_version.h || true</Command>
+ <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command>
</PreBuildEvent>
<Lib>
<AdditionalOptions>/ignore:4221 %(AdditionalOptions)</AdditionalOptions>
</Lib>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>..;../common;../libopenmpt/svn_version;../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
<PreprocessorDefinitions>LIBOPENMPT_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
</ClCompile>
@@ -263,7 +115,7 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PreBuildEvent>
- <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\libopenmpt\svn_version\svn_version.h || del ..\libopenmpt\svn_version\svn_version.h || true</Command>
+ <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command>
</PreBuildEvent>
<Lib>
<AdditionalOptions>/ignore:4221 %(AdditionalOptions)</AdditionalOptions>
@@ -277,130 +129,8 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<FloatingPointModel>Fast</FloatingPointModel>
- <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..;../common;../libopenmpt/svn_version;../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
- <StringPooling>true</StringPooling>
- <WholeProgramOptimization>false</WholeProgramOptimization>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <DelayLoadDLLs>
- </DelayLoadDLLs>
- </Link>
- <PreBuildEvent>
- <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\libopenmpt\svn_version\svn_version.h || del ..\libopenmpt\svn_version\svn_version.h || true</Command>
- </PreBuildEvent>
- <PostBuildEvent>
- <Command>copy /y ..\bin\$(Platform)\libopenmpt.dll ..\bin\$(Platform)\in_openmpt.dll
-copy /y ..\bin\$(Platform)\libopenmpt.dll ..\bin\$(Platform)\xmp-openmpt.dll
-copy /y ..\bin\$(Platform)\libopenmpt.dll ..\bin\$(Platform)\libmodplug.dll
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Test|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Full</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <FloatingPointModel>Fast</FloatingPointModel>
- <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_TEST;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..;../common;../libopenmpt/svn_version;../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
- <StringPooling>true</StringPooling>
- <WholeProgramOptimization>false</WholeProgramOptimization>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <DelayLoadDLLs>
- </DelayLoadDLLs>
- <SubSystem>Console</SubSystem>
- </Link>
- <PreBuildEvent>
- <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\libopenmpt\svn_version\svn_version.h || del ..\libopenmpt\svn_version\svn_version.h || true</Command>
- </PreBuildEvent>
- <PostBuildEvent />
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Full</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <FloatingPointModel>Fast</FloatingPointModel>
- <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..;../common;../libopenmpt/svn_version;../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
- <StringPooling>true</StringPooling>
- <WholeProgramOptimization>false</WholeProgramOptimization>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <DelayLoadDLLs>
- </DelayLoadDLLs>
- </Link>
- <PreBuildEvent>
- <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\libopenmpt\svn_version\svn_version.h || del ..\libopenmpt\svn_version\svn_version.h || true</Command>
- </PreBuildEvent>
- <PostBuildEvent>
- <Command>copy /y ..\bin\$(Platform)\libopenmpt.dll ..\bin\$(Platform)\libmodplug.dll
-</Command>
- </PostBuildEvent>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Test|x64'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Full</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <FloatingPointModel>Fast</FloatingPointModel>
- <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_TEST;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..;../common;../libopenmpt/svn_version;../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
- <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
- <StringPooling>true</StringPooling>
- <WholeProgramOptimization>false</WholeProgramOptimization>
- </ClCompile>
- <Link>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <DelayLoadDLLs>
- </DelayLoadDLLs>
- <SubSystem>Console</SubSystem>
- </Link>
- <PreBuildEvent>
- <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\libopenmpt\svn_version\svn_version.h || del ..\libopenmpt\svn_version\svn_version.h || true</Command>
- </PreBuildEvent>
- <PostBuildEvent />
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">
- <ClCompile>
- <WarningLevel>Level3</WarningLevel>
- <Optimization>Full</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <MultiProcessorCompilation>true</MultiProcessorCompilation>
- <FloatingPointModel>Fast</FloatingPointModel>
<PreprocessorDefinitions>LIBOPENMPT_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..;../common;../libopenmpt/svn_version;../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
@@ -412,13 +142,13 @@
<OptimizeReferences>true</OptimizeReferences>
</Link>
<PreBuildEvent>
- <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\libopenmpt\svn_version\svn_version.h || del ..\libopenmpt\svn_version\svn_version.h || true</Command>
+ <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command>
</PreBuildEvent>
<Lib>
<AdditionalOptions>/ignore:4221 %(AdditionalOptions)</AdditionalOptions>
</Lib>
</ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Full</Optimization>
@@ -427,7 +157,7 @@
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<FloatingPointModel>Fast</FloatingPointModel>
<PreprocessorDefinitions>LIBOPENMPT_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <AdditionalIncludeDirectories>..;../common;../libopenmpt/svn_version;../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
@@ -439,7 +169,7 @@
<OptimizeReferences>true</OptimizeReferences>
</Link>
<PreBuildEvent>
- <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h ..\libopenmpt\svn_version\svn_version.h || del ..\libopenmpt\svn_version\svn_version.h || true</Command>
+ <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command>
</PreBuildEvent>
<Lib>
<AdditionalOptions>/ignore:4221 %(AdditionalOptions)</AdditionalOptions>
@@ -466,8 +196,6 @@
<ClInclude Include="..\common\typedefs.h" />
<ClInclude Include="..\common\version.h" />
<ClInclude Include="..\common\versionNumber.h" />
- <ClInclude Include="..\include\pugixml\src\pugiconfig.hpp" />
- <ClInclude Include="..\include\pugixml\src\pugixml.hpp" />
<ClInclude Include="..\soundlib\AudioReadTarget.h" />
<ClInclude Include="..\soundlib\ChunkReader.h" />
<ClInclude Include="..\soundlib\Dither.h" />
@@ -516,8 +244,6 @@
<ClInclude Include="libopenmpt_impl.hpp" />
<ClInclude Include="libopenmpt_interactive.hpp" />
<ClInclude Include="libopenmpt_internal.h" />
- <ClInclude Include="libopenmpt_settings.h" />
- <ClInclude Include="libopenmpt_settings.hpp" />
<ClInclude Include="libopenmpt_stream_callbacks_fd.h" />
<ClInclude Include="libopenmpt_stream_callbacks_file.h" />
<ClInclude Include="libopenmpt_version.h" />
@@ -533,7 +259,6 @@
<ClCompile Include="..\common\typedefs.cpp" />
<ClCompile Include="..\common\version.cpp" />
<ClCompile Include="..\include\miniz\miniz.c" />
- <ClCompile Include="..\include\pugixml\src\pugixml.cpp" />
<ClCompile Include="..\soundlib\Dither.cpp" />
<ClCompile Include="..\soundlib\Dlsbank.cpp" />
<ClCompile Include="..\soundlib\Fastmix.cpp" />
@@ -605,45 +330,6 @@
<ClCompile Include="libopenmpt_cxx.cpp" />
<ClCompile Include="libopenmpt_impl.cpp" />
<ClCompile Include="libopenmpt_interactive.cpp" />
- <ClCompile Include="libopenmpt_modplug.c">
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='DebugStatic|Win32'">CompileAsC</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'">CompileAsC</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">CompileAsC</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">CompileAsC</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">CompileAsC</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">CompileAsC</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">CompileAsC</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Test|Win32'">CompileAsC</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">CompileAsC</CompileAs>
- <CompileAs Condition="'$(Configuration)|$(Platform)'=='Test|x64'">CompileAsC</CompileAs>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Test|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Test|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStatic|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="libopenmpt_test.cpp" />
- <ClCompile Include="libopenmpt_winamp.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Test|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Test|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStatic|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- </ClCompile>
- <ClCompile Include="libopenmpt_xmplay.cpp">
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Test|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Test|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStatic|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugStatic|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|Win32'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseStatic|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
- <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
- </ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Modified: trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters 2013-12-02 18:04:41 UTC (rev 3354)
+++ trunk/OpenMPT/libopenmpt/libopenmpt.vcxproj.filters 2013-12-03 14:22:11 UTC (rev 3355)
@@ -27,12 +27,6 @@
<Filter Include="Source Files\test">
<UniqueIdentifier>{7e476eee-06d3-440e-89c1-29c78a21daa9}</UniqueIdentifier>
</Filter>
- <Filter Include="Header Files\pugixml">
- <UniqueIdentifier>{d18c2a3b-8a7c-43e4-b77f-b02eaead5d62}</UniqueIdentifier>
- </Filter>
- <Filter Include="Source Files\pugixml">
- <UniqueIdentifier>{c229b22b-065f-42fd-81ee-498a859a7c8d}</UniqueIdentifier>
- </Filter>
<Filter Include="Source Files\miniz">
<UniqueIdentifier>{3800b9bf-c28e-489f-8792-64b1b5a58b40}</UniqueIdentifier>
</Filter>
@@ -215,12 +209,6 @@
<ClInclude Include="..\common\Logging.h">
<Filter>Header Files\common</Filter>
</ClInclude>
- <ClInclude Include="..\include\pugixml\src\pugiconfig.hpp">
- <Filter>Header Files\pugixml</Filter>
- </ClInclude>
- <ClInclude Include="..\include\pugixml\src\pugixml.hpp">
- <Filter>Header Files\pugixml</Filter>
- </ClInclude>
<ClInclude Include="..\soundlib\S3MTools.h">
<Filter>Header Files\soundlib</Filter>
</ClInclude>
@@ -242,12 +230,6 @@
<ClInclude Include="..\soundlib\Tagging.h">
<Filter>Header Files\soundlib</Filter>
</ClInclude>
- <ClInclude Include="libopenmpt_settings.hpp">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="libopenmpt_settings.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="libopenmpt_stream_callbacks_fd.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -472,12 +454,6 @@
<ClCompile Include="..\common\version.cpp">
<Filter>Source Files\common</Filter>
</ClCompile>
- <ClCompile Include="libopenmpt_modplug.c">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="libopenmpt_winamp.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="libopenmpt_c.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -487,9 +463,6 @@
<ClCompile Include="libopenmpt_interactive.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="libopenmpt_xmplay.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\soundlib\Load_digi.cpp">
<Filter>Source Files\soundlib</Filter>
</ClCompile>
@@ -499,15 +472,9 @@
<ClCompile Include="libopenmpt_impl.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="..\include\pugixml\src\pugixml.cpp">
- <Filter>Source Files\pugixml</Filter>
- </ClCompile>
<ClCompile Include="..\soundlib\S3MTools.cpp">
<Filter>Source Files\soundlib</Filter>
</ClCompile>
- <ClCompile Include="libopenmpt_test.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="..\soundlib\Dither.cpp">
<Filter>Source Files\soundlib</Filter>
</ClCompile>
Added: trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj (rev 0)
+++ trunk/OpenMPT/libopenmpt/libopenmptDLL.vcxproj 2013-12-03 14:22:11 UTC (rev 3355)
@@ -0,0 +1,373 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{A1C5B6FA-F333-4999-8DF0-BE2F5FD4B882}</ProjectGuid>
+ <RootNamespace>libopenmptDLL</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <OutDir>..\bin\$(Platform)\</OutDir>
+ <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
+ <TargetName>libopenmpt</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <OutDir>..\bin\$(Platform)\</OutDir>
+ <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
+ <TargetName>libopenmpt</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <OutDir>..\bin\$(Platform)-Debug\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <OutDir>..\bin\$(Platform)-Debug\</OutDir>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
+ <TargetName>libopenmpt</TargetName>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <IntDir>..\build\obj\$(ProjectName)\$(Platform)\$(Configuration)\</IntDir>
+ <TargetName>libopenmpt</TargetName>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <DelayLoadDLLs>
+ </DelayLoadDLLs>
+ </Link>
+ <PreBuildEvent>
+ <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command>
+ </PreBuildEvent>
+ <PostBuildEvent>
+ <Command>
+ </Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <DelayLoadDLLs>
+ </DelayLoadDLLs>
+ </Link>
+ <PreBuildEvent>
+ <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command>
+ </PreBuildEvent>
+ <PostBuildEvent>
+ <Command>
+ </Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Full</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <StringPooling>true</StringPooling>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <DelayLoadDLLs>
+ </DelayLoadDLLs>
+ </Link>
+ <PreBuildEvent>
+ <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command>
+ </PreBuildEvent>
+ <PostBuildEvent>
+ <Command>copy /y ..\bin\$(Platform)\libopenmpt.dll ..\bin\$(Platform)\in_openmpt.dll
+copy /y ..\bin\$(Platform)\libopenmpt.dll ..\bin\$(Platform)\xmp-openmpt.dll
+copy /y ..\bin\$(Platform)\libopenmpt.dll ..\bin\$(Platform)\libmodplug.dll
+</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Full</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ <FloatingPointModel>Fast</FloatingPointModel>
+ <PreprocessorDefinitions>_WINDLL;LIBOPENMPT_BUILD;LIBOPENMPT_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..;../common;$(IntDir);../common/svn_version_default;../include;../include/modplug/include;../include/pugixml/src</AdditionalIncludeDirectories>
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+ <StringPooling>true</StringPooling>
+ <WholeProgramOptimization>false</WholeProgramOptimization>
+ </ClCompile>
+ <Link>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <DelayLoadDLLs>
+ </DelayLoadDLLs>
+ </Link>
+ <PreBuildEvent>
+ <Command>subwcrev .. ..\common\svn_version_subwcrev\svn_version.template.h $(IntDir)svn_version.h || del $(IntDir)svn_version.h || true</Command>
+ </PreBuildEvent>
+ <PostBuildEvent>
+ <Command>copy /y ..\bin\$(Platform)\libopenmpt.dll ..\bin\$(Platform)\libmodplug.dll
+</Command>
+ </PostBuildEvent>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\common\AudioCriticalSection.h" />
+ <ClInclude Include="..\common\BuildSettings.h" />
+ <ClInclude Include="..\common\CompilerDetect.h" />
+ <ClInclude Include="..\common\FlagSet.h" />
+ <ClInclude Include="..\common\Logging.h" />
+ <ClInclude Include="..\common\misc_util.h" />
+ <ClInclude Include="..\common\mptFstream.h" />
+ <ClInclude Include="..\common\mptPathString.h" />
+ <ClInclude Include="..\common\mptString.h" />
+ <ClInclude Include="..\common\mutex.h" />
+ <ClInclude Include="..\common\Profiler.h" />
+ <ClInclude Include="..\common\serialization_utils.h" />
+ <ClInclude Include="..\common\stdafx.h" />
+ <ClInclude Include="..\common\StringFixer.h" />
+ <ClInclude Include="..\common\svn_version_default\svn_version.h" />
+ <ClInclude Include="..\common\svn_version_subwcrev\svn_version.template.h" />
+ <ClInclude Include="..\common\thread.h" />
+ <ClInclude Include="..\common\typedefs.h" />
+ <ClInclude Include="..\common\version.h" />
+ <ClInclude Include="..\common\versionNumber.h" />
+ <ClInclude Include="..\include\pugixml\src\pugiconfig.hpp" />
+ <ClInclude Include="..\include\pugixml\src\pugixml.hpp" />
+ <ClInclude Include="..\soundlib\AudioReadTarget.h" />
+ <ClInclude Include="..\soundlib\ChunkReader.h" />
+ <ClInclude Include="..\soundlib\Dither.h" />
+ <ClInclude Include="..\soundlib\Dlsbank.h" />
+ <ClInclude Include="..\soundlib\Endianness.h" />
+ <ClInclude Include="..\soundlib\FileReader.h" />
+ <ClInclude Include="..\soundlib\ITCompression.h" />
+ <ClInclude Include="..\soundlib\ITTools.h" />
+ <ClInclude Include="..\soundlib\Loaders.h" />
+ <ClInclude Include="..\soundlib\Message.h" />
+ <ClInclude Include="..\soundlib\MIDIEvents.h" />
+ <ClInclude Include="..\soundlib\MIDIMacros.h" />
+ <ClInclude Include="..\soundlib\MixerLoops.h" />
+ <ClInclude Include="..\soundlib\MixerSettings.h" />
+ <ClInclude Include="..\soundlib\ModChannel.h" />
+ <ClInclude Include="..\soundlib\modcommand.h" />
+ <ClInclude Include="..\soundlib\ModInstrument.h" />
+ <ClInclude Include="..\soundlib\ModSample.h" />
+ <ClInclude Include="..\soundlib\ModSequence.h" />
+ <ClInclude Include="..\soundlib\modsmp_ctrl.h" />
+ <ClInclude Include="..\soundlib\mod_specifications.h" />
+ <ClInclude Include="..\soundlib\pattern.h" />
+ <ClInclude Include="..\soundlib\patternContainer.h" />
+ <ClInclude Include="..\soundlib\Resampler.h" />
+ <ClInclude Include="..\soundlib\RowVisitor.h" />
+ <ClInclude Include="..\soundlib\S3MTools.h" />
+ <ClInclude Include="..\soundlib\SampleFormat.h" />
+ <ClInclude Include="..\soundlib\SampleFormatConverters.h" />
+ <ClInclude Include="..\soundlib\SampleIO.h" />
+ <ClInclude Include="..\soundlib\Sndfile.h" />
+ <ClInclude Include="..\soundlib\Snd_defs.h" />
+ <ClInclude Include="..\soundlib\SoundFilePlayConfig.h" />
+ <ClInclude Include="..\soundlib\Tables.h" />
+ <ClInclude Include="..\soundlib\Tagging.h" />
+ <ClInclude Include="..\soundlib\tuning.h" />
+ <ClInclude Include="..\soundlib\tuningbase.h" />
+ <ClInclude Include="..\soundlib\tuningcollection.h" />
+ <ClInclude Include="..\soundlib\Wav.h" />
+ <ClInclude Include="..\soundlib\WAVTools.h" />
+ <ClInclude Include="..\soundlib\WindowedFIR.h" />
+ <ClInclude Include="..\soundlib\XMTools.h" />
+ <ClInclude Include="..\test\test.h" />
+ <ClInclude Include="libopenmpt.h" />
+ <ClInclude Include="libopenmpt.hpp" />
+ <ClInclude Include="libopenmpt_config.h" />
+ <ClInclude Include="libopenmpt_impl.hpp" />
+ <ClInclude Include="libopenmpt_interactive.hpp" />
+ <ClInclude Include="libopenmpt_internal.h" />
+ <ClInclude Include="libopenmpt_settings.h" />
+ <ClInclude Include="libopenmpt_settings.hpp" />
+ <ClInclude Include="libopenmpt_stream_callbacks_fd.h" />
+ <ClInclude Include="libopenmpt_stream_callbacks_file.h" />
+ <ClInclude Include="libopenmpt_version.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\common\AudioCriticalSection.cpp" />
+ <ClCompile Include="..\common\misc_util.cpp" />
+ <ClCompile Include="..\common\mptPathString.cpp" />
+ <ClCompile Include="..\common\mptString.cpp" />
+ <ClCompile Include="..\common\Profiler.cpp" />
+ <ClCompile Include="..\common\serialization_utils.cpp" />
+ <ClCompile Include="..\common\stdafx.cpp" />
+ <ClCompile Include="..\common\typedefs.cpp" />
+ <ClCompile Include="..\common\version.cpp" />
+ <ClCompile Include="..\include\miniz\miniz.c" />
+ <ClCompile Include="..\include\pugixml\src\pugixml.cpp" />
+ <ClCompile Include="..\soundlib\Dither.cpp" />
+ <ClCompile Include="..\soundlib\Dlsbank.cpp" />
+ <ClCompile Include="..\soundlib\Fastmix.cpp" />
+ <ClCompile Include="..\soundlib\ITCompression.cpp" />
+ <ClCompile Include="..\soundlib\ITTools.cpp" />
+ <ClCompile Include="..\soundlib\Load_669.cpp" />
+ <ClCompile Include="..\soundlib\Load_amf.cpp" />
+ <ClCompile Include="..\soundlib\Load_ams.cpp" />
+ <ClCompile Include="..\soundlib\Load_dbm.cpp" />
+ <ClCompile Include="..\soundlib\Load_digi.cpp" />
+ <ClCompile Include="..\soundlib\Load_dmf.cpp" />
+ <ClCompile Include="..\soundlib\Load_dsm.cpp" />
+ <ClCompile Include="..\soundlib\Load_far.cpp" />
+ <ClCompile Include="..\soundlib\Load_gdm.cpp" />
+ <ClCompile Include="..\soundlib\Load_imf.cpp" />
+ <ClCompile Include="..\soundlib\Load_it.cpp" />
+ <ClCompile Include="..\soundlib\Load_itp.cpp" />
+ <ClCompile Include="..\soundlib\load_j2b.cpp" />
+ <ClCompile Include="..\soundlib\Load_mdl.cpp" />
+ <ClCompile Include="..\soundlib\Load_med.cpp" />
+ <ClCompile Include="..\soundlib\Load_mid.cpp" />
+ <ClCompile Include="..\soundlib\Load_mo3.cpp" />
+ <ClCompile Include="..\soundlib\Load_mod.cpp" />
+ <ClCompile Include="..\soundlib\Load_mt2.cpp" />
+ <ClCompile Include="..\soundlib\Load_mtm.cpp" />
+ <ClCompile Include="..\soundlib\Load_okt.cpp" />
+ <ClCompile Include="..\soundlib\Load_psm.cpp" />
+ <ClCompile Include="..\soundlib\Load_ptm.cpp" />
+ <ClCompile Include="..\soundlib\Load_s3m.cpp" />
+ <ClCompile Include="..\soundlib\Load_stm.cpp" />
+ <ClCompile Include="..\soundlib\Load_ult.cpp" />
+ <ClCompile Include="..\soundlib\Load_umx.cpp" />
+ <ClCompile Include="..\soundlib\Load_wav.cpp" />
+ <ClCompile Include="..\soundlib\Load_xm.cpp" />
+ <ClCompile Include="..\soundlib\Message.cpp" />
+ <ClCompile Include="..\soundlib\MIDIEvents.cpp" />
+ <ClCompile Include="..\soundlib\MIDIMacros.cpp" />
+ <ClCompile Include="..\soundlib\MixerLoops.cpp" />
+ <ClCompile Include="..\soundlib\MixerSettings.cpp" />
+ <ClCompile Include="..\soundlib\Mmcmp.cpp" />
+ <ClCompile Include="..\soundlib\ModChannel.cpp" />
+ <ClCompile Include="..\soundlib\modcommand.cpp" />
+ <ClCompile Include="..\soundlib\ModInstrument.cpp" />
+ <ClCompile Include="..\soundlib...
[truncated message content] |
|
From: <man...@us...> - 2013-12-03 15:34:54
|
Revision: 3360
http://sourceforge.net/p/modplug/code/3360
Author: manxorist
Date: 2013-12-03 15:34:47 +0000 (Tue, 03 Dec 2013)
Log Message:
-----------
[Ref] libopenmpt: Merge foo_openmpt.sln into libopenmpt.sln .
[Ref] libopenmpt: Update README regarding in_openmpt and xmp-openmpt.
Modified Paths:
--------------
trunk/OpenMPT/README
trunk/OpenMPT/build/auto/vs2010_libopenmpt_win32.cmd
trunk/OpenMPT/libopenmpt/libopenmpt.sln
Removed Paths:
-------------
trunk/OpenMPT/libopenmpt/foo_openmpt.sln
Modified: trunk/OpenMPT/README
===================================================================
--- trunk/OpenMPT/README 2013-12-03 15:26:50 UTC (rev 3359)
+++ trunk/OpenMPT/README 2013-12-03 15:34:47 UTC (rev 3360)
@@ -38,12 +38,12 @@
Winamp/ from WA5.55_SDK.exe to include/winamp/.
Please visit http://wiki.winamp.com/wiki/Plug-in_Developer to download
the SDK.
- Exclude libopenmpt_winamp.cpp from build to disable.
+ 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.
- Exclude libopenmpt_xmplay.cpp from build to disable.
+ You can disable xmp-openmpt in the solution configuration.
- The openmpt123 solution is in openmpt123/openmpt123.sln.
- Makefile
The makefile resides in openmpt123/Makefile. You should cd into openmpt123
Modified: trunk/OpenMPT/build/auto/vs2010_libopenmpt_win32.cmd
===================================================================
--- trunk/OpenMPT/build/auto/vs2010_libopenmpt_win32.cmd 2013-12-03 15:26:50 UTC (rev 3359)
+++ trunk/OpenMPT/build/auto/vs2010_libopenmpt_win32.cmd 2013-12-03 15:34:47 UTC (rev 3360)
@@ -23,7 +23,6 @@
cd libopenmpt || goto error
devenv libopenmpt.sln /clean "Release|Win32" || goto error
- devenv foo_openmpt.sln /clean "Release|Win32" || goto error
cd .. || goto error
cd openmpt123 || goto error
devenv openmpt123.sln /clean "Release|Win32" || goto error
@@ -31,7 +30,6 @@
cd libopenmpt || goto error
devenv libopenmpt.sln /build "Release|Win32" || goto error
- devenv foo_openmpt.sln /build "Release|Win32" || goto error
cd .. || goto error
cd openmpt123 || goto error
devenv openmpt123.sln /build "Release|Win32" || goto error
Deleted: trunk/OpenMPT/libopenmpt/foo_openmpt.sln
===================================================================
--- trunk/OpenMPT/libopenmpt/foo_openmpt.sln 2013-12-03 15:26:50 UTC (rev 3359)
+++ trunk/OpenMPT/libopenmpt/foo_openmpt.sln 2013-12-03 15:34:47 UTC (rev 3360)
@@ -1,50 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foo_openmpt", "foo_openmpt.vcxproj", "{3F14BF17-016A-44C3-9B8D-C875C2EC8A18}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foobar2000_SDK", "..\include\foobar2000sdk\foobar2000\SDK\foobar2000_SDK.vcxproj", "{E8091321-D79D-4575-86EF-064EA1A4A20D}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foobar2000_component_client", "..\include\foobar2000sdk\foobar2000\foobar2000_component_client\foobar2000_component_client.vcxproj", "{71AD2674-065B-48F5-B8B0-E1F9D3892081}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foobar2000_sdk_helpers", "..\include\foobar2000sdk\foobar2000\helpers\foobar2000_sdk_helpers.vcxproj", "{EE47764E-A202-4F85-A767-ABDAB4AFF35F}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pfc", "..\include\foobar2000sdk\pfc\pfc.vcxproj", "{EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libopenmpt", "libopenmpt.vcxproj", "{812A654D-99BE-4D13-B97F-86332AD3E363}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {3F14BF17-016A-44C3-9B8D-C875C2EC8A18}.Debug|Win32.ActiveCfg = Debug|Win32
- {3F14BF17-016A-44C3-9B8D-C875C2EC8A18}.Debug|Win32.Build.0 = Debug|Win32
- {3F14BF17-016A-44C3-9B8D-C875C2EC8A18}.Release|Win32.ActiveCfg = Release|Win32
- {3F14BF17-016A-44C3-9B8D-C875C2EC8A18}.Release|Win32.Build.0 = Release|Win32
- {E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|Win32.ActiveCfg = Debug|Win32
- {E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|Win32.Build.0 = Debug|Win32
- {E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|Win32.ActiveCfg = Release|Win32
- {E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|Win32.Build.0 = Release|Win32
- {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|Win32.ActiveCfg = Debug|Win32
- {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|Win32.Build.0 = Debug|Win32
- {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|Win32.ActiveCfg = Release|Win32
- {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|Win32.Build.0 = Release|Win32
- {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|Win32.ActiveCfg = Debug|Win32
- {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|Win32.Build.0 = Debug|Win32
- {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|Win32.ActiveCfg = Release|Win32
- {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|Win32.Build.0 = Release|Win32
- {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|Win32.ActiveCfg = Debug|Win32
- {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|Win32.Build.0 = Debug|Win32
- {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|Win32.ActiveCfg = Release|Win32
- {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|Win32.Build.0 = Release|Win32
- {812A654D-99BE-4D13-B97F-86332AD3E363}.Debug|Win32.ActiveCfg = Debug|Win32
- {812A654D-99BE-4D13-B97F-86332AD3E363}.Debug|Win32.Build.0 = Debug|Win32
- {812A654D-99BE-4D13-B97F-86332AD3E363}.Release|Win32.ActiveCfg = Release|Win32
- {812A654D-99BE-4D13-B97F-86332AD3E363}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
Modified: trunk/OpenMPT/libopenmpt/libopenmpt.sln
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt.sln 2013-12-03 15:26:50 UTC (rev 3359)
+++ trunk/OpenMPT/libopenmpt/libopenmpt.sln 2013-12-03 15:34:47 UTC (rev 3360)
@@ -16,6 +16,16 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libopenmpt_modplug", "libopenmpt_modplug.vcxproj", "{78C5DE5D-62BA-41EB-9A70-AE9C20536450}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pfc", "..\include\foobar2000sdk\pfc\pfc.vcxproj", "{EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foobar2000_SDK", "..\include\foobar2000sdk\foobar2000\SDK\foobar2000_SDK.vcxproj", "{E8091321-D79D-4575-86EF-064EA1A4A20D}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foobar2000_sdk_helpers", "..\include\foobar2000sdk\foobar2000\helpers\foobar2000_sdk_helpers.vcxproj", "{EE47764E-A202-4F85-A767-ABDAB4AFF35F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foobar2000_component_client", "..\include\foobar2000sdk\foobar2000\foobar2000_component_client\foobar2000_component_client.vcxproj", "{71AD2674-065B-48F5-B8B0-E1F9D3892081}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foo_openmpt", "foo_openmpt.vcxproj", "{3F14BF17-016A-44C3-9B8D-C875C2EC8A18}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -66,6 +76,36 @@
{78C5DE5D-62BA-41EB-9A70-AE9C20536450}.Release|Win32.Build.0 = Release|Win32
{78C5DE5D-62BA-41EB-9A70-AE9C20536450}.Release|x64.ActiveCfg = Release|x64
{78C5DE5D-62BA-41EB-9A70-AE9C20536450}.Release|x64.Build.0 = Release|x64
+ {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|Win32.Build.0 = Debug|Win32
+ {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|x64.ActiveCfg = Debug|x64
+ {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|Win32.ActiveCfg = Release|Win32
+ {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|Win32.Build.0 = Release|Win32
+ {EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|x64.ActiveCfg = Release|x64
+ {E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|Win32.ActiveCfg = Debug|Win32
+ {E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|Win32.Build.0 = Debug|Win32
+ {E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|x64.ActiveCfg = Debug|x64
+ {E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|Win32.ActiveCfg = Release|Win32
+ {E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|Win32.Build.0 = Release|Win32
+ {E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|x64.ActiveCfg = Release|x64
+ {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|Win32.Build.0 = Debug|Win32
+ {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|x64.ActiveCfg = Debug|x64
+ {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|Win32.ActiveCfg = Release|Win32
+ {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|Win32.Build.0 = Release|Win32
+ {EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|x64.ActiveCfg = Release|x64
+ {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|Win32.ActiveCfg = Debug|Win32
+ {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|Win32.Build.0 = Debug|Win32
+ {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|x64.ActiveCfg = Debug|x64
+ {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|Win32.ActiveCfg = Release|Win32
+ {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|Win32.Build.0 = Release|Win32
+ {71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|x64.ActiveCfg = Release|x64
+ {3F14BF17-016A-44C3-9B8D-C875C2EC8A18}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3F14BF17-016A-44C3-9B8D-C875C2EC8A18}.Debug|Win32.Build.0 = Debug|Win32
+ {3F14BF17-016A-44C3-9B8D-C875C2EC8A18}.Debug|x64.ActiveCfg = Debug|Win32
+ {3F14BF17-016A-44C3-9B8D-C875C2EC8A18}.Release|Win32.ActiveCfg = Release|Win32
+ {3F14BF17-016A-44C3-9B8D-C875C2EC8A18}.Release|Win32.Build.0 = Release|Win32
+ {3F14BF17-016A-44C3-9B8D-C875C2EC8A18}.Release|x64.ActiveCfg = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2013-12-03 21:30:36
|
Revision: 3363
http://sourceforge.net/p/modplug/code/3363
Author: saga-games
Date: 2013-12-03 21:30:28 +0000 (Tue, 03 Dec 2013)
Log Message:
-----------
[Fix] Some plugins could produce a crash when using the buffer clearing option in export (tx coda)
[Fix] Menu captions were broken since r3340 (IDR_MAINFRAME contains a menu, so shouldn't be assigned to moddoc template)
[Mod] OpenMPT: Version is now 1.22.07.06
Revision Links:
--------------
http://sourceforge.net/p/modplug/code/3340
Modified Paths:
--------------
trunk/OpenMPT/common/versionNumber.h
trunk/OpenMPT/mptrack/InputHandler.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/mptrack.rc
trunk/OpenMPT/soundlib/plugins/PluginMixBuffer.h
Modified: trunk/OpenMPT/common/versionNumber.h
===================================================================
--- trunk/OpenMPT/common/versionNumber.h 2013-12-03 16:05:11 UTC (rev 3362)
+++ trunk/OpenMPT/common/versionNumber.h 2013-12-03 21:30:28 UTC (rev 3363)
@@ -17,7 +17,7 @@
#define VER_MAJORMAJOR 1
#define VER_MAJOR 22
#define VER_MINOR 07
-#define VER_MINORMINOR 05
+#define VER_MINORMINOR 06
//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/InputHandler.cpp
===================================================================
--- trunk/OpenMPT/mptrack/InputHandler.cpp 2013-12-03 16:05:11 UTC (rev 3362)
+++ trunk/OpenMPT/mptrack/InputHandler.cpp 2013-12-03 21:30:28 UTC (rev 3363)
@@ -489,81 +489,73 @@
CString CInputHandler::GetMenuText(UINT id)
//-----------------------------------------
{
- CString s;
+ const TCHAR *s;
CommandID c = kcNull;
switch(id)
{
- case FILENEW: s="&New\t"; c = kcFileNew; break;
- case ID_FILE_OPEN: s="&Open...\t"; c = kcFileOpen; break;
+ case FILENEW: s = _T("&New\t"); c = kcFileNew; break;
+ case ID_FILE_OPEN: s = _T("&Open...\t"); c = kcFileOpen; break;
case ID_FILE_OPENTEMPLATE: return "Open &Template\t";
- case ID_FILE_CLOSE: s="&Close\t"; c = kcFileClose; break;
- case ID_FILE_CLOSEALL: s="C&lose All\t"; c = kcFileCloseAll; break;
- case ID_FILE_SAVE: s="&Save\t"; c = kcFileSave; break;
- case ID_FILE_SAVE_AS: s="Save &As...\t"; c = kcFileSaveAs; break;
- case ID_FILE_SAVEASTEMPLATE:s="Sa&ve as Template\t"; c = kcFileSaveTemplate; break;
- case ID_FILE_SAVEASWAVE: s="Export as lossless (&Wave, FLAC)...\t"; c = kcFileSaveAsWave; break;
- case ID_FILE_SAVEASMP3: s="Export as lossy (Opus, Vorbis, M&P3)...\t"; c = kcFileSaveAsMP3; break;
- case ID_FILE_SAVEMIDI: s="Export as M&IDI...\t"; c = kcFileSaveMidi; break;
- case ID_FILE_SAVECOMPAT: s="Compatibility &Export...\t"; c = kcFileExportCompat; break;
- case ID_IMPORT_MIDILIB: s="Import &MIDI Library...\t"; c = kcFileImportMidiLib; break;
- case ID_ADD_SOUNDBANK: s="Add Sound &Bank...\t"; c = kcFileAddSoundBank; break;
+ case ID_FILE_CLOSE: s = _T("&Close\t"); c = kcFileClose; break;
+ case ID_FILE_CLOSEALL: s = _T("C&lose All\t"); c = kcFileCloseAll; break;
+ case ID_FILE_SAVE: s = _T("&Save\t"); c = kcFileSave; break;
+ case ID_FILE_SAVE_AS: s = _T("Save &As...\t"); c = kcFileSaveAs; break;
+ case ID_FILE_SAVEASTEMPLATE:s = _T("Sa&ve as Template\t"); c = kcFileSaveTemplate; break;
+ case ID_FILE_SAVEASWAVE: s = _T("Export as lossless (&Wave, FLAC)...\t"); c = kcFileSaveAsWave; break;
+ case ID_FILE_SAVEASMP3: s = _T("Export as lossy (Opus, Vorbis, M&P3)...\t"); c = kcFileSaveAsMP3; break;
+ case ID_FILE_SAVEMIDI: s = _T("Export as M&IDI...\t"); c = kcFileSaveMidi; break;
+ case ID_FILE_SAVECOMPAT: s = _T("Compatibility &Export...\t"); c = kcFileExportCompat; break;
+ case ID_IMPORT_MIDILIB: s = _T("Import &MIDI Library...\t"); c = kcFileImportMidiLib; break;
+ case ID_ADD_SOUNDBANK: s = _T("Add Sound &Bank...\t"); c = kcFileAddSoundBank; break;
- case ID_PLAYER_PLAY: s="Pause / &Resume\t"; c = kcPlayPauseSong; break;
- case ID_PLAYER_PLAYFROMSTART: s="&Play from Start\t"; c = kcPlaySongFromStart; break;
- case ID_PLAYER_STOP: s="&Stop\t"; c = kcStopSong; break;
- case ID_PLAYER_PAUSE: s="P&ause\t"; c = kcPauseSong; break;
- case ID_MIDI_RECORD: s="&MIDI Record\t"; c = kcMidiRecord; break;
- case ID_ESTIMATESONGLENGTH: s="&Estimate Song Length\t"; c = kcEstimateSongLength; break;
- case ID_APPROX_BPM: s="Approx. real &BPM\t"; c = kcApproxRealBPM; break;
+ case ID_PLAYER_PLAY: s = _T("Pause / &Resume\t"); c = kcPlayPauseSong; break;
+ case ID_PLAYER_PLAYFROMSTART: s = _T("&Play from Start\t"); c = kcPlaySongFromStart; break;
+ case ID_PLAYER_STOP: s = _T("&Stop\t"); c = kcStopSong; break;
+ case ID_PLAYER_PAUSE: s = _T("P&ause\t"); c = kcPauseSong; break;
+ case ID_MIDI_RECORD: s = _T("&MIDI Record\t"); c = kcMidiRecord; break;
+ case ID_ESTIMATESONGLENGTH: s = _T("&Estimate Song Length\t"); c = kcEstimateSongLength; break;
+ case ID_APPROX_BPM: s = _T("Approx. real &BPM\t"); c = kcApproxRealBPM; break;
- case ID_EDIT_UNDO: s="&Undo\t"; c = kcEditUndo; break;
- case ID_EDIT_CUT: s="Cu&t\t"; c = kcEditCut; break;
- case ID_EDIT_COPY: s="&Copy\t"; c = kcEditCopy; break;
- case ID_EDIT_PASTE: s="&Paste\t"; c = kcEditPaste; break;
- case ID_EDIT_SELECT_ALL: s="Select &All\t"; c = kcEditSelectAll; break;
- case ID_EDIT_CLEANUP: s="C&leanup"; break;
- case ID_EDIT_FIND: s="&Find / Replace\t"; c = kcEditFind; break;
- case ID_EDIT_FINDNEXT: s="Find &Next\t"; c = kcEditFindNext; break;
- case ID_EDIT_GOTO_MENU: s="&Goto\t"; c = kcPatternGoto; break;
- case ID_EDIT_SPLITKEYBOARDSETTINGS: s="Split &Keyboard Settings\t"; c = kcShowSplitKeyboardSettings; break;
+ case ID_EDIT_UNDO: s = _T("&Undo\t"); c = kcEditUndo; break;
+ case ID_EDIT_CUT: s = _T("Cu&t\t"); c = kcEditCut; break;
+ case ID_EDIT_COPY: s = _T("&Copy\t"); c = kcEditCopy; break;
+ case ID_EDIT_PASTE: s = _T("&Paste\t"); c = kcEditPaste; break;
+ case ID_EDIT_SELECT_ALL: s = _T("Select &All\t"); c = kcEditSelectAll; break;
+ case ID_EDIT_CLEANUP: s = _T("C&leanup"); break;
+ case ID_EDIT_FIND: s = _T("&Find / Replace\t"); c = kcEditFind; break;
+ case ID_EDIT_FINDNEXT: s = _T("Find &Next\t"); c = kcEditFindNext; break;
+ case ID_EDIT_GOTO_MENU: s = _T("&Goto\t"); c = kcPatternGoto; break;
+ case ID_EDIT_SPLITKEYBOARDSETTINGS: s = _T("Split &Keyboard Settings\t"); c = kcShowSplitKeyboardSettings; break;
// "Paste Special" sub menu
- case ID_EDIT_PASTE_SPECIAL: s="&Mix Paste\t"; c = kcEditMixPaste; break;
- case ID_EDIT_MIXPASTE_ITSTYLE: s="M&ix Paste (IT Style)\t"; c = kcEditMixPasteITStyle; break;
- case ID_EDIT_PASTEFLOOD: s="Paste Fl&ood\t"; c = kcEditPasteFlood; break;
- case ID_EDIT_PUSHFORWARDPASTE: s="&Push Forward Paste (Insert)\t"; c = kcEditPushForwardPaste; break;
+ case ID_EDIT_PASTE_SPECIAL: s = _T("&Mix Paste\t"); c = kcEditMixPaste; break;
+ case ID_EDIT_MIXPASTE_ITSTYLE: s = _T("M&ix Paste (IT Style)\t"); c = kcEditMixPasteITStyle; break;
+ case ID_EDIT_PASTEFLOOD: s = _T("Paste Fl&ood\t"); c = kcEditPasteFlood; break;
+ case ID_EDIT_PUSHFORWARDPASTE: s = _T("&Push Forward Paste (Insert)\t"); c = kcEditPushForwardPaste; break;
- case ID_VIEW_GLOBALS: s="&General\t"; c = kcViewGeneral; break;
- case ID_VIEW_SAMPLES: s="&Samples\t"; c = kcViewSamples; break;
- case ID_VIEW_PATTERNS: s="&Patterns\t"; c = kcViewPattern; break;
- case ID_VIEW_INSTRUMENTS: s="&Instruments\t"; c = kcViewInstruments; break;
- case ID_VIEW_COMMENTS: s="&Comments\t"; c = kcViewComments; break;
- case ID_VIEW_GRAPH: s="G&raph\t"; c = kcViewGraph; break; //rewbs.graph
- case MAINVIEW: s="&Main\t"; c = kcViewMain; break;
- case IDD_TREEVIEW: s="&Tree\t"; c = kcViewTree; break;
- case ID_VIEW_OPTIONS: s="S&etup...\t"; c = kcViewOptions; break;
- case ID_HELP: s="&Help"; c = kcHelp; break;
- case ID_PLUGIN_SETUP: s="Pl&ugin Manager...\t"; c = kcViewAddPlugin; break;
- case ID_CHANNEL_MANAGER: s="Ch&annel Manager...\t"; c = kcViewChannelManager; break;
- case ID_CLIPBOARD_MANAGER: s="C&lipboard Manager...\t"; c = kcToggleClipboardManager; break;
- case ID_VIEW_SONGPROPERTIES:s="Song P&roperties...\t"; c = kcViewSongProperties; break; //rewbs.graph
- case ID_VIEW_MIDIMAPPING: s="&MIDI Mapping...\t"; c = kcViewMIDImapping; break;
- case ID_VIEW_EDITHISTORY: s="Edit &History...\t"; c = kcViewEditHistory; break;
+ case ID_VIEW_GLOBALS: s = _T("&General\t"); c = kcViewGeneral; break;
+ case ID_VIEW_SAMPLES: s = _T("&Samples\t"); c = kcViewSamples; break;
+ case ID_VIEW_PATTERNS: s = _T("&Patterns\t"); c = kcViewPattern; break;
+ case ID_VIEW_INSTRUMENTS: s = _T("&Instruments\t"); c = kcViewInstruments; break;
+ case ID_VIEW_COMMENTS: s = _T("&Comments\t"); c = kcViewComments; break;
+ case ID_VIEW_GRAPH: s = _T("G&raph\t"); c = kcViewGraph; break; //rewbs.graph
+ case MAINVIEW: s = _T("&Main\t"); c = kcViewMain; break;
+ case IDD_TREEVIEW: s = _T("&Tree\t"); c = kcViewTree; break;
+ case ID_VIEW_OPTIONS: s = _T("S&etup...\t"); c = kcViewOptions; break;
+ case ID_HELP: s = _T("&Help"); c = kcHelp; break;
+ case ID_PLUGIN_SETUP: s = _T("Pl&ugin Manager...\t"); c = kcViewAddPlugin; break;
+ case ID_CHANNEL_MANAGER: s = _T("Ch&annel Manager...\t"); c = kcViewChannelManager; break;
+ case ID_CLIPBOARD_MANAGER: s = _T("C&lipboard Manager...\t"); c = kcToggleClipboardManager; break;
+ case ID_VIEW_SONGPROPERTIES:s = _T("Song P&roperties...\t"); c = kcViewSongProperties; break; //rewbs.graph
+ case ID_VIEW_MIDIMAPPING: s = _T("&MIDI Mapping...\t"); c = kcViewMIDImapping; break;
+ case ID_VIEW_EDITHISTORY: s = _T("Edit &History...\t"); c = kcViewEditHistory; break;
// Help submenu:
- case ID_EXAMPLE_MODULES: return "&Example Modules\t";
+ case ID_EXAMPLE_MODULES: return _T("&Example Modules\t");
- /*
- case ID_WINDOW_NEW: s="&New Window\t"; c=kcWindowNew; break;
- case ID_WINDOW_CASCADE: s="&Cascade\t"; c=kcWindowCascade; break;
- case ID_WINDOW_TILE_HORZ: s="Tile &Horizontal\t"; c=kcWindowTileHorz; break;
- case ID_WINDOW_TILE_VERT: s="Tile &Vertical\t"; c=kcWindowTileVert; break;
- */
- default: return "Unknown Item.";
+ default: return _T("Unknown Item.");
}
- s += GetKeyTextFromCommand(c);
-
- return s;
+ return s + GetKeyTextFromCommand(c);
}
@@ -622,14 +614,6 @@
pMenu->ModifyMenu(ID_VIEW_SONGPROPERTIES, MF_BYCOMMAND | MF_STRING, ID_VIEW_SONGPROPERTIES, GetMenuText(ID_VIEW_SONGPROPERTIES));
pMenu->ModifyMenu(ID_VIEW_MIDIMAPPING, MF_BYCOMMAND | MF_STRING, ID_VIEW_MIDIMAPPING, GetMenuText(ID_VIEW_MIDIMAPPING));
pMenu->ModifyMenu(ID_HELP, MF_BYCOMMAND | MF_STRING, ID_HELP, GetMenuText(ID_HELP));
-/*
- pMenu->ModifyMenu(ID_WINDOW_NEW, MF_BYCOMMAND | MF_STRING, ID_WINDOW_NEW, GetMenuText(ID_WINDOW_NEW));
- pMenu->ModifyMenu(ID_WINDOW_CASCADE, MF_BYCOMMAND | MF_STRING, ID_WINDOW_CASCADE, GetMenuText(ID_WINDOW_CASCADE));
- pMenu->ModifyMenu(ID_WINDOW_TILE_HORZ, MF_BYCOMMAND | MF_STRING, ID_WINDOW_TILE_HORZ, GetMenuText(ID_WINDOW_TILE_HORZ));
- pMenu->ModifyMenu(ID_WINDOW_TILE_VERT, MF_BYCOMMAND | MF_STRING, ID_WINDOW_TILE_VERT, GetMenuText(ID_WINDOW_TILE_VERT));
-*/
-
-
}
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2013-12-03 16:05:11 UTC (rev 3362)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2013-12-03 21:30:28 UTC (rev 3363)
@@ -809,7 +809,7 @@
// Register document templates
m_pModTemplate = new CModDocTemplate(
- IDR_MAINFRAME,
+ IDR_MODULETYPE,
RUNTIME_CLASS(CModDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CModControlView));
Modified: trunk/OpenMPT/mptrack/mptrack.rc
===================================================================
--- trunk/OpenMPT/mptrack/mptrack.rc 2013-12-03 16:05:11 UTC (rev 3362)
+++ trunk/OpenMPT/mptrack/mptrack.rc 2013-12-03 21:30:28 UTC (rev 3363)
@@ -390,6 +390,15 @@
END
#endif // APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDR_MODULETYPE ICON "res\\moddoc.ico"
#endif // German (Germany) resources
/////////////////////////////////////////////////////////////////////////////
@@ -1863,6 +1872,15 @@
#endif // APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+IDR_MAINFRAME ICON "res\\mptrack.ico"
+
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
@@ -1901,15 +1919,6 @@
/////////////////////////////////////////////////////////////////////////////
//
-// Icon
-//
-
-// Icon with lowest ID value placed first to ensure application icon
-// remains consistent on all systems.
-IDR_MAINFRAME ICON "res\\mptrack.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
// Bitmap
//
Modified: trunk/OpenMPT/soundlib/plugins/PluginMixBuffer.h
===================================================================
--- trunk/OpenMPT/soundlib/plugins/PluginMixBuffer.h 2013-12-03 16:05:11 UTC (rev 3362)
+++ trunk/OpenMPT/soundlib/plugins/PluginMixBuffer.h 2013-12-03 21:30:28 UTC (rev 3363)
@@ -106,12 +106,12 @@
return true;
}
- // Silence all output buffers.
+ // Silence all input buffers.
void ClearInputBuffers(size_t numSamples)
//---------------------------------------
{
ASSERT(numSamples <= bufferSize);
- for(size_t i = 0; i < outputs; i++)
+ for(size_t i = 0; i < inputs; i++)
{
memset(inputsArray[i], 0, numSamples * sizeof(buffer_t));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2013-12-04 14:49:04
|
Revision: 3365
http://sourceforge.net/p/modplug/code/3365
Author: manxorist
Date: 2013-12-04 14:48:57 +0000 (Wed, 04 Dec 2013)
Log Message:
-----------
[Fix] Iconv on MacOS X does not handle wchar_t if no locale is set. Work-around it by using UTF[32|16]-[LE|BE] directly.
Modified Paths:
--------------
trunk/OpenMPT/common/mptString.cpp
trunk/OpenMPT/openmpt123/Makefile.config.macosx
Modified: trunk/OpenMPT/common/mptString.cpp
===================================================================
--- trunk/OpenMPT/common/mptString.cpp 2013-12-03 21:39:21 UTC (rev 3364)
+++ trunk/OpenMPT/common/mptString.cpp 2013-12-04 14:48:57 UTC (rev 3365)
@@ -102,6 +102,37 @@
}
return 0;
}
+static const char * Charset_wchar_t()
+{
+ #if !defined(MPT_ICONV_NO_WCHAR)
+ return "wchar_t";
+ #else // MPT_ICONV_NO_WCHAR
+ // iconv on OSX does not handle wchar_t if no locale is set
+ STATIC_ASSERT(sizeof(wchar_t) == 2 || sizeof(wchar_t) == 4);
+ if(sizeof(wchar_t) == 2)
+ {
+ // "UTF-16" generates BOM
+ #if defined(MPT_PLATFORM_LITTLE_ENDIAN)
+ return "UTF-16LE";
+ #elif defined(MPT_PLATFORM_BIG_ENDIAN)
+ return "UTF-16BE";
+ #else
+ STATIC_ASSERT(false);
+ #endif
+ } else if(sizeof(wchar_t) == 4)
+ {
+ // "UTF-32" generates BOM
+ #if defined(MPT_PLATFORM_LITTLE_ENDIAN)
+ return "UTF-32LE";
+ #elif defined(MPT_PLATFORM_BIG_ENDIAN)
+ return "UTF-32BE";
+ #else
+ STATIC_ASSERT(false);
+ #endif
+ }
+ return "";
+ #endif // !MPT_ICONV_NO_WCHAR | MPT_ICONV_NO_WCHAR
+}
#endif // WIN32
@@ -122,10 +153,10 @@
return reinterpret_cast<const typename Tdststring::value_type*>(&encoded_string[0]);
#else // !WIN32
iconv_t conv = iconv_t();
- conv = iconv_open(CharsetToStringTranslit(charset), "wchar_t");
+ conv = iconv_open(CharsetToStringTranslit(charset), Charset_wchar_t());
if(!conv)
{
- conv = iconv_open(CharsetToString(charset), "wchar_t");
+ conv = iconv_open(CharsetToString(charset), Charset_wchar_t());
if(!conv)
{
throw std::runtime_error("iconv conversion not working");
@@ -178,7 +209,7 @@
return &decoded_string[0];
#else // !WIN32
iconv_t conv = iconv_t();
- conv = iconv_open("wchar_t", CharsetToString(charset));
+ conv = iconv_open(Charset_wchar_t(), CharsetToString(charset));
if(!conv)
{
throw std::runtime_error("iconv conversion not working");
Modified: trunk/OpenMPT/openmpt123/Makefile.config.macosx
===================================================================
--- trunk/OpenMPT/openmpt123/Makefile.config.macosx 2013-12-03 21:39:21 UTC (rev 3364)
+++ trunk/OpenMPT/openmpt123/Makefile.config.macosx 2013-12-04 14:48:57 UTC (rev 3365)
@@ -2,5 +2,6 @@
include Makefile.config.defaults
LDLIBS += -liconv
+CPPFLAGS += -DMPT_ICONV_NO_WCHAR
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-04 15:07:12
|
Revision: 3368
http://sourceforge.net/p/modplug/code/3368
Author: manxorist
Date: 2013-12-04 15:07:04 +0000 (Wed, 04 Dec 2013)
Log Message:
-----------
[Fix] libopenmpt: Add a compile time option MPT_CHARSET_CPP which uses pure c++ instead of iconv or Win32 for doing character encoding conversions. Iconv on MacOS X does not work if no C locale is set and thus is unusable in a library. Instead, we now implement locale-char conversions via the std::locale codecvt facet (trying "", global(), classic() and raw-Ascii locales in that order). For conversion to UTF-8, the C++11 std::codecvt_utf8 is used. All other conversions are either implemented directly or done via a standard 1:1 codepoint mapping table (i.e. no similarity substitutions are done). As this implementation depends on C++11 features, it is for now only used on MacOS X. Windows continues to use WINAPI for conversion and other unices continue to use iconv.
Modified Paths:
--------------
trunk/OpenMPT/common/mptString.cpp
trunk/OpenMPT/openmpt123/Makefile.config.macosx
Modified: trunk/OpenMPT/common/mptString.cpp
===================================================================
--- trunk/OpenMPT/common/mptString.cpp 2013-12-04 14:51:16 UTC (rev 3367)
+++ trunk/OpenMPT/common/mptString.cpp 2013-12-04 15:07:04 UTC (rev 3368)
@@ -10,7 +10,11 @@
#include "stdafx.h"
#include "mptString.h"
+#if defined(MPT_CHARSET_CPP)
+#include <codecvt>
+#endif
#include <iomanip>
+#include <iterator>
#include <locale>
#include <sstream>
#include <string>
@@ -19,7 +23,7 @@
#include <cstdarg>
-#if !defined(WIN32)
+#if !defined(MPT_CHARSET_CPP) && !defined(WIN32)
#include <iconv.h>
#endif // !WIN32
@@ -58,7 +62,365 @@
#endif
-#if defined(WIN32)
+
+#if defined(MPT_CHARSET_CPP)
+
+/*
+default 1:1 mapping
+static const uint32 CharsetTableISO8859_1[256] = {
+ 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000a,0x000b,0x000c,0x000d,0x000e,0x000f,
+ 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001a,0x001b,0x001c,0x001d,0x001e,0x001f,
+ 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,0x0029,0x002a,0x002b,0x002c,0x002d,0x002e,0x002f,
+ 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003a,0x003b,0x003c,0x003d,0x003e,0x003f,
+ 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004a,0x004b,0x004c,0x004d,0x004e,0x004f,
+ 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005a,0x005b,0x005c,0x005d,0x005e,0x005f,
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006a,0x006b,0x006c,0x006d,0x006e,0x006f,
+ 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007a,0x007b,0x007c,0x007d,0x007e,0x007f,
+ 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008a,0x008b,0x008c,0x008d,0x008e,0x008f,
+ 0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009a,0x009b,0x009c,0x009d,0x009e,0x009f,
+ 0x00a0,0x00a1,0x00a2,0x00a3,0x00a4,0x00a5,0x00a6,0x00a7,0x00a8,0x00a9,0x00aa,0x00ab,0x00ac,0x00ad,0x00ae,0x00af,
+ 0x00b0,0x00b1,0x00b2,0x00b3,0x00b4,0x00b5,0x00b6,0x00b7,0x00b8,0x00b9,0x00ba,0x00bb,0x00bc,0x00bd,0x00be,0x00bf,
+ 0x00c0,0x00c1,0x00c2,0x00c3,0x00c4,0x00c5,0x00c6,0x00c7,0x00c8,0x00c9,0x00ca,0x00cb,0x00cc,0x00cd,0x00ce,0x00cf,
+ 0x00d0,0x00d1,0x00d2,0x00d3,0x00d4,0x00d5,0x00d6,0x00d7,0x00d8,0x00d9,0x00da,0x00db,0x00dc,0x00dd,0x00de,0x00df,
+ 0x00e0,0x00e1,0x00e2,0x00e3,0x00e4,0x00e5,0x00e6,0x00e7,0x00e8,0x00e9,0x00ea,0x00eb,0x00ec,0x00ed,0x00ee,0x00ef,
+ 0x00f0,0x00f1,0x00f2,0x00f3,0x00f4,0x00f5,0x00f6,0x00f7,0x00f8,0x00f9,0x00fa,0x00fb,0x00fc,0x00fd,0x00fe,0x00ff
+};
+*/
+
+static const uint32 CharsetTableISO8859_15[256] = {
+ 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000a,0x000b,0x000c,0x000d,0x000e,0x000f,
+ 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001a,0x001b,0x001c,0x001d,0x001e,0x001f,
+ 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,0x0029,0x002a,0x002b,0x002c,0x002d,0x002e,0x002f,
+ 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003a,0x003b,0x003c,0x003d,0x003e,0x003f,
+ 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004a,0x004b,0x004c,0x004d,0x004e,0x004f,
+ 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005a,0x005b,0x005c,0x005d,0x005e,0x005f,
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006a,0x006b,0x006c,0x006d,0x006e,0x006f,
+ 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007a,0x007b,0x007c,0x007d,0x007e,0x007f,
+ 0x0080,0x0081,0x0082,0x0083,0x0084,0x0085,0x0086,0x0087,0x0088,0x0089,0x008a,0x008b,0x008c,0x008d,0x008e,0x008f,
+ 0x0090,0x0091,0x0092,0x0093,0x0094,0x0095,0x0096,0x0097,0x0098,0x0099,0x009a,0x009b,0x009c,0x009d,0x009e,0x009f,
+ 0x00a0,0x00a1,0x00a2,0x00a3,0x20ac,0x00a5,0x0160,0x00a7,0x0161,0x00a9,0x00aa,0x00ab,0x00ac,0x00ad,0x00ae,0x00af,
+ 0x00b0,0x00b1,0x00b2,0x00b3,0x017d,0x00b5,0x00b6,0x00b7,0x017e,0x00b9,0x00ba,0x00bb,0x0152,0x0153,0x0178,0x00bf,
+ 0x00c0,0x00c1,0x00c2,0x00c3,0x00c4,0x00c5,0x00c6,0x00c7,0x00c8,0x00c9,0x00ca,0x00cb,0x00cc,0x00cd,0x00ce,0x00cf,
+ 0x00d0,0x00d1,0x00d2,0x00d3,0x00d4,0x00d5,0x00d6,0x00d7,0x00d8,0x00d9,0x00da,0x00db,0x00dc,0x00dd,0x00de,0x00df,
+ 0x00e0,0x00e1,0x00e2,0x00e3,0x00e4,0x00e5,0x00e6,0x00e7,0x00e8,0x00e9,0x00ea,0x00eb,0x00ec,0x00ed,0x00ee,0x00ef,
+ 0x00f0,0x00f1,0x00f2,0x00f3,0x00f4,0x00f5,0x00f6,0x00f7,0x00f8,0x00f9,0x00fa,0x00fb,0x00fc,0x00fd,0x00fe,0x00ff
+};
+
+static const uint32 CharsetTableWindows1252[256] = {
+ 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000a,0x000b,0x000c,0x000d,0x000e,0x000f,
+ 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001a,0x001b,0x001c,0x001d,0x001e,0x001f,
+ 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,0x0029,0x002a,0x002b,0x002c,0x002d,0x002e,0x002f,
+ 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003a,0x003b,0x003c,0x003d,0x003e,0x003f,
+ 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004a,0x004b,0x004c,0x004d,0x004e,0x004f,
+ 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005a,0x005b,0x005c,0x005d,0x005e,0x005f,
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006a,0x006b,0x006c,0x006d,0x006e,0x006f,
+ 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007a,0x007b,0x007c,0x007d,0x007e,0x007f,
+ 0x20ac,0x0081,0x201a,0x0192,0x201e,0x2026,0x2020,0x2021,0x02c6,0x2030,0x0160,0x2039,0x0152,0x008d,0x017d,0x008f,
+ 0x0090,0x2018,0x2019,0x201c,0x201d,0x2022,0x2013,0x2014,0x02dc,0x2122,0x0161,0x203a,0x0153,0x009d,0x017e,0x0178,
+ 0x00a0,0x00a1,0x00a2,0x00a3,0x00a4,0x00a5,0x00a6,0x00a7,0x00a8,0x00a9,0x00aa,0x00ab,0x00ac,0x00ad,0x00ae,0x00af,
+ 0x00b0,0x00b1,0x00b2,0x00b3,0x00b4,0x00b5,0x00b6,0x00b7,0x00b8,0x00b9,0x00ba,0x00bb,0x00bc,0x00bd,0x00be,0x00bf,
+ 0x00c0,0x00c1,0x00c2,0x00c3,0x00c4,0x00c5,0x00c6,0x00c7,0x00c8,0x00c9,0x00ca,0x00cb,0x00cc,0x00cd,0x00ce,0x00cf,
+ 0x00d0,0x00d1,0x00d2,0x00d3,0x00d4,0x00d5,0x00d6,0x00d7,0x00d8,0x00d9,0x00da,0x00db,0x00dc,0x00dd,0x00de,0x00df,
+ 0x00e0,0x00e1,0x00e2,0x00e3,0x00e4,0x00e5,0x00e6,0x00e7,0x00e8,0x00e9,0x00ea,0x00eb,0x00ec,0x00ed,0x00ee,0x00ef,
+ 0x00f0,0x00f1,0x00f2,0x00f3,0x00f4,0x00f5,0x00f6,0x00f7,0x00f8,0x00f9,0x00fa,0x00fb,0x00fc,0x00fd,0x00fe,0x00ff
+};
+
+static const uint32 CharsetTableCP437[256] = {
+ 0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000a,0x000b,0x000c,0x000d,0x000e,0x000f,
+ 0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001a,0x001b,0x001c,0x001d,0x001e,0x001f,
+ 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,0x0029,0x002a,0x002b,0x002c,0x002d,0x002e,0x002f,
+ 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003a,0x003b,0x003c,0x003d,0x003e,0x003f,
+ 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004a,0x004b,0x004c,0x004d,0x004e,0x004f,
+ 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005a,0x005b,0x005c,0x005d,0x005e,0x005f,
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006a,0x006b,0x006c,0x006d,0x006e,0x006f,
+ 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007a,0x007b,0x007c,0x007d,0x007e,0x2302,
+ 0x00c7,0x00fc,0x00e9,0x00e2,0x00e4,0x00e0,0x00e5,0x00e7,0x00ea,0x00eb,0x00e8,0x00ef,0x00ee,0x00ec,0x00c4,0x00c5,
+ 0x00c9,0x00e6,0x00c6,0x00f4,0x00f6,0x00f2,0x00fb,0x00f9,0x00ff,0x00d6,0x00dc,0x00a2,0x00a3,0x00a5,0x20a7,0x0192,
+ 0x00e1,0x00ed,0x00f3,0x00fa,0x00f1,0x00d1,0x00aa,0x00ba,0x00bf,0x2310,0x00ac,0x00bd,0x00bc,0x00a1,0x00ab,0x00bb,
+ 0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556,0x2555,0x2563,0x2551,0x2557,0x255d,0x255c,0x255b,0x2510,
+ 0x2514,0x2534,0x252c,0x251c,0x2500,0x253c,0x255e,0x255f,0x255a,0x2554,0x2569,0x2566,0x2560,0x2550,0x256c,0x2567,
+ 0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256b,0x256a,0x2518,0x250c,0x2588,0x2584,0x258c,0x2590,0x2580,
+ 0x03b1,0x00df,0x0393,0x03c0,0x03a3,0x03c3,0x00b5,0x03c4,0x03a6,0x0398,0x03a9,0x03b4,0x221e,0x03c6,0x03b5,0x2229,
+ 0x2261,0x00b1,0x2265,0x2264,0x2320,0x2321,0x00f7,0x2248,0x00b0,0x2219,0x00b7,0x221a,0x207f,0x00b2,0x25a0,0x00a0
+};
+
+static std::wstring FromTable(const std::string &str, const uint32 (&table)[256], wchar_t replacement = L'\uFFFD')
+//----------------------------------------------------------------------------------------------------------------
+{
+ std::wstring res;
+ for(std::size_t i = 0; i < str.length(); ++i)
+ {
+ uint8 c = str[i];
+ if(c <= CountOf(table))
+ {
+ res.push_back(static_cast<wchar_t>(static_cast<uint32>(table[c])));
+ } else
+ {
+ res.push_back(replacement);
+ }
+ }
+ return res;
+}
+
+static std::string ToTable(const std::wstring &str, const uint32 (&table)[256], char replacement = '?')
+//-----------------------------------------------------------------------------------------------------
+{
+ std::string res;
+ for(std::size_t i = 0; i < str.length(); ++i)
+ {
+ uint32 c = str[i];
+ bool found = false;
+ for(std::size_t x = 0; x < CountOf(table); ++x)
+ {
+ if(c == table[x])
+ {
+ res.push_back(static_cast<char>(static_cast<uint8>(x)));
+ found = true;
+ break;
+ }
+ }
+ if(!found)
+ {
+ res.push_back(replacement);
+ }
+ }
+ return res;
+}
+
+static std::wstring FromAscii(const std::string &str, wchar_t replacement = L'\uFFFD')
+//------------------------------------------------------------------------------------
+{
+ std::wstring res;
+ for(std::size_t i = 0; i < str.length(); ++i)
+ {
+ uint8 c = str[i];
+ if(c <= 0x7f)
+ {
+ res.push_back(static_cast<wchar_t>(static_cast<uint32>(c)));
+ } else
+ {
+ res.push_back(replacement);
+ }
+ }
+ return res;
+}
+
+static std::string ToAscii(const std::wstring &str, char replacement = '?')
+//-------------------------------------------------------------------------
+{
+ std::string res;
+ for(std::size_t i = 0; i < str.length(); ++i)
+ {
+ uint32 c = str[i];
+ if(c <= 0x7f)
+ {
+ res.push_back(static_cast<char>(static_cast<uint8>(c)));
+ } else
+ {
+ res.push_back(replacement);
+ }
+ }
+ return res;
+}
+
+static std::wstring FromISO_8859_1(const std::string &str, wchar_t replacement = L'\uFFFD')
+//-----------------------------------------------------------------------------------------
+{
+ MPT_UNREFERENCED_PARAMETER(replacement);
+ std::wstring res;
+ for(std::size_t i = 0; i < str.length(); ++i)
+ {
+ uint8 c = str[i];
+ res.push_back(static_cast<wchar_t>(static_cast<uint32>(c)));
+ }
+ return res;
+}
+
+static std::string ToISO_8859_1(const std::wstring &str, char replacement = '?')
+//------------------------------------------------------------------------------
+{
+ std::string res;
+ for(std::size_t i = 0; i < str.length(); ++i)
+ {
+ uint32 c = str[i];
+ if(c <= 0xff)
+ {
+ res.push_back(static_cast<char>(static_cast<uint8>(c)));
+ } else
+ {
+ res.push_back(replacement);
+ }
+ }
+ return res;
+}
+
+static std::wstring LocaleDecode(const std::string &str, const std::locale & locale, wchar_t replacement = L'\uFFFD')
+//-------------------------------------------------------------------------------------------------------------------
+{
+ if(str.empty())
+ {
+ return std::wstring();
+ }
+ std::vector<wchar_t> out;
+ typedef std::codecvt<wchar_t, char, std::mbstate_t> codecvt_type;
+ std::mbstate_t state = std::mbstate_t();
+ const codecvt_type & facet = std::use_facet<codecvt_type>(locale);
+ codecvt_type::result result = codecvt_type::partial;
+ const char * in_begin = &*str.begin();
+ const char * in_end = in_begin + str.length();
+ out.resize((in_end - in_begin) * (facet.max_length() + 1));
+ wchar_t * out_begin = out.data();
+ wchar_t * out_end = out.data() + out.size();
+ const char * in_next = nullptr;
+ wchar_t * out_next = nullptr;
+ do
+ {
+ in_next = nullptr;
+ out_next = nullptr;
+ result = facet.in(state, in_begin, in_end, in_next, out_begin, out_end, out_next);
+ if(result == codecvt_type::partial || (result == codecvt_type::error && out_next == out_end))
+ {
+ out.resize(out.size() * 2);
+ in_begin = in_next;
+ out_begin = out.data() + (out_next - out_begin);
+ out_end = out.data() + out.size();
+ continue;
+ }
+ if(result == codecvt_type::error)
+ {
+ ++in_next;
+ *out_next = replacement;
+ ++out_next;
+ }
+ in_begin = in_next;
+ out_begin = out_next;
+ } while(result == codecvt_type::error && in_next < in_end && out_next < out_end);
+ return std::wstring(out.data(), out_next);
+}
+
+static std::string LocaleEncode(const std::wstring &str, const std::locale & locale, char replacement = '?')
+//----------------------------------------------------------------------------------------------------------
+{
+ if(str.empty())
+ {
+ return std::string();
+ }
+ std::vector<char> out;
+ typedef std::codecvt<wchar_t, char, std::mbstate_t> codecvt_type;
+ std::mbstate_t state = std::mbstate_t();
+ const codecvt_type & facet = std::use_facet<codecvt_type>(locale);
+ codecvt_type::result result = codecvt_type::partial;
+ const wchar_t * in_begin = &*str.begin();
+ const wchar_t * in_end = in_begin + str.length();
+ out.resize((in_end - in_begin) * (facet.max_length() + 1));
+ char * out_begin = out.data();
+ char * out_end = out.data() + out.size();
+ const wchar_t * in_next = nullptr;
+ char * out_next = nullptr;
+ do
+ {
+ in_next = nullptr;
+ out_next = nullptr;
+ result = facet.out(state, in_begin, in_end, in_next, out_begin, out_end, out_next);
+ if(result == codecvt_type::partial || (result == codecvt_type::error && out_next == out_end))
+ {
+ out.resize(out.size() * 2);
+ in_begin = in_next;
+ out_begin = out.data() + (out_next - out_begin);
+ out_end = out.data() + out.size();
+ continue;
+ }
+ if(result == codecvt_type::error)
+ {
+ ++in_next;
+ *out_next = replacement;
+ ++out_next;
+ }
+ in_begin = in_next;
+ out_begin = out_next;
+ } while(result == codecvt_type::error && in_next < in_end && out_next < out_end);
+ return std::string(out.data(), out_next);
+}
+
+static std::wstring FromLocale(const std::string &str, wchar_t replacement = L'\uFFFD')
+//-------------------------------------------------------------------------------------
+{
+ try
+ {
+ std::locale locale(""); // user locale
+ return String::LocaleDecode(str, locale, replacement);
+ } catch(...)
+ {
+ // nothing
+ }
+ try
+ {
+ std::locale locale; // current c++ locale
+ return String::LocaleDecode(str, locale, replacement);
+ } catch(...)
+ {
+ // nothing
+ }
+ try
+ {
+ std::locale locale = std::locale::classic(); // "C" locale
+ return String::LocaleDecode(str, locale, replacement);
+ } catch(...)
+ {
+ // nothing
+ }
+ ASSERT(false);
+ return String::FromAscii(str, replacement); // fallback
+}
+
+static std::string ToLocale(const std::wstring &str, char replacement = '?')
+//--------------------------------------------------------------------------
+{
+ try
+ {
+ std::locale locale(""); // user locale
+ return String::LocaleEncode(str, locale, replacement);
+ } catch(...)
+ {
+ // nothing
+ }
+ try
+ {
+ std::locale locale; // current c++ locale
+ return String::LocaleEncode(str, locale, replacement);
+ } catch(...)
+ {
+ // nothing
+ }
+ try
+ {
+ std::locale locale = std::locale::classic(); // "C" locale
+ return String::LocaleEncode(str, locale, replacement);
+ } catch(...)
+ {
+ // nothing
+ }
+ ASSERT(false);
+ return String::ToAscii(str, replacement); // fallback
+}
+
+static std::wstring FromUTF8(const std::string &str, wchar_t replacement = L'\uFFFD')
+//-----------------------------------------------------------------------------------
+{
+ MPT_UNREFERENCED_PARAMETER(replacement);
+ std::wstring_convert<std::codecvt_utf8<wchar_t> > conv;
+ return conv.from_bytes(str);
+}
+
+static std::string ToUTF8(const std::wstring &str, char replacement = '?')
+//------------------------------------------------------------------------
+{
+ MPT_UNREFERENCED_PARAMETER(replacement);
+ std::wstring_convert<std::codecvt_utf8<wchar_t> > conv;
+ return conv.to_bytes(str);
+}
+
+#elif defined(WIN32)
static UINT CharsetToCodepage(Charset charset)
{
switch(charset)
@@ -141,7 +503,22 @@
Tdststring EncodeImpl(Charset charset, const std::wstring &src)
{
STATIC_ASSERT(sizeof(typename Tdststring::value_type) == sizeof(char));
- #if defined(WIN32)
+ #if defined(MPT_CHARSET_CPP)
+ std::string out;
+ switch(charset)
+ {
+ case CharsetLocale: out = String::ToLocale(src); break;
+ case CharsetUTF8: out = String::ToUTF8(src); break;
+ case CharsetASCII: out = String::ToAscii(src); break;
+ case CharsetISO8859_1: out = String::ToISO_8859_1(src); break;
+ case CharsetISO8859_15: out = String::To8bit(src, CharsetTableISO8859_15); break;
+ case CharsetCP437: out = String::To8bit(src, CharsetTableCP437); break;
+ case CharsetWindows1252: out = String::To8bit(src, CharsetTableWindows1252); break;
+ }
+ Tdststring result;
+ std::copy(out.begin(), out.end(), std::back_inserter(result));
+ return result;
+ #elif defined(WIN32)
const UINT codepage = CharsetToCodepage(charset);
int required_size = WideCharToMultiByte(codepage, 0, src.c_str(), -1, nullptr, 0, nullptr, nullptr);
if(required_size <= 0)
@@ -197,7 +574,22 @@
std::wstring DecodeImpl(Charset charset, const Tsrcstring &src)
{
STATIC_ASSERT(sizeof(typename Tsrcstring::value_type) == sizeof(char));
- #if defined(WIN32)
+ #if defined(MPT_CHARSET_CPP)
+ std::string in;
+ std::copy(src.begin(), src.end(), std::back_inserter(in));
+ std::wstring out;
+ switch(charset)
+ {
+ case CharsetLocale: out = String::FromLocale(in); break;
+ case CharsetUTF8: out = String::FromUTF8(in); break;
+ case CharsetASCII: out = String::FromAscii(in); break;
+ case CharsetISO8859_1: out = String::FromISO_8859_1(in); break;
+ case CharsetISO8859_15: out = String::From8bit(in, CharsetTableISO8859_15); break;
+ case CharsetCP437: out = String::From8bit(in, CharsetTableCP437); break;
+ case CharsetWindows1252: out = String::From8bit(in, CharsetTableWindows1252); break;
+ }
+ return out;
+ #elif defined(WIN32)
const UINT codepage = CharsetToCodepage(charset);
int required_size = MultiByteToWideChar(codepage, 0, reinterpret_cast<const char*>(src.c_str()), -1, nullptr, 0);
if(required_size <= 0)
@@ -262,7 +654,7 @@
{
return Tdststring(reinterpret_cast<const typename Tdststring::value_type*>(&*src.begin()), reinterpret_cast<const typename Tdststring::value_type*>(&*src.end()));
}
- #if defined(WIN32)
+ #if defined(MPT_CHARSET_CPP) || defined(WIN32)
return EncodeImpl<Tdststring>(to, DecodeImpl(from, src));
#else // !WIN32
iconv_t conv = iconv_t();
Modified: trunk/OpenMPT/openmpt123/Makefile.config.macosx
===================================================================
--- trunk/OpenMPT/openmpt123/Makefile.config.macosx 2013-12-04 14:51:16 UTC (rev 3367)
+++ trunk/OpenMPT/openmpt123/Makefile.config.macosx 2013-12-04 15:07:04 UTC (rev 3368)
@@ -1,7 +1,9 @@
include Makefile.config.defaults
-LDLIBS += -liconv
-CPPFLAGS += -DMPT_ICONV_NO_WCHAR
+#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-04 16:34:55
|
Revision: 3370
http://sourceforge.net/p/modplug/code/3370
Author: manxorist
Date: 2013-12-04 16:34:48 +0000 (Wed, 04 Dec 2013)
Log Message:
-----------
[Ref] libopenmpt: Cleanup charset conversion.
Modified Paths:
--------------
trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/Tables.cpp
Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-12-04 15:18:02 UTC (rev 3369)
+++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-12-04 16:34:48 UTC (rev 3370)
@@ -226,19 +226,7 @@
}
std::string module_impl::mod_string_to_utf8( const std::string & encoded ) const {
- std::string encoding = m_sndFile->GetCharset().second;
- std::transform( encoding.begin(), encoding.end(), encoding.begin(), tolower );
- mpt::Charset charset = mpt::CharsetASCII;
- if ( encoding == "" ) { charset = mpt::CharsetASCII; } // fallback
- else if ( encoding == "utf-8" ) { charset = mpt::CharsetUTF8; }
- else if ( encoding == "ascii" ) { charset = mpt::CharsetASCII; }
- else if ( encoding == "us-ascii" ) { charset = mpt::CharsetASCII; }
- else if ( encoding == "iso-8859-1" ) { charset = mpt::CharsetISO8859_1; }
- else if ( encoding == "iso-8859-15" ) { charset = mpt::CharsetISO8859_15; }
- else if ( encoding == "cp437" ) { charset = mpt::CharsetCP437; }
- else if ( encoding == "windows-1252" ) { charset = mpt::CharsetWindows1252; }
- else { charset = mpt::CharsetASCII; } // fallback
- return mpt::To( mpt::CharsetUTF8, charset, encoded );
+ return mpt::To( mpt::CharsetUTF8, m_sndFile->GetCharset().second, encoded );
}
void module_impl::apply_mixer_settings( std::int32_t samplerate, int channels ) {
if (
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2013-12-04 15:18:02 UTC (rev 3369)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2013-12-04 16:34:48 UTC (rev 3370)
@@ -477,7 +477,7 @@
MODCONTAINERTYPE GetContainerType() const { return m_ContainerType; }
// rough heuristic, could be improved
- std::pair<MOD_CHARSET_CERTAINTY, std::string> GetCharset() const { return GetCharsetFromModType(GetType()); }
+ std::pair<MOD_CHARSET_CERTAINTY, mpt::Charset> GetCharset() const { return GetCharsetFromModType(GetType()); }
void SetPreAmp(UINT vol);
UINT GetPreAmp() const { return m_MixerSettings.m_nPreAmp; }
@@ -576,7 +576,7 @@
bool ReadMID(const LPCBYTE lpStream, DWORD dwMemLength, ModLoadingFlags loadFlags = loadCompleteModule);
static std::vector<const char *> GetSupportedExtensions(bool otherFormats);
- static std::pair<MOD_CHARSET_CERTAINTY, std::string> GetCharsetFromModType(MODTYPE modtype);
+ static std::pair<MOD_CHARSET_CERTAINTY, mpt::Charset> GetCharsetFromModType(MODTYPE modtype);
static const char * ModTypeToString(MODTYPE modtype);
static std::string ModContainerTypeToString(MODCONTAINERTYPE containertype);
static std::string ModTypeToTracker(MODTYPE modtype);
Modified: trunk/OpenMPT/soundlib/Tables.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Tables.cpp 2013-12-04 15:18:02 UTC (rev 3369)
+++ trunk/OpenMPT/soundlib/Tables.cpp 2013-12-04 16:34:48 UTC (rev 3370)
@@ -139,51 +139,51 @@
{
MODTYPE type;
MOD_CHARSET_CERTAINTY certainty;
- const char *charset;
+ mpt::Charset charset;
};
static const ModCharsetInfo ModCharsetInfos[] =
{
// Amiga
- { MOD_TYPE_OKT , MOD_CHARSET_IS , "ISO-8859-1" },
- { MOD_TYPE_DBM , MOD_CHARSET_IS , "ISO-8859-1" },
- { MOD_TYPE_DIGI, MOD_CHARSET_IS , "ISO-8859-1" },
+ { MOD_TYPE_OKT , MOD_CHARSET_IS , mpt::CharsetISO8859_1 },
+ { MOD_TYPE_DBM , MOD_CHARSET_IS , mpt::CharsetISO8859_1 },
+ { MOD_TYPE_DIGI, MOD_CHARSET_IS , mpt::CharsetISO8859_1 },
// Amiga // DOS
- { MOD_TYPE_MOD , MOD_CHARSET_MAYBE , "ISO-8859-1" },
- { MOD_TYPE_MED , MOD_CHARSET_MAYBE , "ISO-8859-1" },
+ { MOD_TYPE_MOD , MOD_CHARSET_MAYBE , mpt::CharsetISO8859_1 },
+ { MOD_TYPE_MED , MOD_CHARSET_MAYBE , mpt::CharsetISO8859_1 },
// DOS
- { MOD_TYPE_S3M , MOD_CHARSET_IS , "cp437" },
- { MOD_TYPE_XM , MOD_CHARSET_IS , "cp437" },
- { MOD_TYPE_MTM , MOD_CHARSET_IS , "cp437" },
- { MOD_TYPE_IT , MOD_CHARSET_IS , "cp437" },
- { MOD_TYPE_669 , MOD_CHARSET_IS , "cp437" },
- { MOD_TYPE_STM , MOD_CHARSET_IS , "cp437" },
- { MOD_TYPE_FAR , MOD_CHARSET_IS , "cp437" },
- { MOD_TYPE_AMF , MOD_CHARSET_IS , "cp437" },
- { MOD_TYPE_AMF0, MOD_CHARSET_IS , "cp437" },
- { MOD_TYPE_MDL , MOD_CHARSET_IS , "cp437" },
- { MOD_TYPE_DMF , MOD_CHARSET_IS , "cp437" },
- { MOD_TYPE_PTM , MOD_CHARSET_IS , "cp437" },
- { MOD_TYPE_PSM , MOD_CHARSET_IS , "cp437" },
- { MOD_TYPE_J2B , MOD_CHARSET_IS , "cp437" },
- { MOD_TYPE_IMF , MOD_CHARSET_IS , "cp437" },
- { MOD_TYPE_ULT , MOD_CHARSET_IS , "cp437" },
- { MOD_TYPE_AMS , MOD_CHARSET_IS , "Windows-1252"}, // We convert the custom AMS special character set to our own set.
- { MOD_TYPE_AMS2, MOD_CHARSET_IS , "Windows-1252"}, // ditto
- { MOD_TYPE_DSM , MOD_CHARSET_IS , "cp437" },
+ { MOD_TYPE_S3M , MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_XM , MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_MTM , MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_IT , MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_669 , MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_STM , MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_FAR , MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_AMF , MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_AMF0, MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_MDL , MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_DMF , MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_PTM , MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_PSM , MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_J2B , MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_IMF , MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_ULT , MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_AMS , MOD_CHARSET_IS , mpt::CharsetWindows1252}, // We convert the custom AMS special character set to our own set.
+ { MOD_TYPE_AMS2, MOD_CHARSET_IS , mpt::CharsetWindows1252}, // ditto
+ { MOD_TYPE_DSM , MOD_CHARSET_IS , mpt::CharsetCP437 },
// Windows
- { MOD_TYPE_MT2 , MOD_CHARSET_MAYBE , "Windows-1252"},
- { MOD_TYPE_MPT , MOD_CHARSET_MAYBE , "Windows-1252"},
+ { MOD_TYPE_MT2 , MOD_CHARSET_MAYBE , mpt::CharsetWindows1252},
+ { MOD_TYPE_MPT , MOD_CHARSET_MAYBE , mpt::CharsetWindows1252},
// random stuff
- { MOD_TYPE_MID , MOD_CHARSET_IS , "US-ASCII" },
- { MOD_TYPE_WAV , MOD_CHARSET_MAYBE , "US-ASCII" },
+ { MOD_TYPE_MID , MOD_CHARSET_IS , mpt::CharsetASCII },
+ { MOD_TYPE_WAV , MOD_CHARSET_MAYBE , mpt::CharsetASCII },
// end
- { MOD_TYPE_NONE, MOD_CHARSET_UNKNOWN, "" }
+ { MOD_TYPE_NONE, MOD_CHARSET_UNKNOWN, mpt::CharsetASCII }
};
-std::pair<MOD_CHARSET_CERTAINTY, std::string> CSoundFile::GetCharsetFromModType(MODTYPE modtype)
-//----------------------------------------------------------------------------------------------
+std::pair<MOD_CHARSET_CERTAINTY, mpt::Charset> CSoundFile::GetCharsetFromModType(MODTYPE modtype)
+//-----------------------------------------------------------------------------------------------
{
// This is just a rough heuristic.
// It could be improved by adjusting the charset according to the tracker that had been used to save the file.
@@ -195,7 +195,7 @@
}
}
// fallback
- return std::make_pair(MOD_CHARSET_UNKNOWN, "");
+ return std::make_pair(MOD_CHARSET_UNKNOWN, mpt::CharsetASCII);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2013-12-05 10:34:09
|
Revision: 3372
http://sourceforge.net/p/modplug/code/3372
Author: manxorist
Date: 2013-12-05 10:34:02 +0000 (Thu, 05 Dec 2013)
Log Message:
-----------
[Ref] libopenmpt: Run tests out of checkout root directory instead of 1 level deep.
Modified Paths:
--------------
trunk/OpenMPT/build/auto/test_libopenmpt_win32.cmd
trunk/OpenMPT/build/auto/test_libopenmpt_win64.cmd
trunk/OpenMPT/openmpt123/Makefile
trunk/OpenMPT/test/test.cpp
Modified: trunk/OpenMPT/build/auto/test_libopenmpt_win32.cmd
===================================================================
--- trunk/OpenMPT/build/auto/test_libopenmpt_win32.cmd 2013-12-04 20:06:04 UTC (rev 3371)
+++ trunk/OpenMPT/build/auto/test_libopenmpt_win32.cmd 2013-12-05 10:34:02 UTC (rev 3372)
@@ -5,9 +5,7 @@
-cd bin || goto error
-Win32\libopenmpt_test.exe || goto error
-cd .. || goto error
+bin\Win32\libopenmpt_test.exe || goto error
Modified: trunk/OpenMPT/build/auto/test_libopenmpt_win64.cmd
===================================================================
--- trunk/OpenMPT/build/auto/test_libopenmpt_win64.cmd 2013-12-04 20:06:04 UTC (rev 3371)
+++ trunk/OpenMPT/build/auto/test_libopenmpt_win64.cmd 2013-12-05 10:34:02 UTC (rev 3372)
@@ -5,9 +5,7 @@
-cd bin || goto error
-x64\libopenmpt_test.exe || goto error
-cd .. || goto error
+bin\x64\libopenmpt_test.exe || goto error
Modified: trunk/OpenMPT/openmpt123/Makefile
===================================================================
--- trunk/OpenMPT/openmpt123/Makefile 2013-12-04 20:06:04 UTC (rev 3371)
+++ trunk/OpenMPT/openmpt123/Makefile 2013-12-05 10:34:02 UTC (rev 3372)
@@ -300,7 +300,7 @@
.PHONY: test
test: bin/libopenmpt_test$(EXESUFFIX)
- bin/libopenmpt_test$(EXESUFFIX)
+ ( cd .. && openmpt123/bin/libopenmpt_test$(EXESUFFIX) )
bin/libopenmpt_test$(EXESUFFIX): $(LIBOPENMPTTEST_OBJECTS) $(OBJECTS_LIBOPENMPT) $(OUTPUT_LIBOPENMPT)
$(INFO) [LD ] $@
Modified: trunk/OpenMPT/test/test.cpp
===================================================================
--- trunk/OpenMPT/test/test.cpp 2013-12-04 20:06:04 UTC (rev 3371)
+++ trunk/OpenMPT/test/test.cpp 2013-12-05 10:34:02 UTC (rev 3372)
@@ -1641,7 +1641,7 @@
static mpt::PathString GetTestFilenameBase()
{
- return MPT_PATHSTRING("../test/test.");
+ return MPT_PATHSTRING("./test/test.");
}
typedef std::shared_ptr<CSoundFile> TSoundFileContainer;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2013-12-05 12:05:22
|
Revision: 3374
http://sourceforge.net/p/modplug/code/3374
Author: manxorist
Date: 2013-12-05 12:05:14 +0000 (Thu, 05 Dec 2013)
Log Message:
-----------
[Mod] libopenmpt: Move Makefile from openmpt/Makefile to top-level Makefile. Move binaries from openmpt/bin/ to bin/. Move makefile configurations from openmpt123/ into build/make/.
Modified Paths:
--------------
trunk/OpenMPT/README
Added Paths:
-----------
trunk/OpenMPT/Makefile
trunk/OpenMPT/build/make/
trunk/OpenMPT/build/make/Makefile.config.clang
trunk/OpenMPT/build/make/Makefile.config.defaults
trunk/OpenMPT/build/make/Makefile.config.macosx
trunk/OpenMPT/build/make/Makefile.config.mingw64-win32
trunk/OpenMPT/build/make/Makefile.config.mingw64-win64
Removed Paths:
-------------
trunk/OpenMPT/openmpt123/Makefile
trunk/OpenMPT/openmpt123/Makefile.config.defaults
trunk/OpenMPT/openmpt123/Makefile.config.llvm
trunk/OpenMPT/openmpt123/Makefile.config.macosx
trunk/OpenMPT/openmpt123/Makefile.config.mingw64-win32
trunk/OpenMPT/openmpt123/Makefile.config.mingw64-win64
trunk/OpenMPT/openmpt123/bin/
Copied: trunk/OpenMPT/Makefile (from rev 3373, trunk/OpenMPT/openmpt123/Makefile)
===================================================================
--- trunk/OpenMPT/Makefile (rev 0)
+++ trunk/OpenMPT/Makefile 2013-12-05 12:05:14 UTC (rev 3374)
@@ -0,0 +1,345 @@
+
+INFO = @echo
+SILENT = @
+VERYSILENT = @
+
+
+ifeq ($(VERBOSE),2)
+INFO = @true
+SILENT =
+VERYSILENT =
+endif
+
+ifeq ($(VERBOSE),1)
+INFO = @true
+SILENT =
+VERYSILENT = @
+endif
+
+
+ifeq ($(QUIET),1)
+INFO = @true
+SILENT = @
+VERYSILENT = @
+endif
+
+
+DYNLINK=1
+SHARED_LIB=1
+STATIC_LIB=1
+EXAMPLES=1
+OPENMPT123=1
+
+
+# get commandline or defaults
+
+CPPFLAGS := $(CPPFLAGS)
+CXXFLAGS := $(CXXFLAGS)
+CFLAGS := $(CFLAGS)
+LDFLAGS := $(LDFLAGS)
+LDLIBS := $(LDLIBS)
+ARFLAGS := $(ARFLAGS)
+
+
+# compiler setup
+
+ifeq ($(CONFIG)x,x)
+
+include build/make/Makefile.config.defaults
+
+else
+
+include build/make/Makefile.config.$(CONFIG)
+
+endif
+
+
+# host setup
+
+ifeq ($(HOST),windows)
+
+RM = del /q /f
+
+else
+
+RM = rm -f
+
+endif
+
+
+
+# build setup
+
+CPPFLAGS += -Icommon -I. -Iinclude/modplug/include -Iinclude
+CXXFLAGS += -fvisibility=hidden
+CFLAGS += -fvisibility=hidden
+LDFLAGS +=
+LDLIBS += -lm
+ARFLAGS +=
+
+ifeq ($(DEBUG),1)
+CXXFLAGS += -O0 -g
+CFLAGS += -O0 -g
+else
+CXXFLAGS += -O3 -fno-strict-aliasing -ffast-math
+CFLAGS += -O3 -fno-strict-aliasing -ffast-math
+endif
+
+ifeq ($(TEST),1)
+CPPFLAGS += -DLIBOPENMPT_BUILD_TEST
+endif
+
+CXXFLAGS += -Wall -Wextra -Wcast-align
+CFLAGS += -Wall -Wextra -Wcast-align
+
+ifeq ($(DYNLINK),1)
+LDFLAGS += -Wl,-rpath,./bin -Wl,-rpath,../bin
+LDFLAGS_LIBOPENMPT += -Lbin
+LDLIBS_LIBOPENMPT += -lopenmpt
+endif
+
+#CXXFLAGS += -mtune=generic
+#CFLAGS += -mtune=generic
+
+ifeq ($(NO_ZLIB),1)
+CPPFLAGS += -DNO_ZLIB
+else
+#LDLIBS += -lz
+ifeq ($(shell pkg-config --exists zlib && echo yes),yes)
+CPPFLAGS += -DMPT_WITH_ZLIB
+CPPFLAGS += $(shell pkg-config --cflags-only-I zlib )
+LDFLAGS += $(shell pkg-config --libs-only-other zlib )
+LDFLAGS += $(shell pkg-config --libs-only-L zlib )
+LDLIBS += $(shell pkg-config --libs-only-l zlib )
+endif
+endif
+
+ifeq ($(USE_SDL),1)
+#LDLIBS += -lsdl
+ifeq ($(shell pkg-config --exists sdl && echo yes),yes)
+CPPFLAGS += -DMPT_WITH_SDL
+CPPFLAGS += $(shell pkg-config --cflags-only-I sdl )
+LDFLAGS += $(shell pkg-config --libs-only-other sdl )
+LDFLAGS += $(shell pkg-config --libs-only-L sdl )
+LDLIBS += $(shell pkg-config --libs-only-l sdl )
+endif
+endif
+
+ifeq ($(NO_PORTAUDIO),1)
+else
+#LDLIBS += -lportaudio
+ifeq ($(shell pkg-config --exists portaudio-2.0 && echo yes),yes)
+CPPFLAGS += -DMPT_WITH_PORTAUDIO
+CPPFLAGS += $(shell pkg-config --cflags-only-I portaudio-2.0 )
+LDFLAGS += $(shell pkg-config --libs-only-other portaudio-2.0 )
+LDFLAGS += $(shell pkg-config --libs-only-L portaudio-2.0 )
+LDLIBS += $(shell pkg-config --libs-only-l portaudio-2.0 )
+endif
+endif
+
+ifeq ($(NO_FLAC),1)
+else
+#LDLIBS += -lFLAC
+ifeq ($(shell pkg-config --exists flac && echo yes),yes)
+CPPFLAGS += -DMPT_WITH_FLAC
+CPPFLAGS += $(shell pkg-config --cflags-only-I flac )
+LDFLAGS += $(shell pkg-config --libs-only-other flac )
+LDFLAGS += $(shell pkg-config --libs-only-L flac )
+LDLIBS += $(shell pkg-config --libs-only-l flac )
+endif
+endif
+
+ifeq ($(NO_WAVPACK),1)
+else
+#LDLIBS += -lwavpack
+ifeq ($(shell pkg-config --exists wavpack && echo yes),yes)
+CPPFLAGS += -DMPT_WITH_WAVPACK
+CPPFLAGS += $(shell pkg-config --cflags-only-I wavpack )
+LDFLAGS += $(shell pkg-config --libs-only-other wavpack )
+LDFLAGS += $(shell pkg-config --libs-only-L wavpack )
+LDLIBS += $(shell pkg-config --libs-only-l wavpack )
+endif
+endif
+
+ifeq ($(NO_SNDFILE),1)
+else
+#LDLIBS += -lsndfile
+ifeq ($(shell pkg-config --exists sndfile && echo yes),yes)
+CPPFLAGS += -DMPT_WITH_SNDFILE
+CPPFLAGS += $(shell pkg-config --cflags-only-I sndfile )
+LDFLAGS += $(shell pkg-config --libs-only-other sndfile )
+LDFLAGS += $(shell pkg-config --libs-only-L sndfile )
+LDLIBS += $(shell pkg-config --libs-only-l sndfile )
+endif
+endif
+
+%: %.o
+ $(INFO) [LD ] $@
+ $(SILENT)$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@
+
+%.o: %.cpp
+ $(INFO) [CXX] $<
+ $(VERYSILENT)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -M -MT$@ $< > $*.d
+ $(SILENT)$(COMPILE.cc) $(OUTPUT_OPTION) $<
+
+%.o: %.c
+ $(INFO) [CC ] $<
+ $(VERYSILENT)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -M -MT$@ $< > $*.d
+ $(SILENT)$(COMPILE.c) $(OUTPUT_OPTION) $<
+
+
+BUILD_SVNVERSION = $(shell svnversion -n . )
+CPPFLAGS += -Icommon/svn_version_svnversion -D BUILD_SVNVERSION=\"$(BUILD_SVNVERSION)\"
+#CPPFLAGS += -Icommon/svn_version_default
+
+
+CPPFLAGS += -DLIBOPENMPT_BUILD
+
+
+COMMON_CXX_SOURCES += \
+ $(wildcard common/*.cpp) \
+
+SOUNDLIB_CXX_SOURCES += \
+ $(COMMON_CXX_SOURCES) \
+ $(wildcard soundlib/*.cpp) \
+
+
+
+LIBOPENMPT_CXX_SOURCES += \
+ $(SOUNDLIB_CXX_SOURCES) \
+ $(wildcard test/*.cpp) \
+ libopenmpt/libopenmpt_c.cpp \
+ libopenmpt/libopenmpt_cxx.cpp \
+ libopenmpt/libopenmpt_impl.cpp \
+ libopenmpt/libopenmpt_interactive.cpp \
+
+ifeq ($(NO_ZLIB),1)
+LIBOPENMPT_C_SOURCES += include/miniz/miniz.c
+endif
+
+LIBOPENMPT_OBJECTS += $(LIBOPENMPT_CXX_SOURCES:.cpp=.o) $(LIBOPENMPT_C_SOURCES:.c=.o)
+LIBOPENMPT_DEPENDS = $(LIBOPENMPT_OBJECTS:.o=.d)
+ALL_OBJECTS += $(LIBOPENMPT_OBJECTS)
+ALL_DEPENDS += $(LIBOPENMPT_DEPENDS)
+
+ifeq ($(DYNLINK),1)
+OUTPUT_LIBOPENMPT += bin/libopenmpt.so
+else
+OBJECTS_LIBOPENMPT += $(LIBOPENMPT_OBJECTS)
+endif
+
+
+LIBOPENMPT_MODPLUG_C_SOURCES += \
+ libopenmpt/libopenmpt_modplug.c \
+
+LIBOPENMPT_MODPLUG_OBJECTS = $(LIBOPENMPT_MODPLUG_C_SOURCES:.c=.o)
+LIBOPENMPT_MODPLUG_DEPENDS = $(LIBOPENMPT_MODPLUG_OBJECTS:.o=.d)
+ALL_OBJECTS += $(LIBOPENMPT_MODPLUG_OBJECTS)
+ALL_DEPENDS += $(LIBOPENMPT_MODPLUG_DEPENDS)
+
+
+OPENMPT123_CXX_SOURCES += \
+ $(wildcard openmpt123/*.cpp) \
+
+OPENMPT123_OBJECTS += $(OPENMPT123_CXX_SOURCES:.cpp=.o)
+OPENMPT123_DEPENDS = $(OPENMPT123_OBJECTS:.o=.d)
+ALL_OBJECTS += $(OPENMPT123_OBJECTS)
+ALL_DEPENDS += $(OPENMPT123_DEPENDS)
+
+
+LIBOPENMPTTEST_CXX_SOURCES += \
+ libopenmpt/libopenmpt_test.cpp \
+
+LIBOPENMPTTEST_OBJECTS += $(LIBOPENMPTTEST_CXX_SOURCES:.cpp=.o) $(LIBOPENMPTTEST_C_SOURCES:.c=.o)
+LIBOPENMPTTEST_DEPENDS = $(LIBOPENMPTEST_OBJECTS:.o=.d)
+ALL_OBJECTS += $(LIBOPENMPTTEST_OBJECTS)
+ALL_DEPENDS += $(LIBOPENMPTTEST_DEPENDS)
+
+
+EXAMPLES_CXX_SOURCES += $(wildcard libopenmpt/examples/*.cpp)
+EXAMPLES_C_SOURCES += $(wildcard libopenmpt/examples/*.c)
+
+EXAMPLES_OBJECTS += $(EXAMPLES_CXX_SOURCES:.cpp=.o)
+EXAMPLES_OBJECTS += $(EXAMPLES_C_SOURCES:.c=.o)
+EXAMPLES_DEPENDS = $(EXAMPLES_OBJECTS:.o=.d)
+ALL_OBJECTS += $(EXAMPLES_OBJECTS)
+ALL_DEPENDS += $(EXAMPLES_DEPENDS)
+
+
+.PHONY: all
+all:
+
+-include $(ALL_DEPENDS)
+
+ifeq ($(DYNLINK),1)
+OUTPUTS += bin/libopenmpt.so
+OUTPUTS += bin/libopenmpt_modplug.so
+endif
+ifeq ($(SHARED_LIB),1)
+OUTPUTS += bin/libopenmpt.so
+endif
+ifeq ($(STATIC_LIB),1)
+OUTPUTS += bin/openmpt.a
+endif
+ifeq ($(OPENMPT123),1)
+OUTPUTS += bin/openmpt123$(EXESUFFIX)
+endif
+ifeq ($(NO_PORTAUDIO),1)
+else
+ifeq ($(EXAMPLES),1)
+OUTPUTS += bin/libopenmpt_example_c$(EXESUFFIX)
+OUTPUTS += bin/libopenmpt_example_c_mem$(EXESUFFIX)
+OUTPUTS += bin/libopenmpt_example_cxx$(EXESUFFIX)
+endif
+endif
+ifeq ($(TEST),1)
+OUTPUTS += bin/libopenmpt_test$(EXESUFFIX)
+endif
+
+all: $(OUTPUTS)
+
+.PHONY: test
+test: bin/libopenmpt_test$(EXESUFFIX)
+ bin/libopenmpt_test$(EXESUFFIX)
+
+bin/libopenmpt_test$(EXESUFFIX): $(LIBOPENMPTTEST_OBJECTS) $(OBJECTS_LIBOPENMPT) $(OUTPUT_LIBOPENMPT)
+ $(INFO) [LD ] $@
+ $(SILENT)$(LINK.cc) $(LDFLAGS_LIBOPENMPT) $(LIBOPENMPTTEST_OBJECTS) $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@
+
+bin/openmpt.a: $(LIBOPENMPT_OBJECTS)
+ $(INFO) [AR ] $@
+ $(SILENT)$(AR) $(ARFLAGS) $@ $^
+
+bin/libopenmpt.so: $(LIBOPENMPT_OBJECTS)
+ $(INFO) [LD ] $@
+ $(SILENT)$(LINK.cc) -shared $^ $(LOADLIBES) $(LDLIBS) -o $@
+
+bin/libopenmpt_modplug.so: $(LIBOPENMPT_MODPLUG_OBJECTS) $(OUTPUT_LIBOPENMPT)
+ $(INFO) [LD ] $@
+ $(SILENT)$(LINK.cc) -shared $(LDFLAGS_LIBOPENMPT) $^ $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@
+
+bin/openmpt123$(EXESUFFIX): $(OPENMPT123_OBJECTS) $(OBJECTS_LIBOPENMPT) $(OUTPUT_LIBOPENMPT)
+ $(INFO) [LD ] $@
+ $(SILENT)$(LINK.cc) $(LDFLAGS_LIBOPENMPT) $(OPENMPT123_OBJECTS) $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@
+
+bin/libopenmpt_example_c$(EXESUFFIX): libopenmpt/examples/libopenmpt_example_c.o $(OBJECTS_LIBOPENMPT) $(OUTPUT_LIBOPENMPT)
+ $(INFO) [LD ] $@
+ $(SILENT)$(LINK.cc) $(LDFLAGS_LIBOPENMPT) libopenmpt/examples/libopenmpt_example_c.o $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@
+
+bin/libopenmpt_example_c_mem$(EXESUFFIX): libopenmpt/examples/libopenmpt_example_c_mem.o $(OBJECTS_LIBOPENMPT) $(OUTPUT_LIBOPENMPT)
+ $(INFO) [LD ] $@
+ $(SILENT)$(LINK.cc) $(LDFLAGS_LIBOPENMPT) libopenmpt/examples/libopenmpt_example_c_mem.o $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@
+
+bin/libopenmpt_example_cxx$(EXESUFFIX): libopenmpt/examples/libopenmpt_example_cxx.o $(OBJECTS_LIBOPENMPT) $(OUTPUT_LIBOPENMPT)
+ $(INFO) [LD ] $@
+ $(SILENT)$(LINK.cc) $(LDFLAGS_LIBOPENMPT) libopenmpt/examples/libopenmpt_example_cxx.o $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@
+
+ifeq ($(HOST),windows)
+clean:
+ $(INFO) clean ...
+ $(SILENT)$(RM) $(subst /,\,$(OUTPUTS) $(ALL_OBJECTS) $(ALL_DEPENDS) )
+else
+clean:
+ $(INFO) clean ...
+ $(SILENT)$(RM) $(OUTPUTS) $(ALL_OBJECTS) $(ALL_DEPENDS)
+endif
Modified: trunk/OpenMPT/README
===================================================================
--- trunk/OpenMPT/README 2013-12-05 10:51:46 UTC (rev 3373)
+++ trunk/OpenMPT/README 2013-12-05 12:05:14 UTC (rev 3374)
@@ -46,8 +46,6 @@
You can disable xmp-openmpt in the solution configuration.
- The openmpt123 solution is in openmpt123/openmpt123.sln.
- Makefile
- The makefile resides in openmpt123/Makefile. You should cd into openmpt123
- for using it.
The makefile supports different build environments and targets via HOST= and
CONFIG= parameters directly to the make invocation.
Use 'make CONFIG=$newconfig clean' when switching between different configs
@@ -56,13 +54,13 @@
invocations.
- mingw-w64 (on windows):
The required version should be at least 4.4. Only 4.6 and up are tested.
- - cd openmpt123 ; mingw32-make HOST=windows CONFIG=mingw64-win32
- - cd openmpt123 ; mingw32-make HOST=windows CONFIG=mingw64-win64
+ - 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.
- - cd openmpt123 ; make CONFIG=mingw64-win32
- - cd openmpt123 ; make CONFIG=mingw64-win64
+ - 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:
@@ -73,9 +71,9 @@
openmpt123 can optionally use libflac, libwavpack and libsndfile to render
PCM files to disk.
When using gcc, you should simply do:
- - cd openmpt123 ; make
+ - make
When using clang, it is recommended to do:
- - cd openmpt123 ; make CONFIG=llvm
+ - 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
Copied: trunk/OpenMPT/build/make/Makefile.config.clang (from rev 3373, trunk/OpenMPT/openmpt123/Makefile.config.llvm)
===================================================================
--- trunk/OpenMPT/build/make/Makefile.config.clang (rev 0)
+++ trunk/OpenMPT/build/make/Makefile.config.clang 2013-12-05 12:05:14 UTC (rev 3374)
@@ -0,0 +1,15 @@
+
+CC = clang
+CXX = clang++
+LD = clang++
+AR = ar
+
+#CPPFLAGS += -DMPT_COMPILER_GENERIC
+CPPFLAGS +=
+CXXFLAGS += -std=c++0x -fPIC
+CFLAGS += -std=c99 -fPIC
+LDFLAGS +=
+LDLIBS += -lm
+ARFLAGS := rcs
+
+EXESUFFIX=
Copied: trunk/OpenMPT/build/make/Makefile.config.defaults (from rev 3373, trunk/OpenMPT/openmpt123/Makefile.config.defaults)
===================================================================
--- trunk/OpenMPT/build/make/Makefile.config.defaults (rev 0)
+++ trunk/OpenMPT/build/make/Makefile.config.defaults 2013-12-05 12:05:14 UTC (rev 3374)
@@ -0,0 +1,15 @@
+
+CC = gcc
+CXX = g++
+LD = g++
+AR = ar
+
+#CPPFLAGS += -DMPT_COMPILER_GENERIC
+CPPFLAGS +=
+CXXFLAGS += -std=c++0x -fPIC
+CFLAGS += -std=c99 -fPIC
+LDFLAGS +=
+LDLIBS += -lm
+ARFLAGS := rcs
+
+EXESUFFIX=
Copied: trunk/OpenMPT/build/make/Makefile.config.macosx (from rev 3373, trunk/OpenMPT/openmpt123/Makefile.config.macosx)
===================================================================
--- trunk/OpenMPT/build/make/Makefile.config.macosx (rev 0)
+++ trunk/OpenMPT/build/make/Makefile.config.macosx 2013-12-05 12:05:14 UTC (rev 3374)
@@ -0,0 +1,9 @@
+
+include Makefile.config.defaults
+
+#LDLIBS += -liconv
+#CPPFLAGS += -DMPT_ICONV_NO_WCHAR
+
+CPPFLAGS += -DMPT_CHARSET_CPP
+
+DYNLINK=0
Copied: trunk/OpenMPT/build/make/Makefile.config.mingw64-win32 (from rev 3373, trunk/OpenMPT/openmpt123/Makefile.config.mingw64-win32)
===================================================================
--- trunk/OpenMPT/build/make/Makefile.config.mingw64-win32 (rev 0)
+++ trunk/OpenMPT/build/make/Makefile.config.mingw64-win32 2013-12-05 12:05:14 UTC (rev 3374)
@@ -0,0 +1,24 @@
+
+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
+CFLAGS += -std=c99 -municode -mconsole
+LDFLAGS +=
+LDLIBS += -lm -lwinmm
+ARFLAGS := rcs
+
+EXESUFFIX=.exe
+
+DYNLINK=0
+SHARED_LIB=0
+STATIC_LIB=0
+
+NO_ZLIB=1
+NO_PORTAUDIO=1
+NO_SNDFILE=1
+NO_FLAC=1
+NO_WAVPACK=1
Copied: trunk/OpenMPT/build/make/Makefile.config.mingw64-win64 (from rev 3373, trunk/OpenMPT/openmpt123/Makefile.config.mingw64-win64)
===================================================================
--- trunk/OpenMPT/build/make/Makefile.config.mingw64-win64 (rev 0)
+++ trunk/OpenMPT/build/make/Makefile.config.mingw64-win64 2013-12-05 12:05:14 UTC (rev 3374)
@@ -0,0 +1,24 @@
+
+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
+CFLAGS += -std=c99 -municode -mconsole
+LDFLAGS +=
+LDLIBS += -lm -lwinmm
+ARFLAGS := rcs
+
+EXESUFFIX=.exe
+
+DYNLINK=0
+SHARED_LIB=0
+STATIC_LIB=0
+
+NO_ZLIB=1
+NO_PORTAUDIO=1
+NO_SNDFILE=1
+NO_FLAC=1
+NO_WAVPACK=1
Deleted: trunk/OpenMPT/openmpt123/Makefile
===================================================================
--- trunk/OpenMPT/openmpt123/Makefile 2013-12-05 10:51:46 UTC (rev 3373)
+++ trunk/OpenMPT/openmpt123/Makefile 2013-12-05 12:05:14 UTC (rev 3374)
@@ -1,345 +0,0 @@
-
-INFO = @echo
-SILENT = @
-VERYSILENT = @
-
-
-ifeq ($(VERBOSE),2)
-INFO = @true
-SILENT =
-VERYSILENT =
-endif
-
-ifeq ($(VERBOSE),1)
-INFO = @true
-SILENT =
-VERYSILENT = @
-endif
-
-
-ifeq ($(QUIET),1)
-INFO = @true
-SILENT = @
-VERYSILENT = @
-endif
-
-
-DYNLINK=1
-SHARED_LIB=1
-STATIC_LIB=1
-EXAMPLES=1
-OPENMPT123=1
-
-
-# get commandline or defaults
-
-CPPFLAGS := $(CPPFLAGS)
-CXXFLAGS := $(CXXFLAGS)
-CFLAGS := $(CFLAGS)
-LDFLAGS := $(LDFLAGS)
-LDLIBS := $(LDLIBS)
-ARFLAGS := $(ARFLAGS)
-
-
-# compiler setup
-
-ifeq ($(CONFIG)x,x)
-
-include Makefile.config.defaults
-
-else
-
-include Makefile.config.$(CONFIG)
-
-endif
-
-
-# host setup
-
-ifeq ($(HOST),windows)
-
-RM = del /q /f
-
-else
-
-RM = rm -f
-
-endif
-
-
-
-# build setup
-
-CPPFLAGS += -I../common -I.. -I../include/modplug/include -I../include
-CXXFLAGS += -fvisibility=hidden
-CFLAGS += -fvisibility=hidden
-LDFLAGS +=
-LDLIBS += -lm
-ARFLAGS +=
-
-ifeq ($(DEBUG),1)
-CXXFLAGS += -O0 -g
-CFLAGS += -O0 -g
-else
-CXXFLAGS += -O3 -fno-strict-aliasing -ffast-math
-CFLAGS += -O3 -fno-strict-aliasing -ffast-math
-endif
-
-ifeq ($(TEST),1)
-CPPFLAGS += -DLIBOPENMPT_BUILD_TEST
-endif
-
-CXXFLAGS += -Wall -Wextra -Wcast-align
-CFLAGS += -Wall -Wextra -Wcast-align
-
-ifeq ($(DYNLINK),1)
-LDFLAGS += -Wl,-rpath,./bin -Wl,-rpath,../bin -Wl,-rpath,./openmpt123/bin
-LDFLAGS_LIBOPENMPT += -Lbin
-LDLIBS_LIBOPENMPT += -lopenmpt
-endif
-
-#CXXFLAGS += -mtune=generic
-#CFLAGS += -mtune=generic
-
-ifeq ($(NO_ZLIB),1)
-CPPFLAGS += -DNO_ZLIB
-else
-#LDLIBS += -lz
-ifeq ($(shell pkg-config --exists zlib && echo yes),yes)
-CPPFLAGS += -DMPT_WITH_ZLIB
-CPPFLAGS += $(shell pkg-config --cflags-only-I zlib )
-LDFLAGS += $(shell pkg-config --libs-only-other zlib )
-LDFLAGS += $(shell pkg-config --libs-only-L zlib )
-LDLIBS += $(shell pkg-config --libs-only-l zlib )
-endif
-endif
-
-ifeq ($(USE_SDL),1)
-#LDLIBS += -lsdl
-ifeq ($(shell pkg-config --exists sdl && echo yes),yes)
-CPPFLAGS += -DMPT_WITH_SDL
-CPPFLAGS += $(shell pkg-config --cflags-only-I sdl )
-LDFLAGS += $(shell pkg-config --libs-only-other sdl )
-LDFLAGS += $(shell pkg-config --libs-only-L sdl )
-LDLIBS += $(shell pkg-config --libs-only-l sdl )
-endif
-endif
-
-ifeq ($(NO_PORTAUDIO),1)
-else
-#LDLIBS += -lportaudio
-ifeq ($(shell pkg-config --exists portaudio-2.0 && echo yes),yes)
-CPPFLAGS += -DMPT_WITH_PORTAUDIO
-CPPFLAGS += $(shell pkg-config --cflags-only-I portaudio-2.0 )
-LDFLAGS += $(shell pkg-config --libs-only-other portaudio-2.0 )
-LDFLAGS += $(shell pkg-config --libs-only-L portaudio-2.0 )
-LDLIBS += $(shell pkg-config --libs-only-l portaudio-2.0 )
-endif
-endif
-
-ifeq ($(NO_FLAC),1)
-else
-#LDLIBS += -lFLAC
-ifeq ($(shell pkg-config --exists flac && echo yes),yes)
-CPPFLAGS += -DMPT_WITH_FLAC
-CPPFLAGS += $(shell pkg-config --cflags-only-I flac )
-LDFLAGS += $(shell pkg-config --libs-only-other flac )
-LDFLAGS += $(shell pkg-config --libs-only-L flac )
-LDLIBS += $(shell pkg-config --libs-only-l flac )
-endif
-endif
-
-ifeq ($(NO_WAVPACK),1)
-else
-#LDLIBS += -lwavpack
-ifeq ($(shell pkg-config --exists wavpack && echo yes),yes)
-CPPFLAGS += -DMPT_WITH_WAVPACK
-CPPFLAGS += $(shell pkg-config --cflags-only-I wavpack )
-LDFLAGS += $(shell pkg-config --libs-only-other wavpack )
-LDFLAGS += $(shell pkg-config --libs-only-L wavpack )
-LDLIBS += $(shell pkg-config --libs-only-l wavpack )
-endif
-endif
-
-ifeq ($(NO_SNDFILE),1)
-else
-#LDLIBS += -lsndfile
-ifeq ($(shell pkg-config --exists sndfile && echo yes),yes)
-CPPFLAGS += -DMPT_WITH_SNDFILE
-CPPFLAGS += $(shell pkg-config --cflags-only-I sndfile )
-LDFLAGS += $(shell pkg-config --libs-only-other sndfile )
-LDFLAGS += $(shell pkg-config --libs-only-L sndfile )
-LDLIBS += $(shell pkg-config --libs-only-l sndfile )
-endif
-endif
-
-%: %.o
- $(INFO) [LD ] $@
- $(SILENT)$(LINK.cc) $^ $(LOADLIBES) $(LDLIBS) -o $@
-
-%.o: %.cpp
- $(INFO) [CXX] $<
- $(VERYSILENT)$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -M -MT$@ $< > $*.d
- $(SILENT)$(COMPILE.cc) $(OUTPUT_OPTION) $<
-
-%.o: %.c
- $(INFO) [CC ] $<
- $(VERYSILENT)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -M -MT$@ $< > $*.d
- $(SILENT)$(COMPILE.c) $(OUTPUT_OPTION) $<
-
-
-BUILD_SVNVERSION = $(shell svnversion -n .. )
-CPPFLAGS += -I../common/svn_version_svnversion -D BUILD_SVNVERSION=\"$(BUILD_SVNVERSION)\"
-#CPPFLAGS += -I../common/svn_version_default
-
-
-CPPFLAGS += -DLIBOPENMPT_BUILD
-
-
-COMMON_CXX_SOURCES += \
- $(wildcard ../common/*.cpp) \
-
-SOUNDLIB_CXX_SOURCES += \
- $(COMMON_CXX_SOURCES) \
- $(wildcard ../soundlib/*.cpp) \
-
-
-
-LIBOPENMPT_CXX_SOURCES += \
- $(SOUNDLIB_CXX_SOURCES) \
- $(wildcard ../test/*.cpp) \
- ../libopenmpt/libopenmpt_c.cpp \
- ../libopenmpt/libopenmpt_cxx.cpp \
- ../libopenmpt/libopenmpt_impl.cpp \
- ../libopenmpt/libopenmpt_interactive.cpp \
-
-ifeq ($(NO_ZLIB),1)
-LIBOPENMPT_C_SOURCES += ../include/miniz/miniz.c
-endif
-
-LIBOPENMPT_OBJECTS += $(LIBOPENMPT_CXX_SOURCES:.cpp=.o) $(LIBOPENMPT_C_SOURCES:.c=.o)
-LIBOPENMPT_DEPENDS = $(LIBOPENMPT_OBJECTS:.o=.d)
-ALL_OBJECTS += $(LIBOPENMPT_OBJECTS)
-ALL_DEPENDS += $(LIBOPENMPT_DEPENDS)
-
-ifeq ($(DYNLINK),1)
-OUTPUT_LIBOPENMPT += bin/libopenmpt.so
-else
-OBJECTS_LIBOPENMPT += $(LIBOPENMPT_OBJECTS)
-endif
-
-
-LIBOPENMPT_MODPLUG_C_SOURCES += \
- ../libopenmpt/libopenmpt_modplug.c \
-
-LIBOPENMPT_MODPLUG_OBJECTS = $(LIBOPENMPT_MODPLUG_C_SOURCES:.c=.o)
-LIBOPENMPT_MODPLUG_DEPENDS = $(LIBOPENMPT_MODPLUG_OBJECTS:.o=.d)
-ALL_OBJECTS += $(LIBOPENMPT_MODPLUG_OBJECTS)
-ALL_DEPENDS += $(LIBOPENMPT_MODPLUG_DEPENDS)
-
-
-OPENMPT123_CXX_SOURCES += \
- $(wildcard ../openmpt123/*.cpp) \
-
-OPENMPT123_OBJECTS += $(OPENMPT123_CXX_SOURCES:.cpp=.o)
-OPENMPT123_DEPENDS = $(OPENMPT123_OBJECTS:.o=.d)
-ALL_OBJECTS += $(OPENMPT123_OBJECTS)
-ALL_DEPENDS += $(OPENMPT123_DEPENDS)
-
-
-LIBOPENMPTTEST_CXX_SOURCES += \
- ../libopenmpt/libopenmpt_test.cpp \
-
-LIBOPENMPTTEST_OBJECTS += $(LIBOPENMPTTEST_CXX_SOURCES:.cpp=.o) $(LIBOPENMPTTEST_C_SOURCES:.c=.o)
-LIBOPENMPTTEST_DEPENDS = $(LIBOPENMPTEST_OBJECTS:.o=.d)
-ALL_OBJECTS += $(LIBOPENMPTTEST_OBJECTS)
-ALL_DEPENDS += $(LIBOPENMPTTEST_DEPENDS)
-
-
-EXAMPLES_CXX_SOURCES += $(wildcard ../libopenmpt/examples/*.cpp)
-EXAMPLES_C_SOURCES += $(wildcard ../libopenmpt/examples/*.c)
-
-EXAMPLES_OBJECTS += $(EXAMPLES_CXX_SOURCES:.cpp=.o)
-EXAMPLES_OBJECTS += $(EXAMPLES_C_SOURCES:.c=.o)
-EXAMPLES_DEPENDS = $(EXAMPLES_OBJECTS:.o=.d)
-ALL_OBJECTS += $(EXAMPLES_OBJECTS)
-ALL_DEPENDS += $(EXAMPLES_DEPENDS)
-
-
-.PHONY: all
-all:
-
--include $(ALL_DEPENDS)
-
-ifeq ($(DYNLINK),1)
-OUTPUTS += bin/libopenmpt.so
-OUTPUTS += bin/libopenmpt_modplug.so
-endif
-ifeq ($(SHARED_LIB),1)
-OUTPUTS += bin/libopenmpt.so
-endif
-ifeq ($(STATIC_LIB),1)
-OUTPUTS += bin/openmpt.a
-endif
-ifeq ($(OPENMPT123),1)
-OUTPUTS += bin/openmpt123$(EXESUFFIX)
-endif
-ifeq ($(NO_PORTAUDIO),1)
-else
-ifeq ($(EXAMPLES),1)
-OUTPUTS += bin/libopenmpt_example_c$(EXESUFFIX)
-OUTPUTS += bin/libopenmpt_example_c_mem$(EXESUFFIX)
-OUTPUTS += bin/libopenmpt_example_cxx$(EXESUFFIX)
-endif
-endif
-ifeq ($(TEST),1)
-OUTPUTS += bin/libopenmpt_test$(EXESUFFIX)
-endif
-
-all: $(OUTPUTS)
-
-.PHONY: test
-test: bin/libopenmpt_test$(EXESUFFIX)
- ( cd .. && openmpt123/bin/libopenmpt_test$(EXESUFFIX) )
-
-bin/libopenmpt_test$(EXESUFFIX): $(LIBOPENMPTTEST_OBJECTS) $(OBJECTS_LIBOPENMPT) $(OUTPUT_LIBOPENMPT)
- $(INFO) [LD ] $@
- $(SILENT)$(LINK.cc) $(LDFLAGS_LIBOPENMPT) $(LIBOPENMPTTEST_OBJECTS) $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@
-
-bin/openmpt.a: $(LIBOPENMPT_OBJECTS)
- $(INFO) [AR ] $@
- $(SILENT)$(AR) $(ARFLAGS) $@ $^
-
-bin/libopenmpt.so: $(LIBOPENMPT_OBJECTS)
- $(INFO) [LD ] $@
- $(SILENT)$(LINK.cc) -shared $^ $(LOADLIBES) $(LDLIBS) -o $@
-
-bin/libopenmpt_modplug.so: $(LIBOPENMPT_MODPLUG_OBJECTS) $(OUTPUT_LIBOPENMPT)
- $(INFO) [LD ] $@
- $(SILENT)$(LINK.cc) -shared $(LDFLAGS_LIBOPENMPT) $^ $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@
-
-bin/openmpt123$(EXESUFFIX): $(OPENMPT123_OBJECTS) $(OBJECTS_LIBOPENMPT) $(OUTPUT_LIBOPENMPT)
- $(INFO) [LD ] $@
- $(SILENT)$(LINK.cc) $(LDFLAGS_LIBOPENMPT) $(OPENMPT123_OBJECTS) $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@
-
-bin/libopenmpt_example_c$(EXESUFFIX): ../libopenmpt/examples/libopenmpt_example_c.o $(OBJECTS_LIBOPENMPT) $(OUTPUT_LIBOPENMPT)
- $(INFO) [LD ] $@
- $(SILENT)$(LINK.cc) $(LDFLAGS_LIBOPENMPT) ../libopenmpt/examples/libopenmpt_example_c.o $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@
-
-bin/libopenmpt_example_c_mem$(EXESUFFIX): ../libopenmpt/examples/libopenmpt_example_c_mem.o $(OBJECTS_LIBOPENMPT) $(OUTPUT_LIBOPENMPT)
- $(INFO) [LD ] $@
- $(SILENT)$(LINK.cc) $(LDFLAGS_LIBOPENMPT) ../libopenmpt/examples/libopenmpt_example_c_mem.o $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@
-
-bin/libopenmpt_example_cxx$(EXESUFFIX): ../libopenmpt/examples/libopenmpt_example_cxx.o $(OBJECTS_LIBOPENMPT) $(OUTPUT_LIBOPENMPT)
- $(INFO) [LD ] $@
- $(SILENT)$(LINK.cc) $(LDFLAGS_LIBOPENMPT) ../libopenmpt/examples/libopenmpt_example_cxx.o $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@
-
-ifeq ($(HOST),windows)
-clean:
- $(INFO) clean ...
- $(SILENT)$(RM) $(subst /,\,$(OUTPUTS) $(ALL_OBJECTS) $(ALL_DEPENDS) )
-else
-clean:
- $(INFO) clean ...
- $(SILENT)$(RM) $(OUTPUTS) $(ALL_OBJECTS) $(ALL_DEPENDS)
-endif
Deleted: trunk/OpenMPT/openmpt123/Makefile.config.defaults
===================================================================
--- trunk/OpenMPT/openmpt123/Makefile.config.defaults 2013-12-05 10:51:46 UTC (rev 3373)
+++ trunk/OpenMPT/openmpt123/Makefile.config.defaults 2013-12-05 12:05:14 UTC (rev 3374)
@@ -1,15 +0,0 @@
-
-CC = gcc
-CXX = g++
-LD = g++
-AR = ar
-
-#CPPFLAGS += -DMPT_COMPILER_GENERIC
-CPPFLAGS +=
-CXXFLAGS += -std=c++0x -fPIC
-CFLAGS += -std=c99 -fPIC
-LDFLAGS +=
-LDLIBS += -lm
-ARFLAGS := rcs
-
-EXESUFFIX=
Deleted: trunk/OpenMPT/openmpt123/Makefile.config.llvm
===================================================================
--- trunk/OpenMPT/openmpt123/Makefile.config.llvm 2013-12-05 10:51:46 UTC (rev 3373)
+++ trunk/OpenMPT/openmpt123/Makefile.config.llvm 2013-12-05 12:05:14 UTC (rev 3374)
@@ -1,15 +0,0 @@
-
-CC = clang
-CXX = clang++
-LD = clang++
-AR = ar
-
-#CPPFLAGS += -DMPT_COMPILER_GENERIC
-CPPFLAGS +=
-CXXFLAGS += -std=c++0x -fPIC
-CFLAGS += -std=c99 -fPIC
-LDFLAGS +=
-LDLIBS += -lm
-ARFLAGS := rcs
-
-EXESUFFIX=
Deleted: trunk/OpenMPT/openmpt123/Makefile.config.macosx
===================================================================
--- trunk/OpenMPT/openmpt123/Makefile.config.macosx 2013-12-05 10:51:46 UTC (rev 3373)
+++ trunk/OpenMPT/openmpt123/Makefile.config.macosx 2013-12-05 12:05:14 UTC (rev 3374)
@@ -1,9 +0,0 @@
-
-include Makefile.config.defaults
-
-#LDLIBS += -liconv
-#CPPFLAGS += -DMPT_ICONV_NO_WCHAR
-
-CPPFLAGS += -DMPT_CHARSET_CPP
-
-DYNLINK=0
Deleted: trunk/OpenMPT/openmpt123/Makefile.config.mingw64-win32
===================================================================
--- trunk/OpenMPT/openmpt123/Makefile.config.mingw64-win32 2013-12-05 10:51:46 UTC (rev 3373)
+++ trunk/OpenMPT/openmpt123/Makefile.config.mingw64-win32 2013-12-05 12:05:14 UTC (rev 3374)
@@ -1,24 +0,0 @@
-
-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
-CFLAGS += -std=c99 -municode -mconsole
-LDFLAGS +=
-LDLIBS += -lm -lwinmm
-ARFLAGS := rcs
-
-EXESUFFIX=.exe
-
-DYNLINK=0
-SHARED_LIB=0
-STATIC_LIB=0
-
-NO_ZLIB=1
-NO_PORTAUDIO=1
-NO_SNDFILE=1
-NO_FLAC=1
-NO_WAVPACK=1
Deleted: trunk/OpenMPT/openmpt123/Makefile.config.mingw64-win64
===================================================================
--- trunk/OpenMPT/openmpt123/Makefile.config.mingw64-win64 2013-12-05 10:51:46 UTC (rev 3373)
+++ trunk/OpenMPT/openmpt123/Makefile.config.mingw64-win64 2013-12-05 12:05:14 UTC (rev 3374)
@@ -1,24 +0,0 @@
-
-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
-CFLAGS += -std=c99 -municode -mconsole
-LDFLAGS +=
-LDLIBS += -lm -lwinmm
-ARFLAGS := rcs
-
-EXESUFFIX=.exe
-
-DYNLINK=0
-SHARED_LIB=0
-STATIC_LIB=0
-
-NO_ZLIB=1
-NO_PORTAUDIO=1
-NO_SNDFILE=1
-NO_FLAC=1
-NO_WAVPACK=1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2013-12-05 12:38:04
|
Revision: 3375
http://sourceforge.net/p/modplug/code/3375
Author: manxorist
Date: 2013-12-05 12:37:55 +0000 (Thu, 05 Dec 2013)
Log Message:
-----------
[Int] Makefile: Add make dist target that generates source code tar and zip files.
Modified Paths:
--------------
trunk/OpenMPT/Makefile
trunk/OpenMPT/soundlib/Sndfile.h
Modified: trunk/OpenMPT/Makefile
===================================================================
--- trunk/OpenMPT/Makefile 2013-12-05 12:05:14 UTC (rev 3374)
+++ trunk/OpenMPT/Makefile 2013-12-05 12:37:55 UTC (rev 3375)
@@ -187,12 +187,26 @@
$(VERYSILENT)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -M -MT$@ $< > $*.d
$(SILENT)$(COMPILE.c) $(OUTPUT_OPTION) $<
+%.tar.gz: %.tar
+ $(INFO) [GZIP] $<
+ $(SILENT)gzip --rsyncable --no-name --best > $@ < $<
-BUILD_SVNVERSION = $(shell svnversion -n . )
-CPPFLAGS += -Icommon/svn_version_svnversion -D BUILD_SVNVERSION=\"$(BUILD_SVNVERSION)\"
-#CPPFLAGS += -Icommon/svn_version_default
+SVN_INFO:=$(shell svn info . > /dev/null 2>&1 ; echo $$? )
+ifneq ($(SVN_INFO),0)
+ # not in svn checkout
+ CPPFLAGS += -Icommon/svn_version_default
+ DIST_OPENMPT_VERSION:=rUNKNOWN
+ DIST_LIBOPENMPT_VERSION:=rUNKNOWN
+else
+ # in svn checkout
+ BUILD_SVNVERSION := $(shell svnversion -n . )
+ CPPFLAGS += -Icommon/svn_version_svnversion -D BUILD_SVNVERSION=\"$(BUILD_SVNVERSION)\"
+ DIST_OPENMPT_VERSION:=r$(BUILD_SVNVERSION)
+ DIST_LIBOPENMPT_VERSION:=r$(BUILD_SVNVERSION)
+endif
+
CPPFLAGS += -DLIBOPENMPT_BUILD
@@ -306,6 +320,65 @@
$(INFO) [LD ] $@
$(SILENT)$(LINK.cc) $(LDFLAGS_LIBOPENMPT) $(LIBOPENMPTTEST_OBJECTS) $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@
+.PHONY: dist
+dist: bin/dist.tar
+
+bin/dist.tar: bin/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar.gz
+ rm -rf bin/dist.tar
+ cd bin/ && tar cvf dist.tar OpenMPT-src-$(DIST_OPENMPT_VERSION).zip libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar.gz
+
+.PHONY: bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar
+bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar:
+ mkdir -p bin/dist
+ rm -rf bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)
+ mkdir -p bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)
+ mkdir -p bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include
+ svn export ./LICENSE bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/LICENSE
+ svn export ./README bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/README
+ svn export ./TODO bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/TODO
+ svn export ./bin bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/bin
+ svn export ./build bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/build
+ svn export ./common bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/common
+ svn export ./soundlib bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/soundlib
+ svn export ./test bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/test
+ svn export ./libopenmpt bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/libopenmpt
+ svn export ./openmpt123 bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/openmpt123
+ svn export ./include/miniz bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/miniz
+ svn export ./include/modplug bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/modplug
+ cd bin/dist/ && tar cv libopenmpt-src-$(DIST_LIBOPENMPT_VERSION) > ../libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar
+
+.PHONY: bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip
+bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip:
+ mkdir -p bin/dist-zip
+ rm -rf bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)
+ mkdir -p bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)
+ mkdir -p bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include
+ svn export ./LICENSE bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/LICENSE --native-eol CRLF
+ svn export ./README bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/README --native-eol CRLF
+ svn export ./TODO bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/TODO --native-eol CRLF
+ svn export ./bin bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/bin --native-eol CRLF
+ svn export ./build bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/build --native-eol CRLF
+ svn export ./common bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/common --native-eol CRLF
+ svn export ./soundlib bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/soundlib --native-eol CRLF
+ svn export ./test bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/test --native-eol CRLF
+ svn export ./libopenmpt bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/libopenmpt --native-eol CRLF
+ svn export ./openmpt123 bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/openmpt123 --native-eol CRLF
+ svn export ./include/miniz bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/miniz --native-eol CRLF
+ svn export ./include/flac bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/flac --native-eol CRLF
+ svn export ./include/portaudio bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/portaudio --native-eol CRLF
+ svn export ./include/modplug bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/modplug --native-eol CRLF
+ svn export ./include/foobar2000sdk bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/foobar2000sdk --native-eol CRLF
+ svn export ./include/winamp bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/winamp --native-eol CRLF
+ svn export ./include/xmplay bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/xmplay --native-eol CRLF
+ cd bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/ && zip -r ../../libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip --compression-method deflate -9 *
+
+.PHONY: bin/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip
+bin/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip:
+ mkdir -p bin/dist-zip
+ rm -rf bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION)
+ svn export ./ bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION)/ --native-eol CRLF
+ cd bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION)/ && zip -r ../../OpenMPT-src-$(DIST_OPENMPT_VERSION).zip --compression-method deflate -9 *
+
bin/openmpt.a: $(LIBOPENMPT_OBJECTS)
$(INFO) [AR ] $@
$(SILENT)$(AR) $(ARFLAGS) $@ $^
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2013-12-05 12:05:14 UTC (rev 3374)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2013-12-05 12:37:55 UTC (rev 3375)
@@ -35,10 +35,18 @@
#include "Message.h"
#include "Resampler.h"
+#ifndef NO_REVERB
#include "../sounddsp/Reverb.h"
+#endif
+#ifndef NO_AGC
#include "../sounddsp/AGC.h"
+#endif
+#ifndef NO_DSP
#include "../sounddsp/DSP.h"
+#endif
+#ifndef NO_EQ
#include "../sounddsp/EQ.h"
+#endif
class FileReader;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2013-12-05 15:47:08
|
Revision: 3378
http://sourceforge.net/p/modplug/code/3378
Author: manxorist
Date: 2013-12-05 15:47:00 +0000 (Thu, 05 Dec 2013)
Log Message:
-----------
[Int] build: Include svn revision information into .zip and .tar packages.
[Fix] build: Add Makefile to .zip and .tar packages.
Modified Paths:
--------------
trunk/OpenMPT/Makefile
trunk/OpenMPT/common/svn_version_default/svn_version.h
trunk/OpenMPT/common/svn_version_subwcrev/svn_version.template.h
trunk/OpenMPT/common/svn_version_svnversion/svn_version.h
trunk/OpenMPT/common/version.cpp
trunk/OpenMPT/common/version.h
trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp
Modified: trunk/OpenMPT/Makefile
===================================================================
--- trunk/OpenMPT/Makefile 2013-12-05 14:44:42 UTC (rev 3377)
+++ trunk/OpenMPT/Makefile 2013-12-05 15:47:00 UTC (rev 3378)
@@ -327,8 +327,18 @@
rm -rf bin/dist.tar
cd bin/ && tar cvf dist.tar OpenMPT-src-$(DIST_OPENMPT_VERSION).zip libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar.gz
+.PHONY: bin/svn_version_dist.h
+bin/svn_version_dist.h:
+ rm -rf $@
+ echo > $@.tmp
+ echo '#pragma once' >> $@.tmp
+ echo '#define BUILD_SVNVERSION "$(BUILD_SVNVERSION)"' >> $@.tmp
+ echo '#define BUILD_PACKAGE true' >> $@.tmp
+ echo '#include "../svn_version_svnversion/svn_version.h"' >> $@.tmp
+ mv $@.tmp $@
+
.PHONY: bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar
-bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar:
+bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar: bin/svn_version_dist.h
mkdir -p bin/dist
rm -rf bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)
mkdir -p bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)
@@ -336,6 +346,7 @@
svn export ./LICENSE bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/LICENSE
svn export ./README bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/README
svn export ./TODO bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/TODO
+ svn export ./Makefile bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/Makefile
svn export ./bin bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/bin
svn export ./build bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/build
svn export ./common bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/common
@@ -345,10 +356,11 @@
svn export ./openmpt123 bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/openmpt123
svn export ./include/miniz bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/miniz
svn export ./include/modplug bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/modplug
+ cp bin/svn_version_dist.h bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/common/svn_version_default/svn_version.h
cd bin/dist/ && tar cv libopenmpt-src-$(DIST_LIBOPENMPT_VERSION) > ../libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar
.PHONY: bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip
-bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip:
+bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip: bin/svn_version_dist.h
mkdir -p bin/dist-zip
rm -rf bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)
mkdir -p bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)
@@ -356,6 +368,7 @@
svn export ./LICENSE bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/LICENSE --native-eol CRLF
svn export ./README bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/README --native-eol CRLF
svn export ./TODO bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/TODO --native-eol CRLF
+ svn export ./Makefile bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/Makefile --native-eol CRLF
svn export ./bin bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/bin --native-eol CRLF
svn export ./build bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/build --native-eol CRLF
svn export ./common bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/common --native-eol CRLF
@@ -370,13 +383,15 @@
svn export ./include/foobar2000sdk bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/foobar2000sdk --native-eol CRLF
svn export ./include/winamp bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/winamp --native-eol CRLF
svn export ./include/xmplay bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/xmplay --native-eol CRLF
+ cp bin/svn_version_dist.h bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/common/svn_version_default/svn_version.h
cd bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/ && zip -r ../../libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip --compression-method deflate -9 *
.PHONY: bin/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip
-bin/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip:
+bin/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip: bin/svn_version_dist.h
mkdir -p bin/dist-zip
rm -rf bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION)
svn export ./ bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION)/ --native-eol CRLF
+ cp bin/svn_version_dist.h bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION)/common/svn_version_default/svn_version.h
cd bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION)/ && zip -r ../../OpenMPT-src-$(DIST_OPENMPT_VERSION).zip --compression-method deflate -9 *
bin/openmpt.a: $(LIBOPENMPT_OBJECTS)
Modified: trunk/OpenMPT/common/svn_version_default/svn_version.h
===================================================================
--- trunk/OpenMPT/common/svn_version_default/svn_version.h 2013-12-05 14:44:42 UTC (rev 3377)
+++ trunk/OpenMPT/common/svn_version_default/svn_version.h 2013-12-05 15:47:00 UTC (rev 3378)
@@ -7,5 +7,6 @@
#define OPENMPT_VERSION_DIRTY false
#define OPENMPT_VERSION_MIXEDREVISIONS false
+#define OPENMPT_VERSION_IS_PACKAGE false
+
#define OPENMPT_VERSION_DATE __DATE__ " " __TIME__
-
Modified: trunk/OpenMPT/common/svn_version_subwcrev/svn_version.template.h
===================================================================
--- trunk/OpenMPT/common/svn_version_subwcrev/svn_version.template.h 2013-12-05 14:44:42 UTC (rev 3377)
+++ trunk/OpenMPT/common/svn_version_subwcrev/svn_version.template.h 2013-12-05 15:47:00 UTC (rev 3378)
@@ -7,4 +7,6 @@
#define OPENMPT_VERSION_DIRTY $WCMODS?true:false$
#define OPENMPT_VERSION_MIXEDREVISIONS $WCMIXED?true:false$
+#define OPENMPT_VERSION_IS_PACKAGE false
+
#define OPENMPT_VERSION_DATE "$WCNOW=%Y-%m-%d %H:%M:%S$"
Modified: trunk/OpenMPT/common/svn_version_svnversion/svn_version.h
===================================================================
--- trunk/OpenMPT/common/svn_version_svnversion/svn_version.h 2013-12-05 14:44:42 UTC (rev 3377)
+++ trunk/OpenMPT/common/svn_version_svnversion/svn_version.h 2013-12-05 15:47:00 UTC (rev 3378)
@@ -5,6 +5,12 @@
#define OPENMPT_VERSION_DATE __DATE__ " " __TIME__
+#ifdef BUILD_PACKAGE
+#define OPENMPT_VERSION_IS_PACKAGE true
+#else
+#define OPENMPT_VERSION_IS_PACKAGE false
+#endif
+
#ifndef BUILD_SVNVERSION
#define OPENMPT_VERSION_REVISION 0
Modified: trunk/OpenMPT/common/version.cpp
===================================================================
--- trunk/OpenMPT/common/version.cpp 2013-12-05 14:44:42 UTC (rev 3377)
+++ trunk/OpenMPT/common/version.cpp 2013-12-05 15:47:00 UTC (rev 3378)
@@ -134,6 +134,15 @@
#endif
}
+bool IsPackage()
+{
+ #if defined(OPENMPT_VERSION_IS_PACKAGE)
+ return OPENMPT_VERSION_IS_PACKAGE;
+ #else
+ return false;
+ #endif
+}
+
std::string GetStateString()
{
std::string retval;
@@ -145,6 +154,10 @@
{
retval += "+dirty";
}
+ if(IsPackage())
+ {
+ retval += "-pkg";
+ }
return retval;
}
@@ -194,6 +207,10 @@
{
str += "+";
}
+ if(IsPackage())
+ {
+ str += "p";
+ }
return str;
}
Modified: trunk/OpenMPT/common/version.h
===================================================================
--- trunk/OpenMPT/common/version.h 2013-12-05 14:44:42 UTC (rev 3377)
+++ trunk/OpenMPT/common/version.h 2013-12-05 15:47:00 UTC (rev 3378)
@@ -60,6 +60,9 @@
// Return if the svn working copy had files checked out from different revisions and/or branches (if built from a svn working copy and tsvn was available during build)
bool HasMixedRevisions();
+ // Return whether the build was done from packaged source code (i.e. from the genertaed .zip or .tar source)
+ bool IsPackage();
+
// Return a string decribing the working copy state (dirty and/or mixed revisions) (if built from a svn working copy and tsvn was available during build)
std::string GetStateString(); // e.g. "" or "+mixed" or "+mixed+dirty" or "+dirty"
Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-12-05 14:44:42 UTC (rev 3377)
+++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-12-05 15:47:00 UTC (rev 3378)
@@ -62,8 +62,16 @@
}
if ( MptVersion::IsDirty() ) {
str += ".2-modified";
+ if ( MptVersion::IsPackage() ) {
+ str += "-pkg";
+ }
} else if ( MptVersion::HasMixedRevisions() ) {
str += ".1-modified";
+ if ( MptVersion::IsPackage() ) {
+ str += "-pkg";
+ }
+ } else if ( MptVersion::IsPackage() ) {
+ str += ".0-pkg";
}
return str;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2013-12-05 16:43:10
|
Revision: 3379
http://sourceforge.net/p/modplug/code/3379
Author: manxorist
Date: 2013-12-05 16:43:01 +0000 (Thu, 05 Dec 2013)
Log Message:
-----------
[Ref] AMS Loader: Move character set conversion to global charset conversion functions and add tables for AMS1 and AMS2 character sets based on CP437.
[Ref] AMS Loader: Set character set back to CP437 instead of Windows-1252 and convert song message using the mpt::CharsetCP437AMS[2] into CP437.
[Ref] Remove now unused SongMessage::ConverterFunc .
Modified Paths:
--------------
trunk/OpenMPT/common/mptString.cpp
trunk/OpenMPT/common/mptString.h
trunk/OpenMPT/soundlib/Load_ams.cpp
trunk/OpenMPT/soundlib/Message.cpp
trunk/OpenMPT/soundlib/Message.h
trunk/OpenMPT/soundlib/Tables.cpp
Modified: trunk/OpenMPT/common/mptString.cpp
===================================================================
--- trunk/OpenMPT/common/mptString.cpp 2013-12-05 15:47:00 UTC (rev 3378)
+++ trunk/OpenMPT/common/mptString.cpp 2013-12-05 16:43:01 UTC (rev 3379)
@@ -63,8 +63,6 @@
-#if defined(MPT_CHARSET_CPP)
-
/*
default 1:1 mapping
static const uint32 CharsetTableISO8859_1[256] = {
@@ -87,6 +85,8 @@
};
*/
+#if defined(MPT_CHARSET_CPP)
+
static const uint32 CharsetTableISO8859_15[256] = {
0x0000,0x0001,0x0002,0x0003,0x0004,0x0005,0x0006,0x0007,0x0008,0x0009,0x000a,0x000b,0x000c,0x000d,0x000e,0x000f,
0x0010,0x0011,0x0012,0x0013,0x0014,0x0015,0x0016,0x0017,0x0018,0x0019,0x001a,0x001b,0x001c,0x001d,0x001e,0x001f,
@@ -144,6 +144,57 @@
0x2261,0x00b1,0x2265,0x2264,0x2320,0x2321,0x00f7,0x2248,0x00b0,0x2219,0x00b7,0x221a,0x207f,0x00b2,0x25a0,0x00a0
};
+#endif
+
+#define C(x) ((uint8)(x))
+
+// AMS1 actually only supports ASCII plus the modified control characters and no high chars at all.
+// Just default to CP437 for those to keep things simple.
+static const uint32 CharsetTableCP437AMS[256] = {
+ C(' '),0x0001,0x0002,0x0003,0x00e4,0x0005,0x00e5,0x0007,0x0008,0x0009,0x000a,0x000b,0x000c,0x000d,0x00c4,0x00c5, // differs from CP437
+ 0x0010,0x0011,0x0012,0x0013,0x00f6,0x0015,0x0016,0x0017,0x0018,0x00d6,0x001a,0x001b,0x001c,0x001d,0x001e,0x001f, // differs from CP437
+ 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,0x0029,0x002a,0x002b,0x002c,0x002d,0x002e,0x002f,
+ 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003a,0x003b,0x003c,0x003d,0x003e,0x003f,
+ 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004a,0x004b,0x004c,0x004d,0x004e,0x004f,
+ 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005a,0x005b,0x005c,0x005d,0x005e,0x005f,
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006a,0x006b,0x006c,0x006d,0x006e,0x006f,
+ 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007a,0x007b,0x007c,0x007d,0x007e,0x2302,
+ 0x00c7,0x00fc,0x00e9,0x00e2,0x00e4,0x00e0,0x00e5,0x00e7,0x00ea,0x00eb,0x00e8,0x00ef,0x00ee,0x00ec,0x00c4,0x00c5,
+ 0x00c9,0x00e6,0x00c6,0x00f4,0x00f6,0x00f2,0x00fb,0x00f9,0x00ff,0x00d6,0x00dc,0x00a2,0x00a3,0x00a5,0x20a7,0x0192,
+ 0x00e1,0x00ed,0x00f3,0x00fa,0x00f1,0x00d1,0x00aa,0x00ba,0x00bf,0x2310,0x00ac,0x00bd,0x00bc,0x00a1,0x00ab,0x00bb,
+ 0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556,0x2555,0x2563,0x2551,0x2557,0x255d,0x255c,0x255b,0x2510,
+ 0x2514,0x2534,0x252c,0x251c,0x2500,0x253c,0x255e,0x255f,0x255a,0x2554,0x2569,0x2566,0x2560,0x2550,0x256c,0x2567,
+ 0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256b,0x256a,0x2518,0x250c,0x2588,0x2584,0x258c,0x2590,0x2580,
+ 0x03b1,0x00df,0x0393,0x03c0,0x03a3,0x03c3,0x00b5,0x03c4,0x03a6,0x0398,0x03a9,0x03b4,0x221e,0x03c6,0x03b5,0x2229,
+ 0x2261,0x00b1,0x2265,0x2264,0x2320,0x2321,0x00f7,0x2248,0x00b0,0x2219,0x00b7,0x221a,0x207f,0x00b2,0x25a0,0x00a0
+};
+
+// AMS2: Looking at Velvet Studio's bitmap font (TPIC32.PCX), these appear to be the only supported non-ASCII chars.
+static const uint32 CharsetTableCP437AMS2[256] = {
+ C(' '),0x00a9,0x221a,0x00b7,C('0'),C('1'),C('2'),C('3'),C('4'),C('5'),C('6'),C('7'),C('8'),C('9'),C('A'),C('B'), // differs from CP437
+ C('C'),C('D'),C('E'),C('F'),C(' '),0x00a7,C(' '),C(' '),C(' '),C(' '),C(' '),C(' '),C(' '),C(' '),C(' '),C(' '), // differs from CP437
+ 0x0020,0x0021,0x0022,0x0023,0x0024,0x0025,0x0026,0x0027,0x0028,0x0029,0x002a,0x002b,0x002c,0x002d,0x002e,0x002f,
+ 0x0030,0x0031,0x0032,0x0033,0x0034,0x0035,0x0036,0x0037,0x0038,0x0039,0x003a,0x003b,0x003c,0x003d,0x003e,0x003f,
+ 0x0040,0x0041,0x0042,0x0043,0x0044,0x0045,0x0046,0x0047,0x0048,0x0049,0x004a,0x004b,0x004c,0x004d,0x004e,0x004f,
+ 0x0050,0x0051,0x0052,0x0053,0x0054,0x0055,0x0056,0x0057,0x0058,0x0059,0x005a,0x005b,0x005c,0x005d,0x005e,0x005f,
+ 0x0060,0x0061,0x0062,0x0063,0x0064,0x0065,0x0066,0x0067,0x0068,0x0069,0x006a,0x006b,0x006c,0x006d,0x006e,0x006f,
+ 0x0070,0x0071,0x0072,0x0073,0x0074,0x0075,0x0076,0x0077,0x0078,0x0079,0x007a,0x007b,0x007c,0x007d,0x007e,0x2302,
+ 0x00c7,0x00fc,0x00e9,0x00e2,0x00e4,0x00e0,0x00e5,0x00e7,0x00ea,0x00eb,0x00e8,0x00ef,0x00ee,0x00ec,0x00c4,0x00c5,
+ 0x00c9,0x00e6,0x00c6,0x00f4,0x00f6,0x00f2,0x00fb,0x00f9,0x00ff,0x00d6,0x00dc,0x00a2,0x00a3,0x00a5,0x20a7,0x0192,
+ 0x00e1,0x00ed,0x00f3,0x00fa,0x00f1,0x00d1,0x00aa,0x00ba,0x00bf,0x2310,0x00ac,0x00bd,0x00bc,0x00a1,0x00ab,0x00bb,
+ 0x2591,0x2592,0x2593,0x2502,0x2524,0x2561,0x2562,0x2556,0x2555,0x2563,0x2551,0x2557,0x255d,0x255c,0x255b,0x2510,
+ 0x2514,0x2534,0x252c,0x251c,0x2500,0x253c,0x255e,0x255f,0x255a,0x2554,0x2569,0x2566,0x2560,0x2550,0x256c,0x2567,
+ 0x2568,0x2564,0x2565,0x2559,0x2558,0x2552,0x2553,0x256b,0x256a,0x2518,0x250c,0x2588,0x2584,0x258c,0x2590,0x2580,
+ 0x03b1,0x00df,0x0393,0x03c0,0x03a3,0x03c3,0x00b5,0x03c4,0x03a6,0x0398,0x03a9,0x03b4,0x221e,0x03c6,0x03b5,0x2229,
+ 0x2261,0x00b1,0x2265,0x2264,0x2320,0x2321,0x00f7,0x2248,0x00b0,0x2219,0x00b7,0x221a,0x207f,0x00b2,0x25a0,0x00a0
+};
+
+#undef C
+
+#if MPT_COMPILER_MSVC
+#pragma warning(disable:4428) // universal-character-name encountered in source
+#endif
+
static std::wstring From8bit(const std::string &str, const uint32 (&table)[256], wchar_t replacement = L'\uFFFD')
//---------------------------------------------------------------------------------------------------------------
{
@@ -170,7 +221,10 @@
{
uint32 c = str[i];
bool found = false;
- for(std::size_t x = 0; x < CountOf(table); ++x)
+ // Try non-control characters first.
+ // In cases where there are actual characters mirrored in this range (like in AMS/AMS2 character sets),
+ // characters in the common range are preferred this way.
+ for(std::size_t x = 0x20; x < CountOf(table); ++x)
{
if(c == table[x])
{
@@ -181,12 +235,27 @@
}
if(!found)
{
+ // try control characters
+ for(std::size_t x = 0x00; x < CountOf(table) && x < 0x20; ++x)
+ {
+ if(c == table[x])
+ {
+ res.push_back(static_cast<char>(static_cast<uint8>(x)));
+ found = true;
+ break;
+ }
+ }
+ }
+ if(!found)
+ {
res.push_back(replacement);
}
}
return res;
}
+#if defined(MPT_CHARSET_CPP)
+
static std::wstring FromAscii(const std::string &str, wchar_t replacement = L'\uFFFD')
//------------------------------------------------------------------------------------
{
@@ -503,6 +572,18 @@
Tdststring EncodeImpl(Charset charset, const std::wstring &src)
{
STATIC_ASSERT(sizeof(typename Tdststring::value_type) == sizeof(char));
+ if(charset == CharsetCP437AMS || charset == CharsetCP437AMS2)
+ {
+ std::string out;
+ switch(charset)
+ {
+ case CharsetCP437AMS : out = String::To8bit(src, CharsetTableCP437AMS ); break;
+ case CharsetCP437AMS2: out = String::To8bit(src, CharsetTableCP437AMS2); break;
+ }
+ Tdststring result;
+ std::copy(out.begin(), out.end(), std::back_inserter(result));
+ return result;
+ }
#if defined(MPT_CHARSET_CPP)
std::string out;
switch(charset)
@@ -574,6 +655,18 @@
std::wstring DecodeImpl(Charset charset, const Tsrcstring &src)
{
STATIC_ASSERT(sizeof(typename Tsrcstring::value_type) == sizeof(char));
+ if(charset == CharsetCP437AMS || charset == CharsetCP437AMS2)
+ {
+ std::string in;
+ std::copy(src.begin(), src.end(), std::back_inserter(in));
+ std::wstring out;
+ switch(charset)
+ {
+ case CharsetCP437AMS : out = String::From8bit(in, CharsetTableCP437AMS ); break;
+ case CharsetCP437AMS2: out = String::From8bit(in, CharsetTableCP437AMS2); break;
+ }
+ return out;
+ }
#if defined(MPT_CHARSET_CPP)
std::string in;
std::copy(src.begin(), src.end(), std::back_inserter(in));
@@ -657,6 +750,10 @@
#if defined(MPT_CHARSET_CPP) || defined(WIN32)
return EncodeImpl<Tdststring>(to, DecodeImpl(from, src));
#else // !WIN32
+ if(to == CharsetCP437AMS || to == CharsetCP437AMS2 || from == CharsetCP437AMS || from == CharsetCP437AMS2)
+ {
+ return EncodeImpl<Tdststring>(to, DecodeImpl(from, src));
+ }
iconv_t conv = iconv_t();
conv = iconv_open(CharsetToStringTranslit(to), CharsetToString(from));
if(!conv)
Modified: trunk/OpenMPT/common/mptString.h
===================================================================
--- trunk/OpenMPT/common/mptString.h 2013-12-05 15:47:00 UTC (rev 3378)
+++ trunk/OpenMPT/common/mptString.h 2013-12-05 16:43:01 UTC (rev 3379)
@@ -174,6 +174,8 @@
CharsetISO8859_15,
CharsetCP437,
+ CharsetCP437AMS,
+ CharsetCP437AMS2,
CharsetWindows1252,
};
Modified: trunk/OpenMPT/soundlib/Load_ams.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_ams.cpp 2013-12-05 15:47:00 UTC (rev 3378)
+++ trunk/OpenMPT/soundlib/Load_ams.cpp 2013-12-05 16:43:01 UTC (rev 3379)
@@ -18,29 +18,11 @@
#include "stdafx.h"
#include "Loaders.h"
+#include <iterator>
/////////////////////////////////////////////////////////////////////
// Common code for both AMS formats
-// Callback function for reading text
-static char ConvertAMSTextChars(char c)
-//-------------------------------------
-{
- // Convert to Windows-1252 for now.
- switch((unsigned char)c)
- {
- case 0x00: return ' ';
- case 0x04: return '\xE4'; // Lower-case ae
- case 0x06: return '\xE5'; // Lower-case a-ring
- case 0x0E: return '\xC4'; // Upper-case AE
- case 0x0F: return '\xC5'; // Upper-case A-ring
- case 0x14: return '\xF6'; // Lower-case oe
- case 0x19: return '\xD6'; // Upper-case OE
- }
- return c;
-}
-
-
// Read variable-length AMS string (we ignore the maximum text length specified by the AMS specs and accept any length).
template<size_t destSize>
static bool ReadAMSString(char (&destBuffer)[destSize], FileReader &file)
@@ -481,8 +463,12 @@
}
}
+ std::string str;
+ std::copy(textOut.begin(), textOut.end(), std::back_inserter(str));
+ str = mpt::To(mpt::CharsetCP437, mpt::CharsetCP437AMS, str);
+
// Packed text doesn't include any line breaks!
- songMessage.ReadFixedLineLength(&textOut[0], textOut.size(), 76, 0, ConvertAMSTextChars);
+ songMessage.ReadFixedLineLength(str.c_str(), str.length(), 76, 0);
}
// Read Order List
@@ -530,30 +516,6 @@
// AMS (Velvet Studio) 2.0 - 2.02 loader
-// Callback function for reading text - looking at Velvet Studio's bitmap font (TPIC32.PCX), these appear to be the only supported non-ASCII chars.
-static char ConvertAMS2TextChars(char c)
-//--------------------------------------
-{
- // Convert to Windows-1252 for now.
- const char controlChars[] =
- {
- ' ', '\xA9', 'v' /* actually supposed to be a root/check sign */, '\xB7',
- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', // Small GUI letters
- ' ', '\xA7'
- };
- const char highChars[] = { '\xE4', ' ', '\xE5', ' ', ' ', ' ', ' ', ' ', ' ', ' ', '\xC4', '\xC5', ' ', ' ', ' ', ' ', '\xF6', ' ', ' ', ' ', ' ', '\xD6' };
-
- if((unsigned char)c < CountOf(controlChars))
- {
- return controlChars[(unsigned char)c];
- } else if((unsigned char)c >= 0x84 && (unsigned char)c < 0x84 + CountOf(highChars))
- {
- return highChars[(unsigned char)c - 0x84];
- }
- return c;
-}
-
-
#ifdef NEEDS_PRAGMA_PACK
#pragma pack(push, 1)
#endif
@@ -923,7 +885,10 @@
uint8 composerLength = file.ReadUint8();
if(composerLength)
{
- songMessage.Read(file, composerLength, SongMessage::leAutodetect, ConvertAMS2TextChars);
+ std::string str;
+ file.ReadString<mpt::String::spacePadded>(str, composerLength);
+ str = mpt::To(mpt::CharsetCP437, mpt::CharsetCP437AMS2, str);
+ songMessage.Read(str.c_str(), str.length(), SongMessage::leAutodetect);
}
// Channel names
@@ -962,8 +927,11 @@
textOut[writeLen++] = c;
}
}
+ std::string str;
+ std::copy(textOut.begin(), textOut.begin() + descriptionHeader.unpackedLen, std::back_inserter(str));
+ str = mpt::To(mpt::CharsetCP437, mpt::CharsetCP437AMS2, str);
// Packed text doesn't include any line breaks!
- songMessage.ReadFixedLineLength(&textOut[0], descriptionHeader.unpackedLen, 74, 0, ConvertAMS2TextChars);
+ songMessage.ReadFixedLineLength(str.c_str(), str.length(), 74, 0);
}
// Read Order List
Modified: trunk/OpenMPT/soundlib/Message.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Message.cpp 2013-12-05 15:47:00 UTC (rev 3378)
+++ trunk/OpenMPT/soundlib/Message.cpp 2013-12-05 16:43:01 UTC (rev 3379)
@@ -21,10 +21,9 @@
// [in] data: pointer to the data in memory that is going to be read
// [in] length: number of characters that should be read, not including a possible trailing null terminator (it is automatically appended).
// [in] lineEnding: line ending formatting of the text in memory.
-// [in] pTextConverter: Pointer to a callback function which can be used to pre-process the read characters, if necessary (nullptr otherwise).
// [out] returns true on success.
-bool SongMessage::Read(const void *data, size_t length, LineEnding lineEnding, ConverterFunc pTextConverter)
-//----------------------------------------------------------------------------------------------------------
+bool SongMessage::Read(const void *data, size_t length, LineEnding lineEnding)
+//----------------------------------------------------------------------------
{
const char *str = static_cast<const char *>(data);
while(length != 0 && str[length - 1] == '\0')
@@ -42,8 +41,6 @@
for(size_t i = 0; i < length; i++)
{
char c = str[i];
- if(pTextConverter != nullptr)
- c = pTextConverter(c);
if(c == '\r') nCR++;
else if(c == '\n') nLF++;
@@ -67,8 +64,6 @@
for(size_t i = 0; i < length; i++)
{
char c = str[i];
- if(pTextConverter != nullptr)
- c = pTextConverter(c);
if(c != '\n' || lineEnding != leCRLF)
finalLength++;
@@ -80,8 +75,6 @@
for(size_t i = 0; i < length; i++, cpos++)
{
char c = str[i];
- if(pTextConverter != nullptr)
- c = pTextConverter(c);
switch(c)
{
@@ -111,11 +104,11 @@
}
-bool SongMessage::Read(FileReader &file, const size_t length, LineEnding lineEnding, ConverterFunc pTextConverter)
-//----------------------------------------------------------------------------------------------------------------
+bool SongMessage::Read(FileReader &file, const size_t length, LineEnding lineEnding)
+//----------------------------------------------------------------------------------
{
FileReader::off_t readLength = std::min(static_cast<FileReader::off_t>(length), file.BytesLeft());
- bool success = Read(file.GetRawData(), readLength, lineEnding, pTextConverter);
+ bool success = Read(file.GetRawData(), readLength, lineEnding);
file.Skip(readLength);
return success;
}
@@ -126,10 +119,9 @@
// [in] length: number of characters that should be read, not including a possible trailing null terminator (it is automatically appended).
// [in] lineLength: The fixed length of a line.
// [in] lineEndingLength: The padding space between two fixed lines. (there could for example be a null char after every line)
-// [in] pTextConverter: Pointer to a callback function which can be used to pre-process the read characters, if necessary (nullptr otherwise).
// [out] returns true on success.
-bool SongMessage::ReadFixedLineLength(const void *data, const size_t length, const size_t lineLength, const size_t lineEndingLength, ConverterFunc pTextConverter)
-//----------------------------------------------------------------------------------------------------------------------------------------------------------------
+bool SongMessage::ReadFixedLineLength(const void *data, const size_t length, const size_t lineLength, const size_t lineEndingLength)
+//----------------------------------------------------------------------------------------------------------------------------------
{
const char *str = static_cast<const char *>(data);
if(lineLength == 0)
@@ -148,9 +140,6 @@
// fix weird chars
for(size_t lpos = 0; lpos < lineLength; lpos++)
{
- // Pre-process text
- if(pTextConverter != nullptr) at(cpos + lpos) = pTextConverter(at(cpos + lpos));
-
switch(at(cpos + lpos))
{
case '\0':
@@ -166,11 +155,11 @@
}
-bool SongMessage::ReadFixedLineLength(FileReader &file, const size_t length, const size_t lineLength, const size_t lineEndingLength, ConverterFunc pTextConverter)
-//----------------------------------------------------------------------------------------------------------------------------------------------------------------
+bool SongMessage::ReadFixedLineLength(FileReader &file, const size_t length, const size_t lineLength, const size_t lineEndingLength)
+//----------------------------------------------------------------------------------------------------------------------------------
{
FileReader::off_t readLength = std::min(static_cast<FileReader::off_t>(length), file.BytesLeft());
- bool success = ReadFixedLineLength(file.GetRawData(), readLength, lineLength, lineEndingLength, pTextConverter);
+ bool success = ReadFixedLineLength(file.GetRawData(), readLength, lineLength, lineEndingLength);
file.Skip(readLength);
return success;
}
@@ -178,10 +167,9 @@
// Retrieve song message.
// [in] lineEnding: line ending formatting of the text in memory.
-// [in] pTextConverter: Pointer to a callback function which can be used to post-process the written characters, if necessary (nullptr otherwise).
// [out] returns formatted song message.
-std::string SongMessage::GetFormatted(const LineEnding lineEnding, ConverterFunc pTextConverter) const
-//----------------------------------------------------------------------------------------------------
+std::string SongMessage::GetFormatted(const LineEnding lineEnding) const
+//----------------------------------------------------------------------
{
std::string comments;
@@ -214,8 +202,6 @@
} else
{
char c = at(i);
- // Pre-process text
- if(pTextConverter != nullptr) c = pTextConverter(c);
comments.at(writePos++) = c;
}
}
Modified: trunk/OpenMPT/soundlib/Message.h
===================================================================
--- trunk/OpenMPT/soundlib/Message.h 2013-12-05 15:47:00 UTC (rev 3378)
+++ trunk/OpenMPT/soundlib/Message.h 2013-12-05 16:43:01 UTC (rev 3379)
@@ -20,8 +20,6 @@
{
public:
- typedef char (*ConverterFunc)(char);
-
// Line ending types (for reading song messages from module files)
enum LineEnding
{
@@ -41,24 +39,21 @@
// [in] data: pointer to the data in memory that is going to be read
// [in] length: number of characters that should be read, not including a possible trailing null terminator (it is automatically appended).
// [in] lineEnding: line ending formatting of the text in memory.
- // [in] pTextConverter: Pointer to a callback function which can be used to pre-process the read characters, if necessary (nullptr otherwise).
// [out] returns true on success.
- bool Read(const void *data, const size_t length, LineEnding lineEnding, ConverterFunc pTextConverter = nullptr);
- bool Read(FileReader &file, const size_t length, LineEnding lineEnding, ConverterFunc pTextConverter = nullptr);
+ bool Read(const void *data, const size_t length, LineEnding lineEnding);
+ bool Read(FileReader &file, const size_t length, LineEnding lineEnding);
// Read comments with fixed line length from a mapped file.
// [in] data: pointer to the data in memory that is going to be read
// [in] length: number of characters that should be read, not including a possible trailing null terminator (it is automatically appended).
// [in] lineLength: The fixed length of a line.
// [in] lineEndingLength: The padding space between two fixed lines. (there could for example be a null char after every line)
- // [in] pTextConverter: Pointer to a callback function which can be used to pre-process the read characters, if necessary (nullptr otherwise).
// [out] returns true on success.
- bool ReadFixedLineLength(const void *data, const size_t length, const size_t lineLength, const size_t lineEndingLength, ConverterFunc pTextConverter = nullptr);
- bool ReadFixedLineLength(FileReader &file, const size_t length, const size_t lineLength, const size_t lineEndingLength, ConverterFunc pTextConverter = nullptr);
+ bool ReadFixedLineLength(const void *data, const size_t length, const size_t lineLength, const size_t lineEndingLength);
+ bool ReadFixedLineLength(FileReader &file, const size_t length, const size_t lineLength, const size_t lineEndingLength);
// Retrieve song message.
// [in] lineEnding: line ending formatting of the text in memory.
- // [in] pTextConverter: Pointer to a callback function which can be used to post-process the written characters, if necessary (nullptr otherwise).
// [out] returns formatted song message.
- std::string GetFormatted(const LineEnding lineEnding, ConverterFunc pTextConverter = nullptr) const;
+ std::string GetFormatted(const LineEnding lineEnding) const;
};
Modified: trunk/OpenMPT/soundlib/Tables.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Tables.cpp 2013-12-05 15:47:00 UTC (rev 3378)
+++ trunk/OpenMPT/soundlib/Tables.cpp 2013-12-05 16:43:01 UTC (rev 3379)
@@ -168,8 +168,8 @@
{ MOD_TYPE_J2B , MOD_CHARSET_IS , mpt::CharsetCP437 },
{ MOD_TYPE_IMF , MOD_CHARSET_IS , mpt::CharsetCP437 },
{ MOD_TYPE_ULT , MOD_CHARSET_IS , mpt::CharsetCP437 },
- { MOD_TYPE_AMS , MOD_CHARSET_IS , mpt::CharsetWindows1252}, // We convert the custom AMS special character set to our own set.
- { MOD_TYPE_AMS2, MOD_CHARSET_IS , mpt::CharsetWindows1252}, // ditto
+ { MOD_TYPE_AMS , MOD_CHARSET_IS , mpt::CharsetCP437 },
+ { MOD_TYPE_AMS2, MOD_CHARSET_IS , mpt::CharsetCP437 },
{ MOD_TYPE_DSM , MOD_CHARSET_IS , mpt::CharsetCP437 },
// Windows
{ MOD_TYPE_MT2 , MOD_CHARSET_MAYBE , mpt::CharsetWindows1252},
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2013-12-05 18:32:52
|
Revision: 3386
http://sourceforge.net/p/modplug/code/3386
Author: manxorist
Date: 2013-12-05 18:32:43 +0000 (Thu, 05 Dec 2013)
Log Message:
-----------
[Ref] sounddev: Move description of the exclusive mode checkbox into SoundDeviceCaps.
Modified Paths:
--------------
trunk/OpenMPT/mptrack/Mpdlgs.cpp
trunk/OpenMPT/sounddev/SoundDevice.h
trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp
trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp
Modified: trunk/OpenMPT/mptrack/Mpdlgs.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-12-05 18:27:14 UTC (rev 3385)
+++ trunk/OpenMPT/mptrack/Mpdlgs.cpp 2013-12-05 18:32:43 UTC (rev 3386)
@@ -523,16 +523,7 @@
GetDlgItem(IDC_CHECK5)->EnableWindow(m_CurrentDeviceCaps.CanBoostThreadPriority ? TRUE : FALSE);
GetDlgItem(IDC_STATIC_UPDATEINTERVAL)->EnableWindow(m_CurrentDeviceCaps.CanUpdateInterval ? TRUE : FALSE);
GetDlgItem(IDC_COMBO_UPDATEINTERVAL)->EnableWindow(m_CurrentDeviceCaps.CanUpdateInterval ? TRUE : FALSE);
- if(m_CurrentDeviceInfo.id.GetType() == SNDDEV_DSOUND)
- {
- GetDlgItem(IDC_CHECK4)->SetWindowText("Use primary buffer");
- } else if(m_CurrentDeviceInfo.id.GetType() == SNDDEV_ASIO)
- {
- GetDlgItem(IDC_CHECK4)->SetWindowText("Keep device running");
- } else
- {
- GetDlgItem(IDC_CHECK4)->SetWindowText("Use device exclusively");
- }
+ GetDlgItem(IDC_CHECK4)->SetWindowText(mpt::ToCString(m_CurrentDeviceCaps.ExclusiveModeDescription));
CheckDlgButton(IDC_CHECK4, m_Settings.ExclusiveMode ? MF_CHECKED : MF_UNCHECKED);
CheckDlgButton(IDC_CHECK5, m_Settings.BoostThreadPriority ? MF_CHECKED : MF_UNCHECKED);
}
Modified: trunk/OpenMPT/sounddev/SoundDevice.h
===================================================================
--- trunk/OpenMPT/sounddev/SoundDevice.h 2013-12-05 18:27:14 UTC (rev 3385)
+++ trunk/OpenMPT/sounddev/SoundDevice.h 2013-12-05 18:32:43 UTC (rev 3386)
@@ -308,6 +308,7 @@
bool CanUseHardwareTiming;
bool CanChannelMapping;
bool CanDriverPanel;
+ std::wstring ExclusiveModeDescription;
SoundDeviceCaps()
: currentSampleRate(0)
, CanUpdateInterval(true)
@@ -317,6 +318,7 @@
, CanUseHardwareTiming(false)
, CanChannelMapping(false)
, CanDriverPanel(false)
+ , ExclusiveModeDescription(L"Use device exclusively")
{
return;
}
Modified: trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp
===================================================================
--- trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-12-05 18:27:14 UTC (rev 3385)
+++ trunk/OpenMPT/sounddev/SoundDeviceASIO.cpp 2013-12-05 18:32:43 UTC (rev 3386)
@@ -1197,6 +1197,7 @@
caps.CanUseHardwareTiming = true;
caps.CanChannelMapping = true;
caps.CanDriverPanel = true;
+ caps.ExclusiveModeDescription = L"Keep device running";
TemporaryASIODriverOpener opener(*this);
if(!IsDriverOpen())
Modified: trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp
===================================================================
--- trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp 2013-12-05 18:27:14 UTC (rev 3385)
+++ trunk/OpenMPT/sounddev/SoundDeviceDirectSound.cpp 2013-12-05 18:32:43 UTC (rev 3386)
@@ -121,6 +121,7 @@
caps.CanUseHardwareTiming = false;
caps.CanChannelMapping = false;
caps.CanDriverPanel = false;
+ caps.ExclusiveModeDescription = L"Use primary buffer";
IDirectSound *dummy = nullptr;
IDirectSound *ds = nullptr;
if(m_piDS)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2013-12-06 06:50:17
|
Revision: 3393
http://sourceforge.net/p/modplug/code/3393
Author: manxorist
Date: 2013-12-06 06:50:02 +0000 (Fri, 06 Dec 2013)
Log Message:
-----------
[New] libopenmpt: Add set_position_order_row().
[New] openmpt123: Add prev/next order seeking via H/L and prev/next row seeking via J/K.
Modified Paths:
--------------
trunk/OpenMPT/libopenmpt/libopenmpt.h
trunk/OpenMPT/libopenmpt/libopenmpt.hpp
trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp
trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp
trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp
trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp
trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c
trunk/OpenMPT/openmpt123/openmpt123.cpp
Modified: trunk/OpenMPT/libopenmpt/libopenmpt.h
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt.h 2013-12-06 06:48:16 UTC (rev 3392)
+++ trunk/OpenMPT/libopenmpt/libopenmpt.h 2013-12-06 06:50:02 UTC (rev 3393)
@@ -88,6 +88,8 @@
LIBOPENMPT_API double openmpt_module_set_position_seconds( openmpt_module * mod, double seconds );
LIBOPENMPT_API double openmpt_module_get_position_seconds( openmpt_module * mod );
+LIBOPENMPT_API double openmpt_module_set_position_order_row( openmpt_module * mod, int32_t order, int32_t row );
+
LIBOPENMPT_API int openmpt_module_get_render_param( openmpt_module * mod, int param, int32_t * value );
LIBOPENMPT_API int openmpt_module_set_render_param( openmpt_module * mod, int param, int32_t value );
Modified: trunk/OpenMPT/libopenmpt/libopenmpt.hpp
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt.hpp 2013-12-06 06:48:16 UTC (rev 3392)
+++ trunk/OpenMPT/libopenmpt/libopenmpt.hpp 2013-12-06 06:50:02 UTC (rev 3393)
@@ -118,6 +118,8 @@
double set_position_seconds( double seconds );
double get_position_seconds() const;
+ double set_position_order_row( std::int32_t order, std::int32_t row );
+
std::int32_t get_render_param( int param ) const;
void set_render_param( int param, std::int32_t value );
Modified: trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp 2013-12-06 06:48:16 UTC (rev 3392)
+++ trunk/OpenMPT/libopenmpt/libopenmpt_c.cpp 2013-12-06 06:50:02 UTC (rev 3393)
@@ -383,7 +383,7 @@
OPENMPT_INTERFACE_CHECK_SOUNDFILE( mod );
return mod->impl->set_position_seconds( seconds );
} OPENMPT_INTERFACE_CATCH_TO_LOG;
- return 0;
+ return 0.0;
}
double openmpt_module_get_position_seconds( openmpt_module * mod ) {
try {
@@ -393,6 +393,14 @@
return 0.0;
}
+double openmpt_module_set_position_order_row( openmpt_module * mod, int32_t order, int32_t row ) {
+ try {
+ OPENMPT_INTERFACE_CHECK_SOUNDFILE( mod );
+ return mod->impl->set_position_order_row( order, row );
+ } OPENMPT_INTERFACE_CATCH_TO_LOG;
+ return 0.0;
+}
+
int openmpt_module_get_render_param( openmpt_module * mod, int param, int32_t * value ) {
try {
OPENMPT_INTERFACE_CHECK_SOUNDFILE( mod );
Modified: trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp 2013-12-06 06:48:16 UTC (rev 3392)
+++ trunk/OpenMPT/libopenmpt/libopenmpt_cxx.cpp 2013-12-06 06:50:02 UTC (rev 3393)
@@ -151,6 +151,10 @@
return impl->get_position_seconds();
}
+double module::set_position_order_row( std::int32_t order, std::int32_t row ) {
+ return impl->set_position_order_row( order, row );
+}
+
std::int32_t module::get_render_param( int param ) const {
return impl->get_render_param( param );
}
Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-12-06 06:48:16 UTC (rev 3392)
+++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-12-06 06:50:02 UTC (rev 3393)
@@ -608,6 +608,21 @@
m_currentPositionSeconds = m_sndFile->GetLength( eAdjust, GetLengthTarget( t.lastOrder, t.lastRow ) ).duration;
return m_currentPositionSeconds;
}
+double module_impl::set_position_order_row( std::int32_t order, std::int32_t row ) {
+ if ( order < 0 || order >= m_sndFile->Order.GetLengthTailTrimmed() ) {
+ return m_currentPositionSeconds;
+ }
+ std::int32_t pattern = m_sndFile->Order[order];
+ if ( row < 0 || row >= (std::int32_t)m_sndFile->Patterns[pattern].GetNumRows() ) {
+ return m_currentPositionSeconds;
+ }
+ m_sndFile->InitializeVisitedRows();
+ m_sndFile->m_nCurrentOrder = order;
+ m_sndFile->SetCurrentOrder( order );
+ m_sndFile->m_nNextRow = row;
+ m_currentPositionSeconds = m_sndFile->GetLength( eAdjust, GetLengthTarget( order, row ) ).duration;
+ return m_currentPositionSeconds;
+}
std::vector<std::string> module_impl::get_metadata_keys() const {
std::vector<std::string> retval;
retval.push_back("type");
Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp 2013-12-06 06:48:16 UTC (rev 3392)
+++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp 2013-12-06 06:50:02 UTC (rev 3393)
@@ -92,6 +92,7 @@
double get_duration_seconds() const;
double set_position_seconds( double seconds );
double get_position_seconds() const;
+ double set_position_order_row( std::int32_t order, std::int32_t row );
std::int32_t get_render_param( int param ) const;
void set_render_param( int param, std::int32_t value );
std::size_t read( std::int32_t samplerate, std::size_t count, std::int16_t * mono );
Modified: trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c 2013-12-06 06:48:16 UTC (rev 3392)
+++ trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c 2013-12-06 06:50:02 UTC (rev 3393)
@@ -336,8 +336,7 @@
LIBOPENMPT_MODPLUG_API void ModPlug_SeekOrder(ModPlugFile* file,int order)
{
if(!file) return;
- // todo: seek exactly to order
- openmpt_module_set_position_seconds(file->mod,openmpt_module_get_duration_seconds(file->mod)*order/openmpt_module_get_num_orders(file->mod));
+ openmpt_module_set_position_order_row(file->mod,order,0);
}
LIBOPENMPT_MODPLUG_API int ModPlug_GetModuleType(ModPlugFile* file)
Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp
===================================================================
--- trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-12-06 06:48:16 UTC (rev 3392)
+++ trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-12-06 06:50:02 UTC (rev 3393)
@@ -460,6 +460,10 @@
case 'j': mod.set_position_seconds( mod.get_position_seconds() - 1.0 ); break;
case 'k': mod.set_position_seconds( mod.get_position_seconds() + 1.0 ); break;
case 'l': mod.set_position_seconds( mod.get_position_seconds() + 10.0 ); break;
+ case 'H': mod.set_position_order_row( mod.get_current_order() - 1, 0 ); break;
+ case 'J': mod.set_position_order_row( mod.get_current_order(), mod.get_current_row() - 1 ); break;
+ case 'K': mod.set_position_order_row( mod.get_current_order(), mod.get_current_row() + 1 ); break;
+ case 'L': mod.set_position_order_row( mod.get_current_order() + 1, 0 ); break;
case 'm': throw next_file(1); break;
case 'M': throw next_file(10); break;
case '3': flags.gain -=100; apply_mod_settings( flags, mod ); break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2013-12-06 09:31:21
|
Revision: 3394
http://sourceforge.net/p/modplug/code/3394
Author: manxorist
Date: 2013-12-06 09:31:14 +0000 (Fri, 06 Dec 2013)
Log Message:
-----------
[Mod] libopenmpt: Rename metadata key 'author' to 'artist'.
[Ref] libopenmpt: Correct filenames in comments.
Modified Paths:
--------------
trunk/OpenMPT/libopenmpt/in_openmpt.cpp
trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp
trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp
trunk/OpenMPT/openmpt123/openmpt123_flac.hpp
trunk/OpenMPT/openmpt123/openmpt123_sndfile.hpp
Modified: trunk/OpenMPT/libopenmpt/in_openmpt.cpp
===================================================================
--- trunk/OpenMPT/libopenmpt/in_openmpt.cpp 2013-12-06 06:50:02 UTC (rev 3393)
+++ trunk/OpenMPT/libopenmpt/in_openmpt.cpp 2013-12-06 09:31:14 UTC (rev 3394)
@@ -1,6 +1,6 @@
/*
- * libopenmpt_winamp.cpp
- * ---------------------
+ * in_openmpt.cpp
+ * --------------
* Purpose: libopenmpt winamp input plugin implementation
* Notes : (currently none)
* Authors: OpenMPT Devs
Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-12-06 06:50:02 UTC (rev 3393)
+++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-12-06 09:31:14 UTC (rev 3394)
@@ -630,7 +630,7 @@
retval.push_back("container");
retval.push_back("container_long");
retval.push_back("tracker");
- retval.push_back("author");
+ retval.push_back("artist");
retval.push_back("title");
retval.push_back("message");
retval.push_back("warnings");
Modified: trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp
===================================================================
--- trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp 2013-12-06 06:50:02 UTC (rev 3393)
+++ trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp 2013-12-06 09:31:14 UTC (rev 3394)
@@ -1,6 +1,6 @@
/*
- * libopenmpt_xmplay.cpp
- * ---------------------
+ * xmp-openmpt.cpp
+ * ---------------
* Purpose: libopenmpt xmplay input plugin implementation
* Notes : (currently none)
* Authors: OpenMPT Devs
@@ -424,7 +424,7 @@
static void write_xmplay_tags( char * tags[8], const openmpt::module & mod ) {
write_xmplay_tag( &tags[0], convert_to_native( mod.get_metadata("title") ) );
- write_xmplay_tag( &tags[1], convert_to_native( mod.get_metadata("author") ) );
+ 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[4], convert_to_native( mod.get_metadata("xmplay-tracknumber") ) ); // todo, libopenmpt does not support that
Modified: trunk/OpenMPT/openmpt123/openmpt123_flac.hpp
===================================================================
--- trunk/OpenMPT/openmpt123/openmpt123_flac.hpp 2013-12-06 06:50:02 UTC (rev 3393)
+++ trunk/OpenMPT/openmpt123/openmpt123_flac.hpp 2013-12-06 09:31:14 UTC (rev 3394)
@@ -66,7 +66,7 @@
}
tags.clear();
tags.push_back( std::make_pair( "TITLE", metadata[ "title" ] ) );
- tags.push_back( std::make_pair( "ARTIST", metadata[ "author" ] ) );
+ tags.push_back( std::make_pair( "ARTIST", metadata[ "artist" ] ) );
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-06 06:50:02 UTC (rev 3393)
+++ trunk/OpenMPT/openmpt123/openmpt123_sndfile.hpp 2013-12-06 09:31:14 UTC (rev 3394)
@@ -176,7 +176,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[ "author" ] );
+ write_metadata_field( SF_STR_ARTIST, metadata[ "artist" ] );
write_metadata_field( SF_STR_COMMENT, metadata[ "message" ] );
write_metadata_field( SF_STR_SOFTWARE, append_software_tag( metadata[ "tracker" ] ) );
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2013-12-06 22:46:46
|
Revision: 3395
http://sourceforge.net/p/modplug/code/3395
Author: saga-games
Date: 2013-12-06 22:46:33 +0000 (Fri, 06 Dec 2013)
Log Message:
-----------
[Fix] libopenmpt: Pattern row formatting didn't work with special notes (cut etc.)
[Ref] Unify ::GetNoteStr and CSoundFile::GetNoteName
Modified Paths:
--------------
trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp
trunk/OpenMPT/mptrack/Ctrl_ins.cpp
trunk/OpenMPT/mptrack/Ctrl_pat.cpp
trunk/OpenMPT/mptrack/Mptrack.cpp
trunk/OpenMPT/mptrack/Mptrack.h
trunk/OpenMPT/mptrack/View_ins.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/mptrack/dlg_misc.cpp
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/Sndfile.h
trunk/OpenMPT/soundlib/Tables.cpp
trunk/OpenMPT/soundlib/modcommand.h
Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-12-06 09:31:14 UTC (rev 3394)
+++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.cpp 2013-12-06 22:46:33 UTC (rev 3395)
@@ -882,8 +882,8 @@
const ModCommand cell = m_sndFile->Patterns[p][r*numchannels+c];
text.clear();
high.clear();
- text += cell.IsNote() ? m_sndFile->GetNoteName( cell.note, cell.instr ) : std::string("...");
- high += cell.IsNote() ? std::string("nnn") : std::string("...");
+ text += ( cell.IsNote() || cell.IsSpecialNote() ) ? m_sndFile->GetNoteName( cell.note, cell.instr ) : std::string("...");
+ high += ( cell.IsNote() || cell.IsSpecialNote() ) ? std::string("nnn") : std::string("...");
if ( width >= 6 ) {
text += std::string(" ");
high += std::string(" ");
Modified: trunk/OpenMPT/mptrack/Ctrl_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2013-12-06 09:31:14 UTC (rev 3394)
+++ trunk/OpenMPT/mptrack/Ctrl_ins.cpp 2013-12-06 22:46:33 UTC (rev 3395)
@@ -194,7 +194,7 @@
// Note
s[0] = 0;
- std::string temp = sndFile.GetNoteName(nPos+1, m_nInstrument);
+ std::string temp = sndFile.GetNoteName(static_cast<ModCommand::NOTE>(nPos + 1), m_nInstrument);
temp.resize(4);
if ((nPos >= 0) && (nPos < NOTE_MAX)) wsprintf(s, "%s", temp.c_str());
rect.SetRect(0, ypaint, m_cxFont, ypaint+m_cyFont);
@@ -206,7 +206,7 @@
strcpy(s, "...");
if ((pIns) && (nPos >= 0) && (nPos < NOTE_MAX) && (pIns->NoteMap[nPos] != NOTE_NONE))
{
- UINT n = pIns->NoteMap[nPos];
+ ModCommand::NOTE n = pIns->NoteMap[nPos];
if(ModCommand::IsNote(n))
{
std::string temp = sndFile.GetNoteName(n, m_nInstrument);
Modified: trunk/OpenMPT/mptrack/Ctrl_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2013-12-06 09:31:14 UTC (rev 3394)
+++ trunk/OpenMPT/mptrack/Ctrl_pat.cpp 2013-12-06 22:46:33 UTC (rev 3395)
@@ -305,7 +305,7 @@
CString sDisplayName;
if (m_modDoc.GetSplitKeyboardSettings().IsSplitActive())
{
- wsprintf(s, szSplitFormat, nSplitIns, GetNoteStr(noteSplit), i,
+ wsprintf(s, szSplitFormat, nSplitIns, m_sndFile.GetNoteName(noteSplit, nSplitIns).c_str(), i,
(LPCTSTR)sSplitInsName, (LPCTSTR)m_modDoc.GetPatternViewInstrumentName(i, true, false));
sDisplayName = s;
}
@@ -323,7 +323,7 @@
for(SAMPLEINDEX i = 1; i <= nmax; i++) if (m_sndFile.GetSample(i).pSample)
{
if (m_modDoc.GetSplitKeyboardSettings().IsSplitActive())
- wsprintf(s, szSplitFormat, nSplitIns, GetNoteStr(noteSplit), i, m_sndFile.m_szNames[nSplitIns], m_sndFile.m_szNames[i]);
+ wsprintf(s, szSplitFormat, nSplitIns, m_sndFile.GetNoteName(noteSplit, nSplitIns).c_str(), i, m_sndFile.m_szNames[nSplitIns], m_sndFile.m_szNames[i]);
else
wsprintf(s, "%02u: %s", i, m_sndFile.m_szNames[i]);
Modified: trunk/OpenMPT/mptrack/Mptrack.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.cpp 2013-12-06 09:31:14 UTC (rev 3394)
+++ trunk/OpenMPT/mptrack/Mptrack.cpp 2013-12-06 22:46:33 UTC (rev 3395)
@@ -46,7 +46,15 @@
CTrackApp theApp;
+const char *szSpecialNoteNamesMPT[] = {TEXT("PCs"), TEXT("PC"), TEXT("~~ (Note Fade)"), TEXT("^^ (Note Cut)"), TEXT("== (Note Off)")};
+const char *szSpecialNoteShortDesc[] = {TEXT("Param Control (Smooth)"), TEXT("Param Control"), TEXT("Note Fade"), TEXT("Note Cut"), TEXT("Note Off")};
+// Make sure that special note arrays include string for every note.
+STATIC_ASSERT(NOTE_MAX_SPECIAL - NOTE_MIN_SPECIAL + 1 == CountOf(szSpecialNoteNamesMPT));
+STATIC_ASSERT(CountOf(szSpecialNoteShortDesc) == CountOf(szSpecialNoteNamesMPT));
+
+const char *szHexChar = "0123456789ABCDEF";
+
CDocument *CModDocTemplate::OpenDocumentFile(const mpt::PathString &filename, BOOL addToMru, BOOL makeVisible)
//------------------------------------------------------------------------------------------------------------
{
Modified: trunk/OpenMPT/mptrack/Mptrack.h
===================================================================
--- trunk/OpenMPT/mptrack/Mptrack.h 2013-12-06 09:31:14 UTC (rev 3394)
+++ trunk/OpenMPT/mptrack/Mptrack.h 2013-12-06 22:46:33 UTC (rev 3395)
@@ -398,22 +398,13 @@
// default note names.
void AppendNotesToControlEx(CComboBox& combobox, const CSoundFile* const pSndFile = nullptr, const INSTRUMENTINDEX nInstr = MAX_INSTRUMENTS);
-// Returns note name(such as "C-5") of given note. Regular notes are in range [1,MAX_NOTE].
-LPCTSTR GetNoteStr(const ModCommand::NOTE);
-
///////////////////////////////////////////////////
// Tables
-//const LPCTSTR szSpecialNoteNames[] = {TEXT("PCs"), TEXT("PC"), TEXT("~~"), TEXT("^^"), TEXT("==")};
-const LPCTSTR szSpecialNoteNames[] = {TEXT("PCs"), TEXT("PC"), TEXT("~~ (Note Fade)"), TEXT("^^ (Note Cut)"), TEXT("== (Note Off)")};
-const LPCTSTR szSpecialNoteShortDesc[] = {TEXT("Param Control (Smooth)"), TEXT("Param Control"), TEXT("Note Fade"), TEXT("Note Cut"), TEXT("Note Off")};
+extern const char *szSpecialNoteNamesMPT[];
+extern const char *szSpecialNoteShortDesc[];
+extern const char *szHexChar;
-// Make sure that special note arrays include string for every note.
-STATIC_ASSERT(NOTE_MAX_SPECIAL - NOTE_MIN_SPECIAL + 1 == CountOf(szSpecialNoteNames));
-STATIC_ASSERT(CountOf(szSpecialNoteShortDesc) == CountOf(szSpecialNoteNames));
-
-const LPCSTR szHexChar = "0123456789ABCDEF";
-
// Defined in load_mid.cpp
extern const char *szMidiProgramNames[128];
extern const char *szMidiPercussionNames[61]; // notes 25..85
Modified: trunk/OpenMPT/mptrack/View_ins.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_ins.cpp 2013-12-06 09:31:14 UTC (rev 3394)
+++ trunk/OpenMPT/mptrack/View_ins.cpp 2013-12-06 22:46:33 UTC (rev 3395)
@@ -1956,7 +1956,7 @@
s[0] = 0;
if ((note) && (note <= NOTE_MAX))
{
- const std::string temp = pModDoc->GetrSoundFile().GetNoteName(static_cast<int16>(note), m_nInstrument);
+ const std::string temp = pModDoc->GetrSoundFile().GetNoteName(static_cast<ModCommand::NOTE>(note), m_nInstrument);
if(temp.size() >= sizeofS)
wsprintf(s, "%s", "...");
else
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2013-12-06 09:31:14 UTC (rev 3394)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2013-12-06 22:46:33 UTC (rev 3395)
@@ -2355,7 +2355,7 @@
// Note
if(m_findReplace.findFlags[FindReplace::Note])
{
- result.Append(GetNoteStr(m_findReplace.cmdFind.note));
+ result.Append(pSndFile->GetNoteName(m_findReplace.cmdFind.note).c_str());
} else
{
result.Append("???");
Modified: trunk/OpenMPT/mptrack/dlg_misc.cpp
===================================================================
--- trunk/OpenMPT/mptrack/dlg_misc.cpp 2013-12-06 09:31:14 UTC (rev 3394)
+++ trunk/OpenMPT/mptrack/dlg_misc.cpp 2013-12-06 22:46:33 UTC (rev 3395)
@@ -960,7 +960,7 @@
SAMPLEINDEX nSample = m_CbnSample.GetItemData(m_CbnSample.GetCurSel());
UINT nBaseOctave = m_SbOctave.GetPos() & 7;
- const std::string temp = sndFile.GetNoteName(lParam+1+12*nBaseOctave, m_nInstrument).c_str();
+ const std::string temp = sndFile.GetNoteName(static_cast<ModCommand::NOTE>(lParam + 1 + 12 * nBaseOctave), m_nInstrument).c_str();
if(temp.size() >= CountOf(s))
wsprintf(s, "%s", "...");
else
@@ -1285,29 +1285,7 @@
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
-const LPCTSTR szNullNote = TEXT("...");
-const LPCTSTR szUnknownNote = TEXT("???");
-
-LPCTSTR GetNoteStr(const ModCommand::NOTE nNote)
-//----------------------------------------------
-{
- if(nNote == 0)
- return szNullNote;
-
- if(nNote >= 1 && nNote <= NOTE_MAX)
- {
- return szDefaultNoteNames[nNote-1];
- }
- else if(nNote >= NOTE_MIN_SPECIAL && nNote <= NOTE_MAX_SPECIAL)
- {
- return szSpecialNoteNames[nNote - NOTE_MIN_SPECIAL];
- }
- else
- return szUnknownNote;
-}
-
-
void AppendNotesToControl(CComboBox& combobox, const ModCommand::NOTE noteStart, const ModCommand::NOTE noteEnd)
//------------------------------------------------------------------------------------------------------------------
{
@@ -1332,6 +1310,6 @@
for(ModCommand::NOTE nNote = NOTE_MIN_SPECIAL - 1; nNote++ < NOTE_MAX_SPECIAL;)
{
if(pSndFile == nullptr || pSndFile->GetModSpecifications().HasNote(nNote) == true)
- combobox.SetItemData(combobox.AddString(szSpecialNoteNames[nNote-NOTE_MIN_SPECIAL]), nNote);
+ combobox.SetItemData(combobox.AddString(szSpecialNoteNamesMPT[nNote-NOTE_MIN_SPECIAL]), nNote);
}
}
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2013-12-06 09:31:14 UTC (rev 3394)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2013-12-06 22:46:33 UTC (rev 3395)
@@ -29,6 +29,7 @@
#endif // NO_ARCHIVE_SUPPORT
extern BOOL MMCMP_Unpack(LPCBYTE *ppMemFile, LPDWORD pdwMemLength);
+extern const char *szSpecialNoteNames[];
// -> CODE#0027
@@ -1752,13 +1753,22 @@
#endif
-std::string CSoundFile::GetNoteName(const CTuning::NOTEINDEXTYPE& note, const INSTRUMENTINDEX inst) const
-//-------------------------------------------------------------------------------------------------------
+std::string CSoundFile::GetNoteName(const ModCommand::NOTE note, const INSTRUMENTINDEX inst) const
+//------------------------------------------------------------------------------------------------
{
- if((inst >= MAX_INSTRUMENTS && inst != INSTRUMENTINDEX_INVALID) || note < NOTE_MIN || note > NOTE_MAX) return "BUG";
+ if(ModCommand::IsSpecialNote(note))
+ {
+ return szSpecialNoteNames[note - NOTE_MIN_SPECIAL];
+ } else if(note == NOTE_NONE)
+ {
+ return "...";
+ } else if(!ModCommand::IsNote(note))
+ {
+ return "???";
+ }
// For MPTM instruments with custom tuning, find the appropriate note name. Else, use default note names.
- if(inst != INSTRUMENTINDEX_INVALID && GetType() == MOD_TYPE_MPT && Instruments[inst] && Instruments[inst]->pTuning)
+ if(GetType() == MOD_TYPE_MPT && inst >= 1 && inst <= GetNumInstruments() && Instruments[inst] && Instruments[inst]->pTuning)
return Instruments[inst]->pTuning->GetNoteName(note - NOTE_MIDDLEC);
else
return szDefaultNoteNames[note - 1];
Modified: trunk/OpenMPT/soundlib/Sndfile.h
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.h 2013-12-06 09:31:14 UTC (rev 3394)
+++ trunk/OpenMPT/soundlib/Sndfile.h 2013-12-06 22:46:33 UTC (rev 3395)
@@ -277,7 +277,7 @@
static CTuning *GetDefaultTuning() {return nullptr;}
CTuningCollection& GetTuneSpecificTunings() {return *m_pTuningsTuneSpecific;}
- std::string GetNoteName(const int16&, const INSTRUMENTINDEX inst = INSTRUMENTINDEX_INVALID) const;
+ std::string GetNoteName(const ModCommand::NOTE note, const INSTRUMENTINDEX inst = INSTRUMENTINDEX_INVALID) const;
private:
CTuningCollection* m_pTuningsTuneSpecific;
#ifdef MODPLUG_TRACKER
Modified: trunk/OpenMPT/soundlib/Tables.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Tables.cpp 2013-12-06 09:31:14 UTC (rev 3394)
+++ trunk/OpenMPT/soundlib/Tables.cpp 2013-12-06 22:46:33 UTC (rev 3395)
@@ -43,7 +43,10 @@
"C-9", "C#9", "D-9", "D#9", "E-9", "F-9", "F#9", "G-9", "G#9", "A-9", "A#9", "B-9",
};
+const char *szSpecialNoteNames[] = { "PCs", "PC", "~~~", "^^^", "===" };
+STATIC_ASSERT(CountOf(szSpecialNoteNames) == NOTE_MAX_SPECIAL - NOTE_MIN_SPECIAL + 1);
+
///////////////////////////////////////////////////////////
// File Formats Information (name, extension, etc)
Modified: trunk/OpenMPT/soundlib/modcommand.h
===================================================================
--- trunk/OpenMPT/soundlib/modcommand.h 2013-12-06 09:31:14 UTC (rev 3394)
+++ trunk/OpenMPT/soundlib/modcommand.h 2013-12-06 22:46:33 UTC (rev 3395)
@@ -153,6 +153,9 @@
// Returns true if and only if note is a valid musical note.
bool IsNote() const { return note >= NOTE_MIN && note <= NOTE_MAX; }
static bool IsNote(NOTE note) { return note >= NOTE_MIN && note <= NOTE_MAX; }
+ // Returns true if and only if note is a valid special note.
+ bool IsSpecialNote() const { return note >= NOTE_MIN_SPECIAL && note <= NOTE_MAX_SPECIAL; }
+ static bool IsSpecialNote(NOTE note) { return note >= NOTE_MIN_SPECIAL && note <= NOTE_MAX_SPECIAL; }
// Returns true if and only if note is a valid musical note or the note entry is empty.
bool IsNoteOrEmpty() const { return note == NOTE_NONE || IsNote(); }
static bool IsNoteOrEmpty(NOTE note) { return note == NOTE_NONE || IsNote(note); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sag...@us...> - 2013-12-07 00:39:03
|
Revision: 3396
http://sourceforge.net/p/modplug/code/3396
Author: saga-games
Date: 2013-12-07 00:38:57 +0000 (Sat, 07 Dec 2013)
Log Message:
-----------
[Imp] xmp-openmpt: Improved pattern vis (only show columns completely or not at all, mimic XMPlay's own pattern vis colours, better padding between columns, etc)
[Ref] More usage of new ModCommand::IsSpecialNote
Modified Paths:
--------------
trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp
trunk/OpenMPT/mptrack/Draw_pat.cpp
trunk/OpenMPT/mptrack/View_pat.cpp
trunk/OpenMPT/soundlib/Load_s3m.cpp
trunk/OpenMPT/soundlib/modcommand.cpp
Modified: trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp
===================================================================
--- trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp 2013-12-06 22:46:33 UTC (rev 3395)
+++ trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp 2013-12-07 00:38:57 UTC (rev 3396)
@@ -843,12 +843,44 @@
#ifdef EXPERIMENTAL_VIS
+enum ColorIndex
+{
+ col_background = 0,
+ col_unknown,
+ col_text,
+ col_empty,
+ col_instr,
+ col_vol,
+ col_pitch,
+ col_current_row,
+
+ col_max
+};
+
+const struct Columns
+{
+ int str_offset;
+ int num_chars;
+ int color;
+} pattern_columns[] = {
+ { 0, 3, col_text }, // C-5
+ { 4, 2, col_instr }, // 01
+ { 6, 3, col_vol }, // v64
+ { 10, 3, col_pitch }, // EFF
+};
+
+union Color
+{
+ struct { uint8_t r, g, b, a; };
+ COLORREF dw;
+};
+
HDC visDC;
HGDIOBJ visbitmap;
-DWORD viscolors[3];
-HPEN vispens[3];
-HBRUSH visbrushs[3];
+Color viscolors[col_max];
+HPEN vispens[col_max];
+HBRUSH visbrushs[col_max];
HFONT visfont;
static int last_pattern = -1;
@@ -857,16 +889,40 @@
visDC = nullptr;
visbitmap = nullptr;
visfont = nullptr;
- viscolors[0] = colors[0]; // Background
- viscolors[1] = colors[1]; // Text
- viscolors[2] = colors[2]; // Current row
- vispens[0] = CreatePen( PS_SOLID, 1, viscolors[0] );
- vispens[1] = CreatePen( PS_SOLID, 1, viscolors[1] );
- vispens[2] = CreatePen( PS_SOLID, 1, viscolors[2] );
- visbrushs[0] = CreateSolidBrush( viscolors[0] );
- visbrushs[1] = CreateSolidBrush( viscolors[1] );
- visbrushs[2] = CreateSolidBrush( viscolors[2] );
+ viscolors[col_background].dw = colors[0];
+ viscolors[col_unknown].dw = colors[1];
+ viscolors[col_text].dw = colors[2];
+
+ const int r = viscolors[col_text].r, g = viscolors[col_text].g, b = viscolors[col_text].b;
+ viscolors[col_empty].r = (r + viscolors[col_background].r) / 2;
+ viscolors[col_empty].g = (g + viscolors[col_background].g) / 2;
+ viscolors[col_empty].b = (b + viscolors[col_background].b) / 2;
+ viscolors[col_empty].a = 0;
+
+#define MIXCOLOR(col, c1, c2, c3) { \
+ viscolors[col] = viscolors[col_text]; \
+ int mix = viscolors[col].c1 + 0xA0; \
+ viscolors[col].c1 = mix; \
+ if ( mix > 0xFF ) { \
+ viscolors[col].c2 = std::max<uint8_t>( c2 - viscolors[col].c1 / 2, 0 ); \
+ viscolors[col].c3 = std::max<uint8_t>( c3 - viscolors[col].c1 / 2, 0 ); \
+ viscolors[col].c1 = 0xFF; \
+ } }
+
+ MIXCOLOR(col_instr, g, r, b);
+ MIXCOLOR(col_vol, b, r, g);
+ MIXCOLOR(col_pitch, r, g, b);
+#undef MIXCOLOR
+
+ viscolors[col_current_row].dw = ~viscolors[col_background].dw;
+ viscolors[col_current_row].a = 0;
+
+ for( int i = 0; i < col_max; ++i ) {
+ vispens[i] = CreatePen( PS_SOLID, 1, viscolors[i].dw );
+ visbrushs[i] = CreateSolidBrush( viscolors[i].dw );
+ }
+
if ( !self->mod ) {
return FALSE;
}
@@ -874,12 +930,12 @@
}
static void WINAPI VisClose() {
xmpopenmpt_lock guard;
- DeleteObject( vispens[0] );
- DeleteObject( vispens[1] );
- DeleteObject( vispens[2] );
- DeleteObject( visbrushs[0] );
- DeleteObject( visbrushs[1] );
- DeleteObject( visbrushs[2] );
+
+ for( int i = 0; i < col_max; ++i ) {
+ DeleteObject( vispens[i] );
+ DeleteObject( visbrushs[i] );
+ }
+
DeleteObject( visfont );
DeleteObject( visbitmap );
DeleteDC( visDC );
@@ -905,11 +961,13 @@
GetObject ( GetCurrentObject( dc, OBJ_FONT ), sizeof(logfont), &logfont );
wcscpy(logfont.lfFaceName, L"Lucida Console");
visfont = CreateFontIndirect ( &logfont );
- SelectObject( dc, visfont );
}
- TEXTMETRIC tm;
- GetTextMetrics( dc, &tm );
+ SIZE text_size;
+ SelectObject( dc, visfont );
+ if ( GetTextExtentPoint32(dc, TEXT("W"), 1, &text_size) == FALSE ) {
+ return FALSE;
+ }
if(flags & XMPIN_VIS_INIT)
{
@@ -919,21 +977,27 @@
const std::size_t channels = self->mod->get_num_channels();
const std::size_t rows = self->mod->get_pattern_num_rows( pattern );
- const std::size_t num_cols = size.cx / tm.tmAveCharWidth;
- const std::size_t num_rows = size.cy / tm.tmHeight;
+ const std::size_t num_half_chars = std::max<std::size_t>( 2 * size.cx / text_size.cx, 8 ) - 8;
+ const std::size_t num_rows = size.cy / text_size.cy;
- std::size_t cols_per_channel = num_cols / channels;
- if (cols_per_channel <= 1 ) {
- cols_per_channel = 1;
+ // Spaces between pattern components are half width, full space at channel end
+ std::size_t half_chars_per_channel = num_half_chars / channels, cols_per_channel;
+ if ( half_chars_per_channel >= 26 ) {
+ cols_per_channel = 13; // C-5 01v64 EFF
+ half_chars_per_channel = 6 + 1 + 4 + 1 + 6 + 1 + 6 + 1;
+ } else if ( half_chars_per_channel >= 19 ) {
+ cols_per_channel = 9; // C-5 01v64
+ half_chars_per_channel = 6 + 1 + 4 + 1 + 6 + 1;
+ } else if ( half_chars_per_channel >= 12 ) {
+ cols_per_channel = 6; // C-5 01
+ half_chars_per_channel = 6 + 1 + 4 + 1;
} else {
- cols_per_channel -= 1;
+ cols_per_channel = 3; // C-5, without extra half space
+ half_chars_per_channel = 3 * 2;
}
- if ( cols_per_channel >= 13 ) {
- cols_per_channel = 13;
- }
- int pattern_width = ((cols_per_channel * channels) + 4) * tm.tmAveCharWidth + (channels - 1) * (tm.tmAveCharWidth / 2);
- int pattern_height = rows * tm.tmHeight;
+ int pattern_width = (((half_chars_per_channel * channels) + 8) * text_size.cx) / 2 + (channels - 1) * (text_size.cx / 2);
+ int pattern_height = rows * text_size.cy;
if( visDC == nullptr || last_pattern != pattern ) {
DeleteObject( visbitmap );
@@ -943,8 +1007,8 @@
visbitmap = CreateCompatibleBitmap( dc, pattern_width, pattern_height );
SelectObject( visDC, visbitmap );
- SelectObject( visDC, vispens[1] );
- SelectObject( visDC, visbrushs[0] );
+ SelectObject( visDC, vispens[col_unknown] );
+ SelectObject( visDC, visbrushs[col_background] );
SelectObject( visDC, visfont );
@@ -953,9 +1017,9 @@
bgrect.left = 0;
bgrect.right = pattern_width;
bgrect.bottom = pattern_height;
- FillRect( visDC, &bgrect, visbrushs[0] );
+ FillRect( visDC, &bgrect, visbrushs[col_background] );
- SetBkColor( visDC, viscolors[0] );
+ SetBkColor( visDC, viscolors[col_background].dw );
POINT pos;
pos.y = 0;
@@ -968,46 +1032,40 @@
s << std::setfill('0') << std::setw(3) << row;
const std::string rowstr = s.str();
- SetTextColor( visDC, viscolors[1] );
+ SetTextColor( visDC, viscolors[1].dw );
TextOutA( visDC, pos.x, pos.y, rowstr.c_str(), rowstr.length() );
- pos.x += 4 * tm.tmAveCharWidth;
+ pos.x += 4 * text_size.cx;
for ( std::size_t channel = 0; channel < channels; ++channel ) {
-
// "NNN IIvVV EFF"
- std::string highlight = self->mod->highlight_pattern_row_channel( pattern, row, channel, cols_per_channel );
+ //std::string highlight = self->mod->highlight_pattern_row_channel( pattern, row, channel, cols_per_channel );
std::string chan = self->mod->format_pattern_row_channel( pattern, row, channel, cols_per_channel );
- int prev_color = -1;
- int str_start = 0;
+ for ( std::size_t col = 0; col < sizeof ( pattern_columns ) / sizeof ( pattern_columns[0] ); ++col) {
+ if ( pattern_columns[col].str_offset + pattern_columns[col].num_chars <= int(cols_per_channel) ) {
+ int color = pattern_columns[col].color;
+ switch(chan[pattern_columns[col].str_offset]) {
+ case ' ':
+ case '.':
+ case '^':
+ case '=':
+ case '~':
+ color = col_empty;
+ break;
+ }
- for( size_t col = 0; col < cols_per_channel; ++col) {
- int color;
- switch( chan[col] )
- {
- case ' ':
- case '.':
- color = 1;
- break;
-
- default:
- color = 2;
+ SetTextColor( visDC, viscolors[color].dw );
+ TextOutA( visDC, pos.x, pos.y, &chan[pattern_columns[col].str_offset], pattern_columns[col].num_chars );
+ pos.x += pattern_columns[col].num_chars * text_size.cx + text_size.cx / 2;
}
-
- if( ( col != 0 && color != prev_color ) || col == cols_per_channel - 1 ) {
- SetTextColor( visDC, viscolors[color] );
- TextOutA( visDC, pos.x, pos.y, &chan[str_start], 1 + col - str_start );
- pos.x += (1 + col - str_start) * tm.tmAveCharWidth;
- color = prev_color;
- str_start = col + 1;
- }
}
-
- // Channel padding
- pos.x += tm.tmAveCharWidth / 2;
+ // Extra padding
+ if ( cols_per_channel > 3 ) {
+ pos.x += text_size.cx / 2;
+ }
}
- pos.y += tm.tmHeight;
+ pos.y += text_size.cy;
}
}
@@ -1016,10 +1074,10 @@
bgrect.left = 0;
bgrect.right = size.cx;
bgrect.bottom = size.cy;
- FillRect( dc, &bgrect, visbrushs[0] );
+ FillRect( dc, &bgrect, visbrushs[col_background] );
int offset_x = (size.cx - pattern_width) / 2;
- int offset_y = (size.cy - tm.tmHeight) / 2 - current_row * tm.tmHeight;
+ int offset_y = (size.cy - text_size.cy) / 2 - current_row * text_size.cy;
int src_offset_x = 0;
int src_offset_y = 0;
@@ -1039,13 +1097,13 @@
// Highlight current row
POINT line[] = {
- { (size.cx - pattern_width) / 2 - 1, (size.cy - tm.tmHeight) / 2 - 1 },
- { (size.cx + pattern_width) / 2 + 1, (size.cy - tm.tmHeight) / 2 - 1 },
- { (size.cx + pattern_width) / 2 + 1, (size.cy + tm.tmHeight) / 2 + 1 },
- { (size.cx - pattern_width) / 2 - 1, (size.cy + tm.tmHeight) / 2 + 1 },
- { (size.cx - pattern_width) / 2 - 1, (size.cy - tm.tmHeight) / 2 - 1 },
+ { (size.cx - pattern_width) / 2 - 1, (size.cy - text_size.cy) / 2 - 1 },
+ { (size.cx + pattern_width) / 2 + 1, (size.cy - text_size.cy) / 2 - 1 },
+ { (size.cx + pattern_width) / 2 + 1, (size.cy + text_size.cy) / 2 },
+ { (size.cx - pattern_width) / 2 - 1, (size.cy + text_size.cy) / 2 },
+ { (size.cx - pattern_width) / 2 - 1, (size.cy - text_size.cy) / 2 - 1 },
};
- SelectObject( dc, vispens[2] );
+ SelectObject( dc, vispens[col_current_row] );
Polyline( dc, line, 5 );
last_pattern = pattern;
@@ -1090,10 +1148,10 @@
NULL, // GetDownloaded
#ifdef EXPERIMENTAL_VIS
- "OpenMPT Pattern",
+ "OpenMPT Pattern Display",
VisOpen,
VisClose,
- /*VisSize,*/NULL,
+ VisSize,
/*VisRender,*/NULL,
VisRenderDC,
/*VisButton,*/NULL,
Modified: trunk/OpenMPT/mptrack/Draw_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Draw_pat.cpp 2013-12-06 22:46:33 UTC (rev 3395)
+++ trunk/OpenMPT/mptrack/Draw_pat.cpp 2013-12-07 00:38:57 UTC (rev 3396)
@@ -1584,7 +1584,7 @@
{
case PatternCursor::noteColumn:
// display note
- if(m->note >= NOTE_MIN_SPECIAL)
+ if(m->IsSpecialNote())
strcpy(s, szSpecialNoteShortDesc[m->note - NOTE_MIN_SPECIAL]);
break;
Modified: trunk/OpenMPT/mptrack/View_pat.cpp
===================================================================
--- trunk/OpenMPT/mptrack/View_pat.cpp 2013-12-06 22:46:33 UTC (rev 3395)
+++ trunk/OpenMPT/mptrack/View_pat.cpp 2013-12-07 00:38:57 UTC (rev 3396)
@@ -2921,18 +2921,18 @@
int note = m[chn].note + offset * (coarse ? 12 : 1);
Limit(note, noteMin, noteMax);
m[chn].note = (ModCommand::NOTE)note;
- } else if(m[chn].note >= NOTE_MIN_SPECIAL)
+ } else if(m[chn].IsSpecialNote())
{
int note = m[chn].note;
do
{
note += offset;
- if(note < NOTE_MIN_SPECIAL || note > NOTE_MAX_SPECIAL)
+ if(!ModCommand::IsSpecialNote(note))
{
break;
}
} while(!pSndFile->GetModSpecifications().HasNote((ModCommand::NOTE)note));
- if(note >= NOTE_MIN_SPECIAL && note <= NOTE_MAX_SPECIAL)
+ if(ModCommand::IsSpecialNote(note))
{
if(m[chn].IsPcNote() != ModCommand::IsPcNote((ModCommand::NOTE)note))
{
@@ -4732,7 +4732,7 @@
}
CSoundFile &sndFile = pModDoc->GetrSoundFile();
- if(note < NOTE_MIN_SPECIAL)
+ if(!ModCommand::IsSpecialNote(note))
{
Limit(note, sndFile.GetModSpecifications().noteMin, sndFile.GetModSpecifications().noteMax);
}
Modified: trunk/OpenMPT/soundlib/Load_s3m.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Load_s3m.cpp 2013-12-06 22:46:33 UTC (rev 3395)
+++ trunk/OpenMPT/soundlib/Load_s3m.cpp 2013-12-07 00:38:57 UTC (rev 3396)
@@ -756,7 +756,7 @@
{
// No Note, or note is too low
note = s3mNoteNone;
- } else if(note >= NOTE_MIN_SPECIAL)
+ } else if(ModCommand::IsSpecialNote(note))
{
// Note Cut
note = s3mNoteOff;
Modified: trunk/OpenMPT/soundlib/modcommand.cpp
===================================================================
--- trunk/OpenMPT/soundlib/modcommand.cpp 2013-12-06 22:46:33 UTC (rev 3395)
+++ trunk/OpenMPT/soundlib/modcommand.cpp 2013-12-07 00:38:57 UTC (rev 3396)
@@ -466,7 +466,7 @@
if(newTypeIsMOD)
{
// convert note off events
- if(note >= NOTE_MIN_SPECIAL)
+ if(IsSpecialNote())
{
note = NOTE_NONE;
// no effect present, so just convert note off to volume 0
@@ -652,7 +652,7 @@
command = param = 0;
}
- if(note >= NOTE_MIN_SPECIAL)
+ if(IsSpecialNote())
{
// Instrument numbers next to Note Off reset instrument settings
instr = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2013-12-07 03:36:05
|
Revision: 3398
http://sourceforge.net/p/modplug/code/3398
Author: manxorist
Date: 2013-12-07 03:35:55 +0000 (Sat, 07 Dec 2013)
Log Message:
-----------
[Ref] Silence GCC type-range warnings in IsSpecialNote().
[Ref] 2 tiny related cleanups.
Modified Paths:
--------------
trunk/OpenMPT/common/misc_util.h
trunk/OpenMPT/soundlib/Sndfile.cpp
trunk/OpenMPT/soundlib/mod_specifications.cpp
trunk/OpenMPT/soundlib/modcommand.h
Modified: trunk/OpenMPT/common/misc_util.h
===================================================================
--- trunk/OpenMPT/common/misc_util.h 2013-12-07 01:56:14 UTC (rev 3397)
+++ trunk/OpenMPT/common/misc_util.h 2013-12-07 03:35:55 UTC (rev 3398)
@@ -275,6 +275,15 @@
else return val;
}
+// Check if val is in [lo,hi] without causing compiler warnings
+// if theses checks are always true due to the domain of T.
+// GCC does not warn if the type is templated.
+template<typename T, typename C>
+inline bool IsInRange(T val, C lo, C hi)
+//--------------------------------------
+{
+ return lo <= val && val <= hi;
+}
// Like Limit, but with upperlimit only.
template<class T, class C>
Modified: trunk/OpenMPT/soundlib/Sndfile.cpp
===================================================================
--- trunk/OpenMPT/soundlib/Sndfile.cpp 2013-12-07 01:56:14 UTC (rev 3397)
+++ trunk/OpenMPT/soundlib/Sndfile.cpp 2013-12-07 03:35:55 UTC (rev 3398)
@@ -1561,7 +1561,7 @@
{
if(p->IsNote())
{
- if ((p->instr) && (p->instr < MAX_INSTRUMENTS))
+ if ((p->instr) && (IsInRange(p->instr, (INSTRUMENTINDEX)0, MAX_INSTRUMENTS)))
{
ModInstrument *pIns = Instruments[p->instr];
if (pIns)
Modified: trunk/OpenMPT/soundlib/mod_specifications.cpp
===================================================================
--- trunk/OpenMPT/soundlib/mod_specifications.cpp 2013-12-07 01:56:14 UTC (rev 3397)
+++ trunk/OpenMPT/soundlib/mod_specifications.cpp 2013-12-07 03:35:55 UTC (rev 3398)
@@ -402,7 +402,7 @@
{
if(note >= noteMin && note <= noteMax)
return true;
- else if(note >= NOTE_MIN_SPECIAL && note <= NOTE_MAX_SPECIAL)
+ else if(ModCommand::IsSpecialNote(note))
{
if(note == NOTE_NOTECUT)
return hasNoteCut;
Modified: trunk/OpenMPT/soundlib/modcommand.h
===================================================================
--- trunk/OpenMPT/soundlib/modcommand.h 2013-12-07 01:56:14 UTC (rev 3397)
+++ trunk/OpenMPT/soundlib/modcommand.h 2013-12-07 03:35:55 UTC (rev 3398)
@@ -12,6 +12,8 @@
#include "Snd_defs.h"
+#include "../common/misc_util.h"
+
#include <cstring>
// Note definitions
@@ -154,8 +156,8 @@
bool IsNote() const { return note >= NOTE_MIN && note <= NOTE_MAX; }
static bool IsNote(NOTE note) { return note >= NOTE_MIN && note <= NOTE_MAX; }
// Returns true if and only if note is a valid special note.
- bool IsSpecialNote() const { return note >= NOTE_MIN_SPECIAL && note <= NOTE_MAX_SPECIAL; }
- static bool IsSpecialNote(NOTE note) { return note >= NOTE_MIN_SPECIAL && note <= NOTE_MAX_SPECIAL; }
+ bool IsSpecialNote() const { return IsInRange(note, NOTE_MIN_SPECIAL, NOTE_MAX_SPECIAL); }
+ static bool IsSpecialNote(NOTE note) { return IsInRange(note, NOTE_MIN_SPECIAL, NOTE_MAX_SPECIAL); }
// Returns true if and only if note is a valid musical note or the note entry is empty.
bool IsNoteOrEmpty() const { return note == NOTE_NONE || IsNote(); }
static bool IsNoteOrEmpty(NOTE note) { return note == NOTE_NONE || IsNote(note); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2013-12-07 16:02:22
|
Revision: 3407
http://sourceforge.net/p/modplug/code/3407
Author: manxorist
Date: 2013-12-07 16:02:16 +0000 (Sat, 07 Dec 2013)
Log Message:
-----------
[Mod] libopenmpt: Exclude libopenmpt_interactive from unix build.
[Mod] libopenmpt: Guard libopenmpt_interactive with a #define LIBOPENMPT_INTERACTIVE_IS_EXPERIMENTAL . Disable public API symbol exporting so that is only usable as a statically linked library for now.
[Ref] xmp-openmpt: Move to libopenmpt_interactive interface.
Modified Paths:
--------------
trunk/OpenMPT/Makefile
trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp
trunk/OpenMPT/libopenmpt/libopenmpt_interactive.cpp
trunk/OpenMPT/libopenmpt/libopenmpt_interactive.hpp
trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp
Modified: trunk/OpenMPT/Makefile
===================================================================
--- trunk/OpenMPT/Makefile 2013-12-07 15:58:55 UTC (rev 3406)
+++ trunk/OpenMPT/Makefile 2013-12-07 16:02:16 UTC (rev 3407)
@@ -247,7 +247,6 @@
libopenmpt/libopenmpt_c.cpp \
libopenmpt/libopenmpt_cxx.cpp \
libopenmpt/libopenmpt_impl.cpp \
- libopenmpt/libopenmpt_interactive.cpp \
ifeq ($(NO_ZLIB),1)
LIBOPENMPT_C_SOURCES += include/miniz/miniz.c
Modified: trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp 2013-12-07 15:58:55 UTC (rev 3406)
+++ trunk/OpenMPT/libopenmpt/libopenmpt_impl.hpp 2013-12-07 16:02:16 UTC (rev 3407)
@@ -62,7 +62,7 @@
public:
void PushToCSoundFileLog( const std::string & text ) const;
void PushToCSoundFileLog( int loglevel, const std::string & text ) const;
-private:
+protected:
std::string mod_string_to_utf8( const std::string & encoded ) const;
void apply_mixer_settings( std::int32_t samplerate, int channels );
void apply_libopenmpt_defaults();
Modified: trunk/OpenMPT/libopenmpt/libopenmpt_interactive.cpp
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt_interactive.cpp 2013-12-07 15:58:55 UTC (rev 3406)
+++ trunk/OpenMPT/libopenmpt/libopenmpt_interactive.cpp 2013-12-07 16:02:16 UTC (rev 3407)
@@ -1,6 +1,8 @@
#include "BuildSettings.h"
+#define LIBOPENMPT_INTERACTIVE_IS_EXPERIMENTAL
+
#include "libopenmpt_internal.h"
#include "libopenmpt_interactive.hpp"
#include "libopenmpt_impl.hpp"
Modified: trunk/OpenMPT/libopenmpt/libopenmpt_interactive.hpp
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt_interactive.hpp 2013-12-07 15:58:55 UTC (rev 3406)
+++ trunk/OpenMPT/libopenmpt/libopenmpt_interactive.hpp 2013-12-07 16:02:16 UTC (rev 3407)
@@ -13,11 +13,17 @@
#include "libopenmpt_config.h"
#include "libopenmpt.hpp"
+#if !defined(LIBOPENMPT_INTERACTIVE_IS_EXPERIMENTAL)
+
+#error "libopenmpt_interactive is still completely experimental. The ABI and API WILL change. Use at your own risk, and use only internally for now. You have to #define LIBOPENMPT_INTERACTIVE_IS_EXPERIMENTAL to use it."
+
+#else // LIBOPENMPT_INTERACTIVE_IS_EXPERIMENTAL
+
namespace openmpt {
class interactive_module_impl;
-class LIBOPENMPT_CXX_API interactive_module : public module {
+class /* LIBOPENMPT_CXX_API */ interactive_module : public module {
private:
interactive_module_impl * interactive_impl;
@@ -41,8 +47,10 @@
-}; // class module
+}; // class interactive_module
} // namespace openmpt
+#endif // LIBOPENMPT_INTERACTIVE_IS_EXPERIMENTAL
+
#endif // LIBOPENMPT_INTERACTIVE_HPP
Modified: trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp
===================================================================
--- trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp 2013-12-07 15:58:55 UTC (rev 3406)
+++ trunk/OpenMPT/libopenmpt/xmp-openmpt.cpp 2013-12-07 16:02:16 UTC (rev 3407)
@@ -19,7 +19,10 @@
#endif
#endif // _MSC_VER
+#define LIBOPENMPT_INTERACTIVE_IS_EXPERIMENTAL
+
#include "libopenmpt.hpp"
+#include "libopenmpt_interactive.hpp"
#include "libopenmpt_settings.hpp"
@@ -85,7 +88,7 @@
std::size_t samplerate;
std::size_t num_channels;
openmpt::settings::settings settings;
- openmpt::module * mod;
+ openmpt::interactive_module * mod;
self_xmplay_t() : samplerate(48000), num_channels(2), settings(TEXT(SHORT_TITLE), false), mod(nullptr) {
settings.changed = apply_and_save_options;
settings.load();
@@ -580,7 +583,7 @@
#ifdef USE_XMPLAY_ISTREAM
switch ( xmpffile->GetType( file ) ) {
case XMPFILE_TYPE_MEMORY:
- self->mod = new openmpt::module( xmpffile->GetMemory( file ), xmpffile->GetSize( file ) );
+ self->mod = new openmpt::interactive_module( xmpffile->GetMemory( file ), xmpffile->GetSize( file ) );
break;
case XMPFILE_TYPE_FILE:
case XMPFILE_TYPE_NETFILE:
@@ -588,19 +591,19 @@
default:
{
xmplay_istream stream( file );
- self->mod = new openmpt::module( stream );
+ self->mod = new openmpt::interactive_module( stream );
}
break;
}
#else
if ( xmpffile->GetType( file ) == XMPFILE_TYPE_MEMORY ) {
- self->mod = new openmpt::module( xmpffile->GetMemory( file ), xmpffile->GetSize( file ) );
+ self->mod = new openmpt::interactive_module( xmpffile->GetMemory( file ), xmpffile->GetSize( file ) );
} else {
- self->mod = new openmpt::module( (read_XMPFILE( file )) );
+ self->mod = new openmpt::interactive_module( (read_XMPFILE( file )) );
}
#endif
#else
- self->mod = new openmpt::module( std::ifstream( filename, std::ios_base::binary ) );
+ self->mod = new openmpt::interactive_module( std::ifstream( filename, std::ios_base::binary ) );
#endif
reset_timeinfos();
apply_options();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2013-12-08 13:37:21
|
Revision: 3414
http://sourceforge.net/p/modplug/code/3414
Author: manxorist
Date: 2013-12-08 13:37:09 +0000 (Sun, 08 Dec 2013)
Log Message:
-----------
[Imp] libopenmpt build: Build openmpt123 man page using help2man.
[Imp] libopenmpt build: Include docs (as far as available) in make install.
Modified Paths:
--------------
trunk/OpenMPT/Makefile
trunk/OpenMPT/libopenmpt/Doxyfile-c
trunk/OpenMPT/libopenmpt/Doxyfile-cpp
Modified: trunk/OpenMPT/Makefile
===================================================================
--- trunk/OpenMPT/Makefile 2013-12-08 11:37:18 UTC (rev 3413)
+++ trunk/OpenMPT/Makefile 2013-12-08 13:37:09 UTC (rev 3414)
@@ -76,11 +76,15 @@
RM = del /q /f
INSTALL = echo install
+INSTALL_MAKE_DIR echo install
+INSTALL_DIR = echo install
else
RM = rm -f
INSTALL = install
+INSTALL_MAKE_DIR = install -d
+INSTALL_DIR = cp -r -v
endif
@@ -90,6 +94,8 @@
INSTALL_PROGRAM = $(INSTALL) -m 0755 -D
INSTALL_DATA = $(INSTALL) -m 0644 -D
+INSTALL_DATA_DIR = $(INSTALL_DIR)
+INSTALL_MAKE_DIR += -m 0755
CPPFLAGS += -Icommon -I. -Iinclude/modplug/include -Iinclude
CXXFLAGS += -fvisibility=hidden
@@ -122,6 +128,14 @@
#CXXFLAGS += -mtune=generic
#CFLAGS += -mtune=generic
+ifeq ($(shell help2man --version > /dev/null 2>&1 && echo yes ),yes)
+MPT_WITH_HELP2MAN := 1
+endif
+
+ifeq ($(shell doxygen --version > /dev/null 2>&1 && echo yes ),yes)
+MPT_WITH_DOXYGEN := 1
+endif
+
ifeq ($(NO_ZLIB),1)
CPPFLAGS_ZLIB := -DNO_ZLIB
else
@@ -318,7 +332,10 @@
endif
ifeq ($(OPENMPT123),1)
OUTPUTS += bin/openmpt123$(EXESUFFIX)
+ifeq ($(MPT_WITH_HELP2MAN),1)
+OUTPUTS += bin/openmpt123.1
endif
+endif
ifeq ($(NO_PORTAUDIO),1)
else
ifeq ($(EXAMPLES),1)
@@ -331,9 +348,37 @@
OUTPUTS += bin/libopenmpt_test$(EXESUFFIX)
endif
OUTPUTS += bin/libopenmpt.pc
+ifeq ($(MPT_WITH_DOXYGEN),1)
+OUTPUTS += docs
+endif
+MISC_OUTPUTS += libopenmpt.so
+MISC_OUTPUTS += bin/.docs
+MISC_OUTPUTS += bin/dist.tar
+MISC_OUTPUTS += bin/svn_version_dist.h
+MISC_OUTPUTS += bin/libopenmpt_test$(EXESUFFIX)
+
+MISC_OUTPUTDIRS += bin/dest
+MISC_OUTPUTDIRS += bin/dist
+MISC_OUTPUTDIRS += bin/dist-zip
+MISC_OUTPUTDIRS += bin/docs
+
+
+
+
all: $(OUTPUTS)
+.PHONY: docs
+docs: bin/.docs
+
+bin/.docs:
+ $(VERYSILENT)mkdir -p bin/docs
+ $(INFO) [DOXYGEN] C
+ $(SILENT)doxygen libopenmpt/Doxyfile-c
+ $(INFO) [DOXYGEN] C++
+ $(SILENT)doxygen libopenmpt/Doxyfile-cpp
+ $(VERYSILENT)touch $@
+
.PHONY: test
test: bin/libopenmpt_test$(EXESUFFIX)
bin/libopenmpt_test$(EXESUFFIX)
@@ -377,14 +422,36 @@
endif
ifeq ($(OPENMPT123),1)
$(INSTALL_PROGRAM) bin/openmpt123$(EXESUFFIX).norpath $(DESTDIR)$(PREFIX)/bin/openmpt123$(EXESUFFIX)
+ifeq ($(MPT_WITH_HELP2MAN),1)
+ $(INSTALL_DATA) bin/openmpt123.1 $(DESTDIR)$(PREFIX)/share/man/man.1/openmpt123.1
endif
+endif
+ $(INSTALL_DATA) LICENSE $(DESTDIR)$(PREFIX)/share/doc/libopenmpt/LICENSE
+ $(INSTALL_DATA) README $(DESTDIR)$(PREFIX)/share/doc/libopenmpt/README
+ $(INSTALL_DATA) TODO $(DESTDIR)$(PREFIX)/share/doc/libopenmpt/TODO
+ $(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
+ifeq ($(MPT_WITH_DOXYGEN),1)
+ $(INSTALL_MAKE_DIR) $(DESTDIR)$(PREFIX)/share/doc/man/
+ #$(INSTALL_DATA_DIR) bin/docs/c/man $(DESTDIR)$(PREFIX)/share/doc/man
+ #$(INSTALL_DATA_DIR) bin/docs/cpp/man $(DESTDIR)$(PREFIX)/share/doc/man
+endif
.PHONY: dist
dist: bin/dist.tar
-bin/dist.tar: bin/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar.gz
+bin/dist.tar: bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar.gz
rm -rf bin/dist.tar
+ cd bin/ && cp dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip ./
+ cd bin/ && cp dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip ./
+ cd bin/ && cp dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar ./
+ cd bin/ && cp dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar.gz ./
cd bin/ && tar cvf dist.tar OpenMPT-src-$(DIST_OPENMPT_VERSION).zip libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar.gz
+ rm bin/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip
+ rm bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip
+ rm bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar
+ rm bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar.gz
.PHONY: bin/svn_version_dist.h
bin/svn_version_dist.h:
@@ -396,8 +463,8 @@
echo '#include "../svn_version_svnversion/svn_version.h"' >> $@.tmp
mv $@.tmp $@
-.PHONY: bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar
-bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar: bin/svn_version_dist.h
+.PHONY: bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar
+bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar: bin/svn_version_dist.h
mkdir -p bin/dist
rm -rf bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)
mkdir -p bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)
@@ -416,10 +483,10 @@
svn export ./include/miniz bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/miniz
svn export ./include/modplug bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/modplug
cp bin/svn_version_dist.h bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/common/svn_version_default/svn_version.h
- cd bin/dist/ && tar cv libopenmpt-src-$(DIST_LIBOPENMPT_VERSION) > ../libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar
+ cd bin/dist/ && tar cv libopenmpt-src-$(DIST_LIBOPENMPT_VERSION) > libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar
-.PHONY: bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip
-bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip: bin/svn_version_dist.h
+.PHONY: bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip
+bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip: bin/svn_version_dist.h
mkdir -p bin/dist-zip
rm -rf bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)
mkdir -p bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)
@@ -443,15 +510,15 @@
svn export ./include/winamp bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/winamp --native-eol CRLF
svn export ./include/xmplay bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/xmplay --native-eol CRLF
cp bin/svn_version_dist.h bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/common/svn_version_default/svn_version.h
- cd bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/ && zip -r ../../libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip --compression-method deflate -9 *
+ cd bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/ && zip -r ../libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip --compression-method deflate -9 *
-.PHONY: bin/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip
-bin/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip: bin/svn_version_dist.h
+.PHONY: bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip
+bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip: bin/svn_version_dist.h
mkdir -p bin/dist-zip
rm -rf bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION)
svn export ./ bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION)/ --native-eol CRLF
cp bin/svn_version_dist.h bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION)/common/svn_version_default/svn_version.h
- cd bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION)/ && zip -r ../../OpenMPT-src-$(DIST_OPENMPT_VERSION).zip --compression-method deflate -9 *
+ cd bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION)/ && zip -r ../OpenMPT-src-$(DIST_OPENMPT_VERSION).zip --compression-method deflate -9 *
bin/openmpt.a: $(LIBOPENMPT_OBJECTS)
$(INFO) [AR ] $@
@@ -465,6 +532,10 @@
$(INFO) [LD ] $@
$(SILENT)$(LINK.cc) -shared $(LDFLAGS_LIBOPENMPT) $^ $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@
+bin/openmpt123.1: bin/openmpt123$(EXESUFFIX)
+ $(INFO) [HELP2MAN] $@
+ $(SILENT)help2man --no-discard-stderr --no-info $< > $@
+
openmpt123/openmpt123.o: openmpt123/openmpt123.cpp
$(INFO) [CXX] $<
$(VERYSILENT)$(CXX) $(CXXFLAGS) $(CXXFLAGS_OPENMPT123) $(CPPFLAGS) $(CPPFLAGS_OPENMPT123) $(TARGET_ARCH) -M -MT$@ $< > $*.d
@@ -526,6 +597,6 @@
else
clean:
$(INFO) clean ...
- $(SILENT)$(RM) $(OUTPUTS) $(ALL_OBJECTS) $(ALL_DEPENDS) libopenmpt.so
- $(SILENT)$(RM) -rf bin/dest
+ $(SILENT)$(RM) $(OUTPUTS) $(ALL_OBJECTS) $(ALL_DEPENDS) $(MISC_OUTPUTS)
+ $(SILENT)$(RM) -rf $(MISC_OUTPUTDIRS)
endif
Modified: trunk/OpenMPT/libopenmpt/Doxyfile-c
===================================================================
--- trunk/OpenMPT/libopenmpt/Doxyfile-c 2013-12-08 11:37:18 UTC (rev 3413)
+++ trunk/OpenMPT/libopenmpt/Doxyfile-c 2013-12-08 13:37:09 UTC (rev 3414)
@@ -52,7 +52,7 @@
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
-OUTPUT_DIRECTORY = docs/c
+OUTPUT_DIRECTORY = bin/docs/c
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
@@ -544,7 +544,7 @@
# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
# in the documentation. The default is NO.
-SHOW_DIRECTORIES = NO
+SHOW_DIRECTORIES = YES
# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
# This will remove the Files entry from the Quick Index and from the
@@ -595,7 +595,7 @@
# The QUIET tag can be used to turn on/off the messages that are generated
# by doxygen. Possible values are YES and NO. If left blank NO is used.
-QUIET = NO
+QUIET = YES
# The WARNINGS tag can be used to turn on/off the warning messages that are
# generated by doxygen. Possible values are YES and NO. If left blank
@@ -648,7 +648,13 @@
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = libopenmpt.h libopenmpt_stream_callbacks_fd.h libopenmpt_stream_callbacks_file.h
+INPUT = \
+ libopenmpt/libopenmpt.h \
+ libopenmpt/libopenmpt_config.h \
+ libopenmpt/libopenmpt_version.h \
+ libopenmpt/libopenmpt_stream_callbacks_fd.h \
+ libopenmpt/libopenmpt_stream_callbacks_file.h \
+
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@@ -858,7 +864,7 @@
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `html' will be used as the default path.
-HTML_OUTPUT = .
+HTML_OUTPUT =
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
@@ -1351,7 +1357,7 @@
# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
# generate man pages
-GENERATE_MAN = NO
+GENERATE_MAN = YES
# The MAN_OUTPUT tag is used to specify where the man pages will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
@@ -1370,7 +1376,7 @@
# only source the real man page, but without them the man command
# would be unable to find the correct page. The default is NO.
-MAN_LINKS = NO
+MAN_LINKS = YES
#---------------------------------------------------------------------------
# configuration options related to the XML output
Modified: trunk/OpenMPT/libopenmpt/Doxyfile-cpp
===================================================================
--- trunk/OpenMPT/libopenmpt/Doxyfile-cpp 2013-12-08 11:37:18 UTC (rev 3413)
+++ trunk/OpenMPT/libopenmpt/Doxyfile-cpp 2013-12-08 13:37:09 UTC (rev 3414)
@@ -52,7 +52,7 @@
# If a relative path is entered, it will be relative to the location
# where doxygen was started. If left blank the current directory will be used.
-OUTPUT_DIRECTORY = docs/cpp
+OUTPUT_DIRECTORY = bin/docs/cpp
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
# 4096 sub-directories (in 2 levels) under the output directory of each output
@@ -595,7 +595,7 @@
# The QUIET tag can be used to turn on/off the messages that are generated
# by doxygen. Possible values are YES and NO. If left blank NO is used.
-QUIET = NO
+QUIET = YES
# The WARNINGS tag can be used to turn on/off the warning messages that are
# generated by doxygen. Possible values are YES and NO. If left blank
@@ -648,7 +648,11 @@
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
-INPUT = libopenmpt.hpp
+INPUT = \
+ libopenmpt/libopenmpt.hpp \
+ libopenmpt/libopenmpt_config.h \
+ libopenmpt/libopenmpt_version.h \
+
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@@ -858,7 +862,7 @@
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
# put in front of it. If left blank `html' will be used as the default path.
-HTML_OUTPUT = .
+HTML_OUTPUT =
# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
@@ -1351,7 +1355,7 @@
# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
# generate man pages
-GENERATE_MAN = NO
+GENERATE_MAN = YES
# The MAN_OUTPUT tag is used to specify where the man pages will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
@@ -1370,7 +1374,7 @@
# only source the real man page, but without them the man command
# would be unable to find the correct page. The default is NO.
-MAN_LINKS = NO
+MAN_LINKS = YES
#---------------------------------------------------------------------------
# configuration options related to the XML output
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2013-12-08 13:53:40
|
Revision: 3416
http://sourceforge.net/p/modplug/code/3416
Author: manxorist
Date: 2013-12-08 13:53:33 +0000 (Sun, 08 Dec 2013)
Log Message:
-----------
[Fix] libopenmpt build: Fix mingw build on windows.
Modified Paths:
--------------
trunk/OpenMPT/Makefile
trunk/OpenMPT/openmpt123/openmpt123.cpp
Modified: trunk/OpenMPT/Makefile
===================================================================
--- trunk/OpenMPT/Makefile 2013-12-08 13:39:42 UTC (rev 3415)
+++ trunk/OpenMPT/Makefile 2013-12-08 13:53:33 UTC (rev 3416)
@@ -76,7 +76,7 @@
RM = del /q /f
INSTALL = echo install
-INSTALL_MAKE_DIR echo install
+INSTALL_MAKE_DIR = echo install
INSTALL_DIR = echo install
else
Modified: trunk/OpenMPT/openmpt123/openmpt123.cpp
===================================================================
--- trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-12-08 13:39:42 UTC (rev 3415)
+++ trunk/OpenMPT/openmpt123/openmpt123.cpp 2013-12-08 13:53:33 UTC (rev 3416)
@@ -157,7 +157,7 @@
private:
file_audio_stream_base * impl;
public:
- file_audio_stream_raii( const commandlineflags & flags, const std::string & filename, std::ostream & log )
+ file_audio_stream_raii( const commandlineflags & flags, const std::string & filename, std::ostream & /* log */ )
: impl(0)
{
if ( !flags.force_overwrite ) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2013-12-09 15:30:38
|
Revision: 3424
http://sourceforge.net/p/modplug/code/3424
Author: manxorist
Date: 2013-12-09 15:30:28 +0000 (Mon, 09 Dec 2013)
Log Message:
-----------
[Imp] libopenmpt-modplug: Optionally emulate v0.8.7 style API.
[New] libopenmpt build: Add stub make install-modplug target.
[Fix] libopenmpt build: Fix libopenmpt_modplug linking.
Modified Paths:
--------------
trunk/OpenMPT/Makefile
trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c
Added Paths:
-----------
trunk/OpenMPT/include/modplug/include/libmodplug/modplug_0.8.7.h
Property Changed:
----------------
trunk/OpenMPT/include/modplug/include/libmodplug/
Modified: trunk/OpenMPT/Makefile
===================================================================
--- trunk/OpenMPT/Makefile 2013-12-09 13:37:01 UTC (rev 3423)
+++ trunk/OpenMPT/Makefile 2013-12-09 15:30:28 UTC (rev 3424)
@@ -447,6 +447,14 @@
#$(INSTALL_DATA_DIR) bin/docs/cpp/man $(DESTDIR)$(PREFIX)/share/doc/man
endif
+.PHONY: install-modplug
+install-modplug: $(OUTPUTS)
+ifeq ($(SHARED_LIB),1)
+ $(INSTALL_DATA) bin/libopenmpt_modplug.so $(DESTDIR)$(PREFIX)/lib/libmodplug.so
+ $(INSTALL_DATA) bin/libopenmpt_modplug.so $(DESTDIR)$(PREFIX)/lib/libmodplug.so.0
+ $(INSTALL_DATA) bin/libopenmpt_modplug.so $(DESTDIR)$(PREFIX)/lib/libmodplug.so.0.0.0
+endif
+
.PHONY: dist
dist: bin/dist.tar
@@ -539,7 +547,7 @@
bin/libopenmpt_modplug.so: $(LIBOPENMPT_MODPLUG_OBJECTS) $(OUTPUT_LIBOPENMPT)
$(INFO) [LD ] $@
- $(SILENT)$(LINK.cc) -shared $(LDFLAGS_LIBOPENMPT) $^ $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@
+ $(SILENT)$(LINK.cc) -shared $(LDFLAGS_LIBOPENMPT) $(LIBOPENMPT_MODPLUG_OBJECTS) $(OBJECTS_LIBOPENMPT) $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@
bin/openmpt123.1: bin/openmpt123$(EXESUFFIX)
$(INFO) [HELP2MAN] $@
Index: trunk/OpenMPT/include/modplug/include/libmodplug
===================================================================
--- trunk/OpenMPT/include/modplug/include/libmodplug 2013-12-09 13:37:01 UTC (rev 3423)
+++ trunk/OpenMPT/include/modplug/include/libmodplug 2013-12-09 15:30:28 UTC (rev 3424)
Property changes on: trunk/OpenMPT/include/modplug/include/libmodplug
___________________________________________________________________
Modified: svn:ignore
## -1 +1 ##
-*
+
Added: trunk/OpenMPT/include/modplug/include/libmodplug/modplug_0.8.7.h
===================================================================
--- trunk/OpenMPT/include/modplug/include/libmodplug/modplug_0.8.7.h (rev 0)
+++ trunk/OpenMPT/include/modplug/include/libmodplug/modplug_0.8.7.h 2013-12-09 15:30:28 UTC (rev 3424)
@@ -0,0 +1,168 @@
+/*
+ * This source code is public domain.
+ *
+ * Authors: Kenton Varda <tem...@ga...> (C interface wrapper)
+ */
+
+#ifndef MODPLUG_H__INCLUDED
+#define MODPLUG_H__INCLUDED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct _ModPlugFile;
+typedef struct _ModPlugFile ModPlugFile;
+
+struct _ModPlugNote {
+ unsigned char Note;
+ unsigned char Instrument;
+ unsigned char VolumeEffect;
+ unsigned char Effect;
+ unsigned char Volume;
+ unsigned char Parameter;
+};
+typedef struct _ModPlugNote ModPlugNote;
+
+typedef void (*ModPlugMixerProc)(int*, unsigned long, unsigned long);
+
+/* Load a mod file. [data] should point to a block of memory containing the complete
+ * file, and [size] should be the size of that block.
+ * Return the loaded mod file on success, or NULL on failure. */
+ModPlugFile* ModPlug_Load(const void* data, int size);
+/* Unload a mod file. */
+void ModPlug_Unload(ModPlugFile* file);
+
+/* Read sample data into the buffer. Returns the number of bytes read. If the end
+ * of the mod has been reached, zero is returned. */
+int ModPlug_Read(ModPlugFile* file, void* buffer, int size);
+
+/* Get the name of the mod. The returned buffer is stored within the ModPlugFile
+ * structure and will remain valid until you unload the file. */
+const char* ModPlug_GetName(ModPlugFile* file);
+
+/* Get the length of the mod, in milliseconds. Note that this result is not always
+ * accurate, especially in the case of mods with loops. */
+int ModPlug_GetLength(ModPlugFile* file);
+
+/* Seek to a particular position in the song. Note that seeking and MODs don't mix very
+ * well. Some mods will be missing instruments for a short time after a seek, as ModPlug
+ * does not scan the sequence backwards to find out which instruments were supposed to be
+ * playing at that time. (Doing so would be difficult and not very reliable.) Also,
+ * note that seeking is not very exact in some mods -- especially those for which
+ * ModPlug_GetLength() does not report the full length. */
+void ModPlug_Seek(ModPlugFile* file, int millisecond);
+
+enum _ModPlug_Flags
+{
+ MODPLUG_ENABLE_OVERSAMPLING = 1 << 0, /* Enable oversampling (*highly* recommended) */
+ MODPLUG_ENABLE_NOISE_REDUCTION = 1 << 1, /* Enable noise reduction */
+ MODPLUG_ENABLE_REVERB = 1 << 2, /* Enable reverb */
+ MODPLUG_ENABLE_MEGABASS = 1 << 3, /* Enable megabass */
+ MODPLUG_ENABLE_SURROUND = 1 << 4 /* Enable surround sound. */
+};
+
+enum _ModPlug_ResamplingMode
+{
+ MODPLUG_RESAMPLE_NEAREST = 0, /* No interpolation (very fast, extremely bad sound quality) */
+ MODPLUG_RESAMPLE_LINEAR = 1, /* Linear interpolation (fast, good quality) */
+ MODPLUG_RESAMPLE_SPLINE = 2, /* Cubic spline interpolation (high quality) */
+ MODPLUG_RESAMPLE_FIR = 3 /* 8-tap fir filter (extremely high quality) */
+};
+
+typedef struct _ModPlug_Settings
+{
+ int mFlags; /* One or more of the MODPLUG_ENABLE_* flags above, bitwise-OR'ed */
+
+ /* Note that ModPlug always decodes sound at 44100kHz, 32 bit, stereo and then
+ * down-mixes to the settings you choose. */
+ int mChannels; /* Number of channels - 1 for mono or 2 for stereo */
+ int mBits; /* Bits per sample - 8, 16, or 32 */
+ int mFrequency; /* Sampling rate - 11025, 22050, or 44100 */
+ int mResamplingMode; /* One of MODPLUG_RESAMPLE_*, above */
+
+ int mReverbDepth; /* Reverb level 0(quiet)-100(loud) */
+ int mReverbDelay; /* Reverb delay in ms, usually 40-200ms */
+ int mBassAmount; /* XBass level 0(quiet)-100(loud) */
+ int mBassRange; /* XBass cutoff in Hz 10-100 */
+ int mSurroundDepth; /* Surround level 0(quiet)-100(heavy) */
+ int mSurroundDelay; /* Surround delay in ms, usually 5-40ms */
+ int mLoopCount; /* Number of times to loop. Zero prevents looping.
+ -1 loops forever. */
+} ModPlug_Settings;
+
+/* Get and set the mod decoder settings. All options, except for channels, bits-per-sample,
+ * sampling rate, and loop count, will take effect immediately. Those options which don't
+ * take effect immediately will take effect the next time you load a mod. */
+void ModPlug_GetSettings(ModPlug_Settings* settings);
+void ModPlug_SetSettings(const ModPlug_Settings* settings);
+
+/* New ModPlug API Functions */
+/* NOTE: Master Volume (1-512) */
+unsigned int ModPlug_GetMasterVolume(ModPlugFile* file) ;
+void ModPlug_SetMasterVolume(ModPlugFile* file,unsigned int cvol) ;
+
+int ModPlug_GetCurrentSpeed(ModPlugFile* file);
+int ModPlug_GetCurrentTempo(ModPlugFile* file);
+int ModPlug_GetCurrentOrder(ModPlugFile* file);
+int ModPlug_GetCurrentPattern(ModPlugFile* file);
+int ModPlug_GetCurrentRow(ModPlugFile* file);
+int ModPlug_GetPlayingChannels(ModPlugFile* file);
+
+void ModPlug_SeekOrder(ModPlugFile* file,int order);
+int ModPlug_GetModuleType(ModPlugFile* file);
+char* ModPlug_GetMessage(ModPlugFile* file);
+
+
+#ifndef MODPLUG_NO_FILESAVE
+/*
+ * EXPERIMENTAL Export Functions
+ */
+/*Export to a Scream Tracker 3 S3M module. EXPERIMENTAL (only works on Little-Endian platforms)*/
+char ModPlug_ExportS3M(ModPlugFile* file, const char* filepath);
+
+/*Export to a Extended Module (XM). EXPERIMENTAL (only works on Little-Endian platforms)*/
+char ModPlug_ExportXM(ModPlugFile* file, const char* filepath);
+
+/*Export to a Amiga MOD file. EXPERIMENTAL.*/
+char ModPlug_ExportMOD(ModPlugFile* file, const char* filepath);
+
+/*Export to a Impulse Tracker IT file. Should work OK in Little-Endian & Big-Endian platforms :-) */
+char ModPlug_ExportIT(ModPlugFile* file, const char* filepath);
+#endif // MODPLUG_NO_FILESAVE
+
+unsigned int ModPlug_NumInstruments(ModPlugFile* file);
+unsigned int ModPlug_NumSamples(ModPlugFile* file);
+unsigned int ModPlug_NumPatterns(ModPlugFile* file);
+unsigned int ModPlug_NumChannels(ModPlugFile* file);
+unsigned int ModPlug_SampleName(ModPlugFile* file, unsigned int qual, char* buff);
+unsigned int ModPlug_InstrumentName(ModPlugFile* file, unsigned int qual, char* buff);
+
+/*
+ * Retrieve pattern note-data
+ */
+ModPlugNote* ModPlug_GetPattern(ModPlugFile* file, int pattern, unsigned int* numrows);
+
+/*
+ * =================
+ * Mixer callback
+ * =================
+ *
+ * Use this callback if you want to 'modify' the mixed data of LibModPlug.
+ *
+ * void proc(int* buffer,unsigned long channels,unsigned long nsamples) ;
+ *
+ * 'buffer': A buffer of mixed samples
+ * 'channels': N. of channels in the buffer
+ * 'nsamples': N. of samples in the buffeer (without taking care of n.channels)
+ *
+ * (Samples are signed 32-bit integers)
+ */
+void ModPlug_InitMixerCallback(ModPlugFile* file,ModPlugMixerProc proc) ;
+void ModPlug_UnloadMixerCallback(ModPlugFile* file) ;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif
Property changes on: trunk/OpenMPT/include/modplug/include/libmodplug/modplug_0.8.7.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
Modified: trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c 2013-12-09 13:37:01 UTC (rev 3423)
+++ trunk/OpenMPT/libopenmpt/libopenmpt_modplug.c 2013-12-09 15:30:28 UTC (rev 3424)
@@ -28,13 +28,20 @@
#include <stdlib.h>
#include <string.h>
+/* define to emulate 0.8.7 API/ABI instead of 0.8.8 API/ABI */
+/* #define LIBOPENMPT_MODPLUG_0_8_7 */
+
#ifdef _MSC_VER
/* msvc errors when seeing dllexport declarations after prototypes have been declared in modplug.h */
#define LIBOPENMPT_MODPLUG_API
#else /* !_MSC_VER */
#define LIBOPENMPT_MODPLUG_API LIBOPENMPT_API_HELPER_EXPORT
#endif /* _MSC_VER */
+#ifdef LIBOPENMPT_MODPLUG_0_8_7
+#include "libmodplug/modplug_0.8.7.h"
+#else
#include "libmodplug/modplug.h"
+#endif
/* from libmodplug/sndfile.h */
/* header is not c clean */
@@ -87,9 +94,10 @@
16,
44100,
MODPLUG_RESAMPLE_LINEAR,
+#ifndef LIBOPENMPT_MODPLUG_0_8_7
128,
256,
-
+#endif
0,
0,
0,
@@ -133,7 +141,9 @@
openmpt_module_set_repeat_count(file->mod,file->settings.mLoopCount);
file->name = openmpt_module_get_metadata(file->mod,"title");
file->message = openmpt_module_get_metadata(file->mod,"message");
+#ifndef LIBOPENMPT_MODPLUG_0_8_7
openmpt_module_set_render_param(file->mod,OPENMPT_MODULE_RENDER_STEREOSEPARATION_PERCENT,file->settings.mStereoSeparation*100/128);
+#endif
openmpt_module_set_render_param(file->mod,OPENMPT_MODULE_RENDER_INTERPOLATIONFILTER_LENGTH,modplugresamplingmode_to_filterlength(file->settings.mResamplingMode));
return file;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <man...@us...> - 2013-12-09 23:04:27
|
Revision: 3428
http://sourceforge.net/p/modplug/code/3428
Author: manxorist
Date: 2013-12-09 23:04:16 +0000 (Mon, 09 Dec 2013)
Log Message:
-----------
[New] libopenmpt_modplug: Add a really rough and hacky incomplete emulation of the libmodplug c++ interface.
Modified Paths:
--------------
trunk/OpenMPT/Makefile
trunk/OpenMPT/include/modplug/include/libmodplug/stdafx.h
Added Paths:
-----------
trunk/OpenMPT/libopenmpt/libopenmpt_modplug_cpp.cpp
Modified: trunk/OpenMPT/Makefile
===================================================================
--- trunk/OpenMPT/Makefile 2013-12-09 17:35:38 UTC (rev 3427)
+++ trunk/OpenMPT/Makefile 2013-12-09 23:04:16 UTC (rev 3428)
@@ -286,7 +286,10 @@
LIBOPENMPT_MODPLUG_C_SOURCES += \
libopenmpt/libopenmpt_modplug.c \
-LIBOPENMPT_MODPLUG_OBJECTS = $(LIBOPENMPT_MODPLUG_C_SOURCES:.c=.o)
+LIBOPENMPT_MODPLUG_CPP_SOURCES += \
+ libopenmpt/libopenmpt_modplug_cpp.cpp \
+
+LIBOPENMPT_MODPLUG_OBJECTS = $(LIBOPENMPT_MODPLUG_C_SOURCES:.c=.o) $(LIBOPENMPT_MODPLUG_CPP_SOURCES:.cpp=.o)
LIBOPENMPT_MODPLUG_DEPENDS = $(LIBOPENMPT_MODPLUG_OBJECTS:.o=.d)
ALL_OBJECTS += $(LIBOPENMPT_MODPLUG_OBJECTS)
ALL_DEPENDS += $(LIBOPENMPT_MODPLUG_DEPENDS)
Modified: trunk/OpenMPT/include/modplug/include/libmodplug/stdafx.h
===================================================================
--- trunk/OpenMPT/include/modplug/include/libmodplug/stdafx.h 2013-12-09 17:35:38 UTC (rev 3427)
+++ trunk/OpenMPT/include/modplug/include/libmodplug/stdafx.h 2013-12-09 23:04:16 UTC (rev 3428)
@@ -104,7 +104,7 @@
return p;
}
-inline void ProcessPlugins(int n) {}
+inline void ProcessPlugins(int /* n */ ) {}
#define GlobalFreePtr(p) free((void *)(p))
Added: trunk/OpenMPT/libopenmpt/libopenmpt_modplug_cpp.cpp
===================================================================
--- trunk/OpenMPT/libopenmpt/libopenmpt_modplug_cpp.cpp (rev 0)
+++ trunk/OpenMPT/libopenmpt/libopenmpt_modplug_cpp.cpp 2013-12-09 23:04:16 UTC (rev 3428)
@@ -0,0 +1,434 @@
+/*
+ * libopenmpt_modplug_cpp.cpp
+ * --------------------------
+ * Purpose: libopenmpt emulation of the libmodplug c++ interface
+ * Notes : WARNING! THIS IS INCOMPLETE!
+ * Authors: OpenMPT Devs
+ * The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
+ */
+
+#ifndef NO_LIBMODPLUG
+
+/*
+
+***********************************************************************
+WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+***********************************************************************
+
+This is a dirty hack to emulate just so much of the libmodplug c++
+interface so that the current known users (mainly xmms-modplug itself,
+gstreamer modplug, and stuff based on those 2) work. This is neither
+a complete nor a correct implementation.
+Symbols unused by these implementations are not included.
+Metadata and other state is not provided or updated.
+
+*/
+
+#ifdef UNICODE
+#undef UNICODE
+#endif
+#ifdef _UNICODE
+#undef _UNICODE
+#endif
+
+#ifdef _MSC_VER
+#ifndef _CRT_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#endif /* _MSC_VER */
+
+#include "libopenmpt.hpp"
+
+#include <string>
+#include <vector>
+
+#include <climits>
+#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+
+#ifdef _MSC_VER
+/* msvc errors when seeing dllexport declarations after prototypes have been declared in modplug.h */
+#define LIBOPENMPT_MODPLUG_API
+#else /* !_MSC_VER */
+#define LIBOPENMPT_MODPLUG_API LIBOPENMPT_API_HELPER_EXPORT
+#endif /* _MSC_VER */
+
+template <class T>
+void Clear( T & x )
+{
+ std::memset( &x, 0, sizeof(T) );
+}
+
+class LIBOPENMPT_MODPLUG_API CSoundFile;
+
+#include "libmodplug/stdafx.h"
+#include "libmodplug/sndfile.h"
+
+//#define mpcpplog() fprintf(stderr, "%s %i\n", __func__, __LINE__)
+#define mpcpplog() do{}while(0)
+
+#define UNUSED(x) (void)((x))
+
+union self_t {
+ CHAR CompressionTable[16];
+ openmpt::module * self_;
+};
+
+static void set_self( CSoundFile * that, openmpt::module * self_ ) {
+ self_t self_union;
+ Clear(self_union);
+ self_union.self_ = self_;
+ std::memcpy( that->CompressionTable, self_union.CompressionTable, sizeof( self_union.CompressionTable ) );
+}
+
+static openmpt::module * get_self( const CSoundFile * that ) {
+ self_t self_union;
+ Clear(self_union);
+ std::memcpy( self_union.CompressionTable, that->CompressionTable, sizeof( self_union.CompressionTable ) );
+ return self_union.self_;
+}
+
+#define mod ( get_self( this ) )
+
+UINT CSoundFile::m_nXBassDepth = 0;
+UINT CSoundFile::m_nXBassRange = 0;
+UINT CSoundFile::m_nReverbDepth = 0;
+UINT CSoundFile::m_nReverbDelay = 0;
+UINT CSoundFile::gnReverbType = 0;
+UINT CSoundFile::m_nProLogicDepth = 0;
+UINT CSoundFile::m_nProLogicDelay = 0;
+UINT CSoundFile::m_nStereoSeparation = 128;
+UINT CSoundFile::m_nMaxMixChannels = 256;
+LONG CSoundFile::m_nStreamVolume = 0x8000;
+DWORD CSoundFile::gdwSysInfo = 0;
+DWORD CSoundFile::gdwSoundSetup = 0;
+DWORD CSoundFile::gdwMixingFreq = 44100;
+DWORD CSoundFile::gnBitsPerSample = 16;
+DWORD CSoundFile::gnChannels = 2;
+UINT CSoundFile::gnAGC = 0;
+UINT CSoundFile::gnVolumeRampSamples = 0;
+UINT CSoundFile::gnVUMeter = 0;
+UINT CSoundFile::gnCPUUsage = 0;;
+LPSNDMIXHOOKPROC CSoundFile::gpSndMixHook = 0;
+PMIXPLUGINCREATEPROC CSoundFile::gpMixPluginCreateProc = 0;
+
+CSoundFile::CSoundFile() {
+ mpcpplog();
+ Clear(Chn);
+ Clear(ChnMix);
+ Clear(Ins);
+ Clear(Headers);
+ Clear(ChnSettings);
+ Clear(Patterns);
+ Clear(PatternSize);
+ Clear(Order);
+ Clear(m_MidiCfg);
+ Clear(m_MixPlugins);
+ Clear(m_nDefaultSpeed);
+ Clear(m_nDefaultTempo);
+ Clear(m_nDefaultGlobalVolume);
+ Clear(m_dwSongFlags);
+ Clear(m_nChannels);
+ Clear(m_nMixChannels);
+ Clear(m_nMixStat);
+ Clear(m_nBufferCount);
+ Clear(m_nType);
+ Clear(m_nSamples);
+ Clear(m_nInstruments);
+ Clear(m_nTickCount);
+ Clear(m_nTotalCount);
+ Clear(m_nPatternDelay);
+ Clear(m_nFrameDelay);
+ Clear(m_nMusicSpeed);
+ Clear(m_nMusicTempo);
+ Clear(m_nNextRow);
+ Clear(m_nRow);
+ Clear(m_nPattern);
+ Clear(m_nCurrentPattern);
+ Clear(m_nNextPattern);
+ Clear(m_nRestartPos);
+ Clear(m_nMasterVolume);
+ Clear(m_nGlobalVolume);
+ Clear(m_nSongPreAmp);
+ Clear(m_nFreqFactor);
+ Clear(m_nTempoFactor);
+ Clear(m_nOldGlbVolSlide);
+ Clear(m_nMinPeriod);
+ Clear(m_nMaxPeriod);
+ Clear(m_nRepeatCount);
+ Clear(m_nInitialRepeatCount);
+ Clear(m_nGlobalFadeSamples);
+ Clear(m_nGlobalFadeMaxSamples);
+ Clear(m_nMaxOrderPosition);
+ Clear(m_nPatternNames);
+ Clear(m_lpszSongComments);
+ Clear(m_lpszPatternNames);
+ Clear(m_szNames);
+ Clear(CompressionTable);
+}
+
+CSoundFile::~CSoundFile() {
+ mpcpplog();
+ Destroy();
+}
+
+BOOL CSoundFile::Create( LPCBYTE lpStream, DWORD dwMemLength ) {
+ mpcpplog();
+ try {
+ openmpt::module * m = new openmpt::module( lpStream, dwMemLength );
+ set_self( this, m );
+ std::strncpy( m_szNames[0], mod->get_metadata("title").c_str(), sizeof( m_szNames[0] ) );
+ m_szNames[0][ sizeof( m_szNames[0] ) - 1 ] = '\0';
+ return TRUE;
+ } catch ( ... ) {
+ Destroy();
+ return FALSE;
+ }
+}
+
+BOOL CSoundFile::Destroy() {
+ mpcpplog();
+ if ( mod ) {
+ delete mod;
+ set_self( this, 0 );
+ }
+ return TRUE;
+}
+
+BOOL CSoundFile::SetWaveConfig( UINT nRate, UINT nBits, UINT nChannels, BOOL bMMX ) {
+ UNUSED(bMMX);
+ mpcpplog();
+ gdwMixingFreq = nRate;
+ gnBitsPerSample = nBits;
+ gnChannels = nChannels;
+ return TRUE;
+}
+
+BOOL CSoundFile::SetWaveConfigEx( BOOL bSurround, BOOL bNoOverSampling, BOOL bReverb, BOOL hqido, BOOL bMegaBass, BOOL bNR, BOOL bEQ ) {
+ UNUSED(bSurround);
+ UNUSED(bReverb);
+ UNUSED(hqido);
+ UNUSED(bMegaBass);
+ UNUSED(bEQ);
+ mpcpplog();
+ DWORD d = gdwSoundSetup & ~(SNDMIX_NORESAMPLING|SNDMIX_HQRESAMPLER|SNDMIX_ULTRAHQSRCMODE);
+ if ( bNoOverSampling ) {
+ d |= SNDMIX_NORESAMPLING;
+ } else if ( !hqido ) {
+ d |= 0;
+ } else if ( !bNR ) {
+ d |= SNDMIX_HQRESAMPLER;
+ } else {
+ d |= (SNDMIX_HQRESAMPLER|SNDMIX_ULTRAHQSRCMODE);
+ }
+ gdwSoundSetup = d;
+ return TRUE;
+}
+
+BOOL CSoundFile::SetResamplingMode( UINT nMode ) {
+ mpcpplog();
+ DWORD d = gdwSoundSetup & ~(SNDMIX_NORESAMPLING|SNDMIX_HQRESAMPLER|SNDMIX_ULTRAHQSRCMODE);
+ switch ( nMode ) {
+ case SRCMODE_NEAREST:
+ d |= SNDMIX_NORESAMPLING;
+ break;
+ case SRCMODE_LINEAR:
+ break;
+ case SRCMODE_SPLINE:
+ d |= SNDMIX_HQRESAMPLER;
+ break;
+ case SRCMODE_POLYPHASE:
+ d |= (SNDMIX_HQRESAMPLER|SNDMIX_ULTRAHQSRCMODE);
+ break;
+ default:
+ return FALSE;
+ break;
+ }
+ gdwSoundSetup = d;
+ return TRUE;
+}
+
+BOOL CSoundFile::SetReverbParameters( UINT nDepth, UINT nDelay ) {
+ UNUSED(nDepth);
+ UNUSED(nDelay);
+ mpcpplog();
+ return TRUE;
+}
+
+BOOL CSoundFile::SetXBassParameters( UINT nDepth, UINT nRange ) {
+ UNUSED(nDepth);
+ UNUSED(nRange);
+ mpcpplog();
+ return TRUE;
+}
+
+BOOL CSoundFile::SetSurroundParameters( UINT nDepth, UINT nDelay ) {
+ UNUSED(nDepth);
+ UNUSED(nDelay);
+ mpcpplog();
+ return TRUE;
+}
+
+UINT CSoundFile::GetMaxPosition() const {
+ mpcpplog();
+ // rows in original, just use seconds here
+ if ( mod ) return mod->get_duration_seconds() + 0.5;
+ return 0;
+}
+
+DWORD CSoundFile::GetLength( BOOL bAdjust, BOOL bTotal ) {
+ UNUSED(bAdjust);
+ UNUSED(bTotal);
+ mpcpplog();
+ if ( mod ) return mod->get_duration_seconds() + 0.5;
+ return 0;
+}
+
+UINT CSoundFile::GetSongComments( LPSTR s, UINT cbsize, UINT linesize ) {
+ UNUSED(linesize);
+ mpcpplog();
+ if ( !s ) {
+ return 0;
+ }
+ if ( cbsize <= 0 ) {
+ return 0;
+ }
+ if ( !mod ) {
+ s[0] = '\0';
+ return 1;
+ }
+ std::strncpy( s, mod->get_metadata("message").c_str(), cbsize );
+ s[ cbsize - 1 ] = '\0';
+ return std::strlen( s ) + 1;
+}
+
+void CSoundFile::SetCurrentPos( UINT nPos ) {
+ mpcpplog();
+ if ( mod ) mod->set_position_seconds( nPos );
+}
+
+UINT CSoundFile::GetCurrentPos() const {
+ mpcpplog();
+ if ( mod ) return mod->get_position_seconds() + 0.5;
+ return 0;
+}
+
+static std::int32_t get_filter_length() {
+ mpcpplog();
+ if ( ( CSoundFile::gdwSoundSetup & (SNDMIX_HQRESAMPLER|SNDMIX_ULTRAHQSRCMODE) ) == (SNDMIX_HQRESAMPLER|SNDMIX_ULTRAHQSRCMODE) ) {
+ return 8;
+ } else if ( ( CSoundFile::gdwSoundSetup & SNDMIX_HQRESAMPLER ) == SNDMIX_HQRESAMPLER ) {
+ return 4;
+ } else if ( ( CSoundFile::gdwSoundSetup & SNDMIX_HQRESAMPLER ) == SNDMIX_NORESAMPLING ) {
+ return 1;
+ } else {
+ return 2;
+ }
+}
+
+static std::size_t get_sample_size() {
+ return (CSoundFile::gnBitsPerSample/8);
+}
+
+static std::size_t get_num_channels() {
+ return CSoundFile::gnChannels;
+}
+
+static std::size_t get_frame_size() {
+ return get_sample_size() * get_num_channels();
+}
+
+static std::int32_t get_samplerate() {
+ return CSoundFile::gdwMixingFreq;
+}
+
+UINT CSoundFile::Read( LPVOID lpBuffer, UINT cbBuffer ) {
+ mpcpplog();
+ if ( !mod ) {
+ return 0;
+ }
+ mpcpplog();
+ if ( !lpBuffer ) {
+ return 0;
+ }
+ mpcpplog();
+ if ( cbBuffer <= 0 ) {
+ return 0;
+ }
+ mpcpplog();
+ if ( get_samplerate() <= 0 ) {
+ return 0;
+ }
+ mpcpplog();
+ if ( get_sample_size() != 1 && get_sample_size() != 2 && get_sample_size() != 4 ) {
+ return 0;
+ }
+ mpcpplog();
+ if ( get_num_channels() != 1 && get_num_channels() != 2 && get_num_channels() != 4 ) {
+ return 0;
+ }
+ mpcpplog();
+ std::memset( lpBuffer, 0, cbBuffer );
+ const std::size_t frames_torender = cbBuffer / get_frame_size();
+ std::int16_t * out = (std::int16_t*)lpBuffer;
+ std::vector<std::int16_t> tmpbuf;
+ if ( get_sample_size() == 1 || get_sample_size() == 4 ) {
+ tmpbuf.resize( frames_torender * get_num_channels() );
+ out = &tmpbuf[0];
+ }
+
+ mod->set_render_param( openmpt::module::RENDER_INTERPOLATIONFILTER_LENGTH, get_filter_length() );
+ std::size_t frames_rendered = 0;
+ if ( get_num_channels() == 1 ) {
+ frames_rendered = mod->read( get_samplerate(), frames_torender, out );
+ } else if ( get_num_channels() == 4 ) {
+ frames_rendered = mod->read_interleaved_quad( get_samplerate(), frames_torender, out );
+ } else {
+ frames_rendered = mod->read_interleaved_stereo( get_samplerate(), frames_torender, out );
+ }
+
+ if ( get_sample_size() == 1 ) {
+ std::uint8_t * dst = (std::uint8_t*)lpBuffer;
+ for ( std::size_t sample = 0; sample < frames_rendered * get_num_channels(); ++sample ) {
+ dst[sample] = ( tmpbuf[sample] / 0x100 ) + 0x80;
+ }
+ } else if ( get_sample_size() == 4 ) {
+ std::int32_t * dst = (std::int32_t*)lpBuffer;
+ for ( std::size_t sample = 0; sample < frames_rendered * get_num_channels(); ++sample ) {
+ dst[sample] = tmpbuf[sample] << 16;
+ }
+ }
+ return frames_rendered * get_frame_size();
+}
+
+/*
+
+gstreamer modplug calls:
+
+mSoundFile->Create
+mSoundFile->Destroy
+
+mSoundFile->SetWaveConfig
+mSoundFile->SetWaveConfigEx
+mSoundFile->SetResamplingMode
+mSoundFile->SetSurroundParameters
+mSoundFile->SetXBassParameters
+mSoundFile->SetReverbParameters
+
+mSoundFile->GetMaxPosition (inline, -> GetLength)
+mSoundFile->GetSongTime
+
+mSoundFile->GetTitle (inline)
+mSoundFile->GetSongComments
+
+mSoundFile->SetCurrentPos
+mSoundFile->Read
+
+mSoundFile->GetCurrentPos
+mSoundFile->GetMusicTempo (inline)
+
+*/
+
+#endif // NO_LIBMODPLUG
Property changes on: trunk/OpenMPT/libopenmpt/libopenmpt_modplug_cpp.cpp
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+text/x-c++src
\ 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.
|
|
From: <man...@us...> - 2013-12-10 19:33:32
|
Revision: 3433
http://sourceforge.net/p/modplug/code/3433
Author: manxorist
Date: 2013-12-10 19:33:20 +0000 (Tue, 10 Dec 2013)
Log Message:
-----------
[Mod] libopenmpt: Merge C and C++ doxygen into one file.
[Ref] libopenmpt doc: Small cleanups.
Modified Paths:
--------------
trunk/OpenMPT/Makefile
trunk/OpenMPT/libopenmpt/libopenmpt.h
trunk/OpenMPT/libopenmpt/libopenmpt.hpp
trunk/OpenMPT/libopenmpt/libopenmpt_config.h
trunk/OpenMPT/libopenmpt/libopenmpt_version.h
Added Paths:
-----------
trunk/OpenMPT/libopenmpt/Doxyfile
Removed Paths:
-------------
trunk/OpenMPT/libopenmpt/Doxyfile-c
trunk/OpenMPT/libopenmpt/Doxyfile-cpp
Modified: trunk/OpenMPT/Makefile
===================================================================
--- trunk/OpenMPT/Makefile 2013-12-10 17:51:41 UTC (rev 3432)
+++ trunk/OpenMPT/Makefile 2013-12-10 19:33:20 UTC (rev 3433)
@@ -386,10 +386,8 @@
bin/made.docs:
$(VERYSILENT)mkdir -p bin/docs
- $(INFO) [DOXYGEN] C
- $(SILENT)doxygen libopenmpt/Doxyfile-c
- $(INFO) [DOXYGEN] C++
- $(SILENT)doxygen libopenmpt/Doxyfile-cpp
+ $(INFO) [DOXYGEN] libopenmpt
+ $(SILENT)doxygen libopenmpt/Doxyfile
$(VERYSILENT)touch $@
.PHONY: check
@@ -450,8 +448,7 @@
$(INSTALL_DATA) libopenmpt/examples/libopenmpt_example_cxx.cpp $(DESTDIR)$(PREFIX)/share/doc/libopenmpt/examples/libopenmpt_example_cxx.cpp
ifeq ($(MPT_WITH_DOXYGEN),1)
$(INSTALL_MAKE_DIR) $(DESTDIR)$(PREFIX)/share/doc/man/
- #$(INSTALL_DATA_DIR) bin/docs/c/man $(DESTDIR)$(PREFIX)/share/doc/man
- #$(INSTALL_DATA_DIR) bin/docs/cpp/man $(DESTDIR)$(PREFIX)/share/doc/man
+ #$(INSTALL_DATA_DIR) bin/docs/man $(DESTDIR)$(PREFIX)/share/doc/man
endif
.PHONY: install-modplug
@@ -492,9 +489,7 @@
mkdir -p bin/dist
rm -rf bin/dist/libopenmpt-doc-$(DIST_LIBOPENMPT_VERSION)
mkdir -p bin/dist/libopenmpt-doc-$(DIST_LIBOPENMPT_VERSION)
- mkdir -p bin/dist/libopenmpt-doc-$(DIST_LIBOPENMPT_VERSION)/docs
- cp -Rv bin/docs/c/html bin/dist/libopenmpt-doc-$(DIST_LIBOPENMPT_VERSION)/docs/c
- cp -Rv bin/docs/cpp/html bin/dist/libopenmpt-doc-$(DIST_LIBOPENMPT_VERSION)/docs/cpp
+ cp -Rv bin/docs/html bin/dist/libopenmpt-doc-$(DIST_LIBOPENMPT_VERSION)/docs
cd bin/dist/ && tar cv libopenmpt-doc-$(DIST_LIBOPENMPT_VERSION) > libopenmpt-doc-$(DIST_LIBOPENMPT_VERSION).tar
.PHONY: bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar
Copied: trunk/OpenMPT/libopenmpt/Doxyfile (from rev 3432, trunk/OpenMPT/libopenmpt/Doxyfile-cpp)
===================================================================
--- trunk/OpenMPT/libopenmpt/Doxyfile (rev 0)
+++ trunk/OpenMPT/libopenmpt/Doxyfile 2013-12-10 19:33:20 UTC (rev 3433)
@@ -0,0 +1,2285 @@
+# Doxyfile 1.8.5
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME = "libopenmpt"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER =
+
+# 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
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
+# the documentation. The maximum height of the logo should not exceed 55 pixels
+# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
+# to the output directory.
+
+PROJECT_LOGO =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = bin/docs
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-
+# Traditional, Croatian, Czech, Danish, Dutch, English, Esperanto, Farsi,
+# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en,
+# Korean, Korean-en, Latvian, Norwegian, Macedonian, Persian, Polish,
+# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish,
+# Turkish, Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH = .
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
+# new page for each member. If set to NO, the documentation of a member will be
+# part of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE = 2
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C.
+#
+# Note For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by by putting a % sign in front of the word
+# or globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT = YES
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO these classes will be included in the various overviews. This option has
+# no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING = NO
+
+# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
+# todo list. This list is created by putting \todo commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
+# test list. This list is created by putting \test commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES the list
+# will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. Do not use file names with spaces, bibtex cannot handle them. See
+# also \cite for info how to create references.
+
+CITE_BIB_FILES =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET = YES
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO doxygen will only warn about wrong or incomplete parameter
+# documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces.
+# Note: If this tag is empty the current directory is searched.
+
+INPUT = libopenmpt/libopenmpt.hpp \
+ libopenmpt/libopenmpt.h \
+ libopenmpt/libopenmpt_stream_callbacks_fd.h \
+ libopenmpt/libopenmpt_stream_callbacks_file.h \
+ libopenmpt/libopenmpt_config.h \
+ libopenmpt/libopenmpt_version.h
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank the
+# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
+# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
+# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
+# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+# *.qsf, *.as and *.js.
+
+FILE_PATTERNS =
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER ) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT =
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
+# defined cascading style sheet that is included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefor more robust against future updates.
+# Doxygen will copy the style sheet file to the output directory. For an example
+# see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the stylesheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated (
+# YES) or that it should be included in the master .chm file ( NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated (
+# YES) or a normal table of contents ( NO) in the .chm file.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# ...
[truncated message content] |
|
From: <sag...@us...> - 2013-12-10 21:49:07
|
Revision: 3435
http://sourceforge.net/p/modplug/code/3435
Author: saga-games
Date: 2013-12-10 21:48:58 +0000 (Tue, 10 Dec 2013)
Log Message:
-----------
[Fix] VST: Strum Acoustic GS-1 and Strum Electric GS-1 no longer crash on startup (broken since rev.1110 / OpenMPT 1.20)
[Mod] VST: Optimize VST window redrawing a little bit by not filling the window with the default background colour (removes flicker when resizing plugin windows)
[Mod] OpenMPT: Version is now 1.22.07.07
Modified Paths:
--------------
trunk/OpenMPT/common/versionNumber.h
trunk/OpenMPT/mptrack/VSTEditor.cpp
trunk/OpenMPT/mptrack/VSTEditor.h
trunk/OpenMPT/mptrack/Vstplug.cpp
trunk/OpenMPT/mptrack/Vstplug.h
Modified: trunk/OpenMPT/common/versionNumber.h
===================================================================
--- trunk/OpenMPT/common/versionNumber.h 2013-12-10 20:02:26 UTC (rev 3434)
+++ trunk/OpenMPT/common/versionNumber.h 2013-12-10 21:48:58 UTC (rev 3435)
@@ -17,7 +17,7 @@
#define VER_MAJORMAJOR 1
#define VER_MAJOR 22
#define VER_MINOR 07
-#define VER_MINORMINOR 06
+#define VER_MINORMINOR 07
//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/VSTEditor.cpp
===================================================================
--- trunk/OpenMPT/mptrack/VSTEditor.cpp 2013-12-10 20:02:26 UTC (rev 3434)
+++ trunk/OpenMPT/mptrack/VSTEditor.cpp 2013-12-10 21:48:58 UTC (rev 3435)
@@ -16,6 +16,11 @@
#ifndef NO_VST
+BEGIN_MESSAGE_MAP(COwnerVstEditor, CDialog)
+ ON_WM_ERASEBKGND()
+END_MESSAGE_MAP()
+
+
COwnerVstEditor::COwnerVstEditor(CVstPlugin &plugin) : CAbstractVstEditor(plugin)
//-------------------------------------------------------------------------------
{
Modified: trunk/OpenMPT/mptrack/VSTEditor.h
===================================================================
--- trunk/OpenMPT/mptrack/VSTEditor.h 2013-12-10 20:02:26 UTC (rev 3434)
+++ trunk/OpenMPT/mptrack/VSTEditor.h 2013-12-10 21:48:58 UTC (rev 3435)
@@ -27,6 +27,9 @@
virtual void OnOK();
virtual void OnCancel();
+ DECLARE_MESSAGE_MAP()
+ afx_msg BOOL OnEraseBkgnd(CDC *) { return TRUE; }
+
// Plugins may request to change the GUI size.
virtual bool IsResizable() const { return true; };
virtual bool SetSize(int contentWidth, int contentHeight);
Modified: trunk/OpenMPT/mptrack/Vstplug.cpp
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.cpp 2013-12-10 20:02:26 UTC (rev 3434)
+++ trunk/OpenMPT/mptrack/Vstplug.cpp 2013-12-10 21:48:58 UTC (rev 3435)
@@ -23,7 +23,6 @@
#include "MIDIMappingDialog.h"
#include "../common/StringFixer.h"
#include "MemoryMappedFile.h"
-#include "../soundlib/FileReader.h"
#include "FileDialog.h"
#include "../common/mptFstream.h"
@@ -55,7 +54,10 @@
{
// Called when plugin param is changed via gui
case audioMasterAutomate:
- if (pVstPlugin != nullptr && pVstPlugin->CanAutomateParameter(index))
+ // Strum Acoustic GS-1 and Strum Electric GS-1 send audioMasterAutomate during effOpen (WTF #1),
+ // but when sending back effCanBeAutomated, they just crash (WTF #2).
+ // As a consequence, just generally forbid this action while the plugin is not fully initialized yet.
+ if(pVstPlugin != nullptr && pVstPlugin->isInitialized && pVstPlugin->CanAutomateParameter(index))
{
// This parameter can be automated. Ugo Motion constantly sends automation callback events for parameters that cannot be automated...
pVstPlugin->AutomateParameter((PlugParamIndex)index);
@@ -642,7 +644,6 @@
m_pNext = nullptr;
m_pMixStruct = &mixStruct;
m_pEditor = nullptr;
- m_nInputs = m_nOutputs = 0;
m_nEditorX = m_nEditorY = -1;
m_pProcessFP = nullptr;
@@ -656,6 +657,7 @@
m_bSongPlaying = false;
m_bPlugResumed = false;
m_nSampleRate = uint32_max;
+ isInitialized = false;
MemsetZero(m_MidiCh);
for(int ch = 0; ch < 16; ch++)
@@ -677,6 +679,8 @@
m_Factory.pPluginsList->m_pPrev = this;
}
m_Factory.pPluginsList = this;
+
+ isInitialized = true;
}
@@ -692,6 +696,7 @@
//Store a pointer so we can get the CVstPlugin object from the basic VST effect object.
m_Effect.resvd1 = ToVstPtr(this);
m_nSlot = FindSlot();
+ m_nSampleRate = m_SndFile.GetSampleRate();
Dispatch(effOpen, 0, 0, nullptr, 0.0f);
// VST 2.0 plugins return 2 here, VST 2.4 plugins return 2400... Great!
@@ -748,8 +753,7 @@
}
- m_nSampleRate = m_SndFile.GetSampleRate();
- Dispatch(effSetSampleRate, 0, 0, nullptr, static_cast<float>(m_SndFile.GetSampleRate()));
+ Dispatch(effSetSampleRate, 0, 0, nullptr, static_cast<float>(m_nSampleRate));
Dispatch(effSetBlockSize, 0, MIXBUFFERSIZE, nullptr, 0.0f);
if(m_Effect.numPrograms > 0)
{
@@ -773,7 +777,7 @@
m_pProcessFP = (m_Effect.flags & effFlagsCanReplacing) ? m_Effect.processReplacing : m_Effect.process;
// issue samplerate again here, cos some plugs like it before the block size, other like it right at the end.
- Dispatch(effSetSampleRate, 0, 0, nullptr, static_cast<float>(m_SndFile.GetSampleRate()));
+ Dispatch(effSetSampleRate, 0, 0, nullptr, static_cast<float>(m_nSampleRate));
// Korg Wavestation GUI won't work until plugin was resumed at least once.
// On the other hand, some other plugins (notably Synthedit plugins like Superwave P8 2.3 or Rez 3.0) don't like this
@@ -793,11 +797,8 @@
bool CVstPlugin::InitializeIOBuffers()
//------------------------------------
{
- m_nInputs = m_Effect.numInputs;
- m_nOutputs = m_Effect.numOutputs;
-
// Input pointer array size must be >= 2 for now - the input buffer assignment might write to non allocated mem. otherwise
- bool result = mixBuffer.Initialize(MAX(m_nInputs, 2), m_nOutputs);
+ bool result = mixBuffer.Initialize(MAX(m_Effect.numInputs, 2), m_Effect.numOutputs);
m_MixState.pOutBufferL = mixBuffer.GetInputBuffer(0);
m_MixState.pOutBufferR = mixBuffer.GetInputBuffer(1);
@@ -1483,15 +1484,15 @@
ASSERT(outputBuffers != nullptr);
// Mix outputs of multi-output VSTs:
- if(m_nOutputs > 2)
+ if(m_Effect.numOutputs > 2)
{
// first, mix extra outputs on a stereo basis
- uint32 numOutputs = m_nOutputs;
+ VstInt32 numOutputs = m_Effect.numOutputs;
// so if nOuts is not even, let process the last output later
if((numOutputs % 2u) == 1) numOutputs--;
// mix extra stereo outputs
- for(uint32 iOut = 2; iOut < numOutputs; iOut++)
+ for(VstInt32 iOut = 2; iOut < numOutputs; iOut++)
{
for(size_t i = 0; i < nSamples; i++)
{
@@ -1499,10 +1500,10 @@
}
}
- // if m_nOutputs is odd, mix half the signal of last output to each channel
- if(numOutputs != m_nOutputs)
+ // if m_Effect.numOutputs is odd, mix half the signal of last output to each channel
+ if(numOutputs != m_Effect.numOutputs)
{
- // trick : if we are here, nOuts = m_nOutputs - 1 !!!
+ // trick : if we are here, nOuts = m_Effect.numOutputs - 1 !!!
for(size_t i = 0; i < nSamples; i++)
{
float v = 0.5f * outputBuffers[numOutputs][i];
Modified: trunk/OpenMPT/mptrack/Vstplug.h
===================================================================
--- trunk/OpenMPT/mptrack/Vstplug.h 2013-12-10 20:02:26 UTC (rev 3434)
+++ trunk/OpenMPT/mptrack/Vstplug.h 2013-12-10 21:48:58 UTC (rev 3435)
@@ -137,7 +137,6 @@
size_t m_nRefCount;
uint32 m_nSampleRate;
SNDMIXPLUGINSTATE m_MixState;
- uint32 m_nInputs, m_nOutputs;
int32 m_nEditorX, m_nEditorY;
float m_fGain;
@@ -146,6 +145,7 @@
bool m_bPlugResumed;
bool m_bIsVst2;
bool m_bIsInstrument;
+ bool isInitialized;
VSTInstrChannel m_MidiCh[16]; // MIDI channel state
PluginMixBuffer<float, MIXBUFFERSIZE> mixBuffer; // Float buffers (input and output) for plugins
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|