mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-28 00:20:47 +01:00
Fix CRLF<>LF for some files
This commit is contained in:
parent
8edd02752e
commit
cc4f70806f
@ -1,204 +1,204 @@
|
|||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="9.00"
|
Version="9.00"
|
||||||
Name="test"
|
Name="test"
|
||||||
ProjectGUID="{AF7D88A0-3CB1-4CD8-BAD1-0305EB996D69}"
|
ProjectGUID="{AF7D88A0-3CB1-4CD8-BAD1-0305EB996D69}"
|
||||||
RootNamespace="test"
|
RootNamespace="test"
|
||||||
Keyword="Win32Proj"
|
Keyword="Win32Proj"
|
||||||
TargetFrameworkVersion="196613"
|
TargetFrameworkVersion="196613"
|
||||||
>
|
>
|
||||||
<Platforms>
|
<Platforms>
|
||||||
<Platform
|
<Platform
|
||||||
Name="Win32"
|
Name="Win32"
|
||||||
/>
|
/>
|
||||||
</Platforms>
|
</Platforms>
|
||||||
<ToolFiles>
|
<ToolFiles>
|
||||||
</ToolFiles>
|
</ToolFiles>
|
||||||
<Configurations>
|
<Configurations>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Debug|Win32"
|
Name="Debug|Win32"
|
||||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
IntermediateDirectory="$(ConfigurationName)"
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="1"
|
CharacterSet="1"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
CommandLine="$(SolutionDir)version.bat"
|
CommandLine="$(SolutionDir)version.bat"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXMLDataGeneratorTool"
|
Name="VCXMLDataGeneratorTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"
|
Name="VCMIDLTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="..\ext_libs\Getopt;..\ext_includes"
|
AdditionalIncludeDirectories="..\ext_libs\Getopt;..\ext_includes"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
RuntimeLibrary="3"
|
RuntimeLibrary="3"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
DebugInformationFormat="4"
|
DebugInformationFormat="4"
|
||||||
ForcedIncludeFiles="$(SolutionDir)VERSION.H"
|
ForcedIncludeFiles="$(SolutionDir)VERSION.H"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"
|
Name="VCResourceCompilerTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"
|
Name="VCPreLinkEventTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="libg719_decode.lib libg7221_decode.lib libmpg123-0.lib libvorbis.lib"
|
AdditionalDependencies="libg719_decode.lib libg7221_decode.lib libmpg123-0.lib libvorbis.lib"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
AdditionalLibraryDirectories="..\ext_libs"
|
AdditionalLibraryDirectories="..\ext_libs"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
TargetMachine="1"
|
TargetMachine="1"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManifestTool"
|
Name="VCManifestTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXDCMakeTool"
|
Name="VCXDCMakeTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCBscMakeTool"
|
Name="VCBscMakeTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCFxCopTool"
|
Name="VCFxCopTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCAppVerifierTool"
|
Name="VCAppVerifierTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
<Configuration
|
<Configuration
|
||||||
Name="Release|Win32"
|
Name="Release|Win32"
|
||||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||||
IntermediateDirectory="$(ConfigurationName)"
|
IntermediateDirectory="$(ConfigurationName)"
|
||||||
ConfigurationType="1"
|
ConfigurationType="1"
|
||||||
CharacterSet="1"
|
CharacterSet="1"
|
||||||
WholeProgramOptimization="1"
|
WholeProgramOptimization="1"
|
||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
CommandLine="$(SolutionDir)version.bat"
|
CommandLine="$(SolutionDir)version.bat"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXMLDataGeneratorTool"
|
Name="VCXMLDataGeneratorTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCWebServiceProxyGeneratorTool"
|
Name="VCWebServiceProxyGeneratorTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCMIDLTool"
|
Name="VCMIDLTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="2"
|
Optimization="2"
|
||||||
EnableIntrinsicFunctions="true"
|
EnableIntrinsicFunctions="true"
|
||||||
AdditionalIncludeDirectories="..\ext_libs\Getopt;..\ext_includes"
|
AdditionalIncludeDirectories="..\ext_libs\Getopt;..\ext_includes"
|
||||||
PreprocessorDefinitions="WIN32;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_G7221;NDEBUG;_CONSOLE"
|
PreprocessorDefinitions="WIN32;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_G7221;NDEBUG;_CONSOLE"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
EnableFunctionLevelLinking="true"
|
EnableFunctionLevelLinking="true"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
Detect64BitPortabilityProblems="true"
|
Detect64BitPortabilityProblems="true"
|
||||||
DebugInformationFormat="3"
|
DebugInformationFormat="3"
|
||||||
ForcedIncludeFiles="$(SolutionDir)VERSION.H"
|
ForcedIncludeFiles="$(SolutionDir)VERSION.H"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCResourceCompilerTool"
|
Name="VCResourceCompilerTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreLinkEventTool"
|
Name="VCPreLinkEventTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="libg719_decode.lib libg7221_decode.lib libmpg123-0.lib libvorbis.lib"
|
AdditionalDependencies="libg719_decode.lib libg7221_decode.lib libmpg123-0.lib libvorbis.lib"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
AdditionalLibraryDirectories="..\ext_libs"
|
AdditionalLibraryDirectories="..\ext_libs"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
EnableCOMDATFolding="2"
|
EnableCOMDATFolding="2"
|
||||||
TargetMachine="1"
|
TargetMachine="1"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCALinkTool"
|
Name="VCALinkTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManifestTool"
|
Name="VCManifestTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCXDCMakeTool"
|
Name="VCXDCMakeTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCBscMakeTool"
|
Name="VCBscMakeTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCFxCopTool"
|
Name="VCFxCopTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCAppVerifierTool"
|
Name="VCAppVerifierTool"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPostBuildEventTool"
|
Name="VCPostBuildEventTool"
|
||||||
/>
|
/>
|
||||||
</Configuration>
|
</Configuration>
|
||||||
</Configurations>
|
</Configurations>
|
||||||
<References>
|
<References>
|
||||||
</References>
|
</References>
|
||||||
<Files>
|
<Files>
|
||||||
<Filter
|
<Filter
|
||||||
Name="Source Files"
|
Name="Source Files"
|
||||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||||
>
|
>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\vgmstream_cli.c"
|
RelativePath=".\vgmstream_cli.c"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
Name="Header Files"
|
Name="Header Files"
|
||||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||||
>
|
>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter
|
<Filter
|
||||||
Name="Resource Files"
|
Name="Resource Files"
|
||||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
>
|
>
|
||||||
</Filter>
|
</Filter>
|
||||||
</Files>
|
</Files>
|
||||||
<Globals>
|
<Globals>
|
||||||
</Globals>
|
</Globals>
|
||||||
</VisualStudioProject>
|
</VisualStudioProject>
|
||||||
|
@ -1,148 +1,148 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
<Configuration>Release</Configuration>
|
<Configuration>Release</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Template|Win32">
|
<ProjectConfiguration Include="Template|Win32">
|
||||||
<Configuration>Template</Configuration>
|
<Configuration>Template</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<ProjectGuid>{AF7D88A0-3CB1-4CD8-BAD1-0305EB996D69}</ProjectGuid>
|
<ProjectGuid>{AF7D88A0-3CB1-4CD8-BAD1-0305EB996D69}</ProjectGuid>
|
||||||
<RootNamespace>test</RootNamespace>
|
<RootNamespace>test</RootNamespace>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<SccProjectName>
|
<SccProjectName>
|
||||||
</SccProjectName>
|
</SccProjectName>
|
||||||
<SccAuxPath>
|
<SccAuxPath>
|
||||||
</SccAuxPath>
|
</SccAuxPath>
|
||||||
<SccLocalPath>
|
<SccLocalPath>
|
||||||
</SccLocalPath>
|
</SccLocalPath>
|
||||||
<SccProvider>
|
<SccProvider>
|
||||||
</SccProvider>
|
</SccProvider>
|
||||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||||
<TargetName>test</TargetName>
|
<TargetName>test</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<PlatformToolset>v141_xp</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>Application</ConfigurationType>
|
<ConfigurationType>Application</ConfigurationType>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<PlatformToolset>v141_xp</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">
|
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">
|
||||||
<PlatformToolset>v141_xp</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|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" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
<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" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros">
|
<PropertyGroup Label="UserMacros">
|
||||||
<DependenciesDir>../dependencies</DependenciesDir>
|
<DependenciesDir>../dependencies</DependenciesDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" />
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" />
|
||||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" />
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>..;../ext_libs/Getopt;../ext_includes;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;../ext_libs/Getopt;../ext_includes;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;VGM_USE_ATRAC9;VGM_USE_CELT;_DEBUG;_WINDOWS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;VGM_USE_ATRAC9;VGM_USE_CELT;_DEBUG;_WINDOWS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg7221_decode.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg7221_decode.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Command>"$(ProjectDir)..\version.bat" "$(ProjectDir)..\version.h" VERSION</Command>
|
<Command>"$(ProjectDir)..\version.bat" "$(ProjectDir)..\version.h" VERSION</Command>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Message>Generating version.h</Message>
|
<Message>Generating version.h</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>..;../ext_libs/Getopt;../ext_includes;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;../ext_libs/Getopt;../ext_includes;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;VGM_USE_ATRAC9;VGM_USE_CELT;NDEBUG;_WINDOWS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;VGM_USE_ATRAC9;VGM_USE_CELT;NDEBUG;_WINDOWS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<FloatingPointModel>Fast</FloatingPointModel>
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg7221_decode.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg7221_decode.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Console</SubSystem>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Command>"$(ProjectDir)..\version.bat" "$(ProjectDir)..\version.h" VERSION</Command>
|
<Command>"$(ProjectDir)..\version.bat" "$(ProjectDir)..\version.h" VERSION</Command>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Message>Generating version.h</Message>
|
<Message>Generating version.h</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="vgmstream_cli.c" />
|
<ClCompile Include="vgmstream_cli.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="$(DependenciesDir)/fdk-aac/msvc/fdk-aac.vcxproj">
|
<ProjectReference Include="$(DependenciesDir)/fdk-aac/msvc/fdk-aac.vcxproj">
|
||||||
<Project>{308e2ad5-be31-4770-9441-a8d50f56895c}</Project>
|
<Project>{308e2ad5-be31-4770-9441-a8d50f56895c}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="$(DependenciesDir)/qaac/vcproject/mp4v2/mp4v2.vcxproj">
|
<ProjectReference Include="$(DependenciesDir)/qaac/vcproject/mp4v2/mp4v2.vcxproj">
|
||||||
<Project>{86a064e2-c81b-4eee-8be0-a39a2e7c7c76}</Project>
|
<Project>{86a064e2-c81b-4eee-8be0-a39a2e7c7c76}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\ext_libs\ext_libs.vcxproj">
|
<ProjectReference Include="..\ext_libs\ext_libs.vcxproj">
|
||||||
<Project>{10e6bfc6-1e5b-46e4-ba42-f04dfbd0abff}</Project>
|
<Project>{10e6bfc6-1e5b-46e4-ba42-f04dfbd0abff}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\ext_libs\Getopt\getopt.vcxproj">
|
<ProjectReference Include="..\ext_libs\Getopt\getopt.vcxproj">
|
||||||
<Project>{330b53ae-4fae-46da-8785-9016db4e3e23}</Project>
|
<Project>{330b53ae-4fae-46da-8785-9016db4e3e23}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\src\libvgmstream.vcxproj">
|
<ProjectReference Include="..\src\libvgmstream.vcxproj">
|
||||||
<Project>{54a6ad11-5369-4895-a06f-e255abb99b11}</Project>
|
<Project>{54a6ad11-5369-4895-a06f-e255abb99b11}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
@ -1,22 +1,22 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Source Files">
|
<Filter Include="Source Files">
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Header Files">
|
<Filter Include="Header Files">
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Resource Files">
|
<Filter Include="Resource Files">
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="vgmstream_cli.c">
|
<ClCompile Include="vgmstream_cli.c">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
@ -1,47 +1,47 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Header Files">
|
<Filter Include="Header Files">
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Resource Files">
|
<Filter Include="Resource Files">
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Source Files">
|
<Filter Include="Source Files">
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="foo_vgmstream.h">
|
<ClInclude Include="foo_vgmstream.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="foo_prefs.h">
|
<ClInclude Include="foo_prefs.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="foo_filetypes.h">
|
<ClInclude Include="foo_filetypes.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="resource.h">
|
<ClInclude Include="resource.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="foo_input_vgmstream.rc">
|
<ResourceCompile Include="foo_input_vgmstream.rc">
|
||||||
<Filter>Resource Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="foo_prefs.cpp">
|
<ClCompile Include="foo_prefs.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="foo_streamfile.cpp">
|
<ClCompile Include="foo_streamfile.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="foo_vgmstream.cpp">
|
<ClCompile Include="foo_vgmstream.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -1,278 +1,278 @@
|
|||||||
#include "coding.h"
|
#include "coding.h"
|
||||||
|
|
||||||
#ifdef VGM_USE_ATRAC9
|
#ifdef VGM_USE_ATRAC9
|
||||||
#include "libatrac9.h"
|
#include "libatrac9.h"
|
||||||
|
|
||||||
|
|
||||||
/* opaque struct */
|
/* opaque struct */
|
||||||
struct atrac9_codec_data {
|
struct atrac9_codec_data {
|
||||||
uint8_t *data_buffer;
|
uint8_t *data_buffer;
|
||||||
size_t data_buffer_size;
|
size_t data_buffer_size;
|
||||||
|
|
||||||
sample_t *sample_buffer;
|
sample_t *sample_buffer;
|
||||||
size_t samples_filled; /* number of samples in the buffer */
|
size_t samples_filled; /* number of samples in the buffer */
|
||||||
size_t samples_used; /* number of samples extracted from the buffer */
|
size_t samples_used; /* number of samples extracted from the buffer */
|
||||||
|
|
||||||
int samples_to_discard;
|
int samples_to_discard;
|
||||||
|
|
||||||
atrac9_config config;
|
atrac9_config config;
|
||||||
|
|
||||||
void *handle; /* decoder handle */
|
void *handle; /* decoder handle */
|
||||||
Atrac9CodecInfo info; /* decoder info */
|
Atrac9CodecInfo info; /* decoder info */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
atrac9_codec_data *init_atrac9(atrac9_config *cfg) {
|
atrac9_codec_data *init_atrac9(atrac9_config *cfg) {
|
||||||
int status;
|
int status;
|
||||||
uint8_t config_data[4];
|
uint8_t config_data[4];
|
||||||
atrac9_codec_data *data = NULL;
|
atrac9_codec_data *data = NULL;
|
||||||
|
|
||||||
data = calloc(1, sizeof(atrac9_codec_data));
|
data = calloc(1, sizeof(atrac9_codec_data));
|
||||||
if (!data) goto fail;
|
if (!data) goto fail;
|
||||||
|
|
||||||
data->handle = Atrac9GetHandle();
|
data->handle = Atrac9GetHandle();
|
||||||
if (!data->handle) goto fail;
|
if (!data->handle) goto fail;
|
||||||
|
|
||||||
put_32bitBE(config_data, cfg->config_data);
|
put_32bitBE(config_data, cfg->config_data);
|
||||||
status = Atrac9InitDecoder(data->handle, config_data);
|
status = Atrac9InitDecoder(data->handle, config_data);
|
||||||
if (status < 0) goto fail;
|
if (status < 0) goto fail;
|
||||||
|
|
||||||
status = Atrac9GetCodecInfo(data->handle, &data->info);
|
status = Atrac9GetCodecInfo(data->handle, &data->info);
|
||||||
if (status < 0) goto fail;
|
if (status < 0) goto fail;
|
||||||
//;VGM_LOG("ATRAC9: config=%x, sf-size=%x, sub-frames=%i x %i samples\n", cfg->config_data, data->info.superframeSize, data->info.framesInSuperframe, data->info.frameSamples);
|
//;VGM_LOG("ATRAC9: config=%x, sf-size=%x, sub-frames=%i x %i samples\n", cfg->config_data, data->info.superframeSize, data->info.framesInSuperframe, data->info.frameSamples);
|
||||||
|
|
||||||
if (cfg->channels && cfg->channels != data->info.channels) {
|
if (cfg->channels && cfg->channels != data->info.channels) {
|
||||||
VGM_LOG("ATRAC9: channels in header %i vs config %i don't match\n", cfg->channels, data->info.channels);
|
VGM_LOG("ATRAC9: channels in header %i vs config %i don't match\n", cfg->channels, data->info.channels);
|
||||||
goto fail; /* unknown multichannel layout */
|
goto fail; /* unknown multichannel layout */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* must hold at least one superframe and its samples */
|
/* must hold at least one superframe and its samples */
|
||||||
data->data_buffer_size = data->info.superframeSize;
|
data->data_buffer_size = data->info.superframeSize;
|
||||||
/* extra leeway as Atrac9Decode seems to overread ~2 bytes (doesn't affect decoding though) */
|
/* extra leeway as Atrac9Decode seems to overread ~2 bytes (doesn't affect decoding though) */
|
||||||
data->data_buffer = calloc(sizeof(uint8_t), data->data_buffer_size + 0x10);
|
data->data_buffer = calloc(sizeof(uint8_t), data->data_buffer_size + 0x10);
|
||||||
/* while ATRAC9 uses float internally, Sony's API only return PCM16 */
|
/* while ATRAC9 uses float internally, Sony's API only return PCM16 */
|
||||||
data->sample_buffer = calloc(sizeof(sample_t), data->info.channels * data->info.frameSamples * data->info.framesInSuperframe);
|
data->sample_buffer = calloc(sizeof(sample_t), data->info.channels * data->info.frameSamples * data->info.framesInSuperframe);
|
||||||
|
|
||||||
data->samples_to_discard = cfg->encoder_delay;
|
data->samples_to_discard = cfg->encoder_delay;
|
||||||
|
|
||||||
memcpy(&data->config, cfg, sizeof(atrac9_config));
|
memcpy(&data->config, cfg, sizeof(atrac9_config));
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
free_atrac9(data);
|
free_atrac9(data);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void decode_atrac9(VGMSTREAM *vgmstream, sample_t * outbuf, int32_t samples_to_do, int channels) {
|
void decode_atrac9(VGMSTREAM *vgmstream, sample_t * outbuf, int32_t samples_to_do, int channels) {
|
||||||
VGMSTREAMCHANNEL *stream = &vgmstream->ch[0];
|
VGMSTREAMCHANNEL *stream = &vgmstream->ch[0];
|
||||||
atrac9_codec_data * data = vgmstream->codec_data;
|
atrac9_codec_data * data = vgmstream->codec_data;
|
||||||
int samples_done = 0;
|
int samples_done = 0;
|
||||||
|
|
||||||
|
|
||||||
while (samples_done < samples_to_do) {
|
while (samples_done < samples_to_do) {
|
||||||
|
|
||||||
if (data->samples_filled) { /* consume samples */
|
if (data->samples_filled) { /* consume samples */
|
||||||
int samples_to_get = data->samples_filled;
|
int samples_to_get = data->samples_filled;
|
||||||
|
|
||||||
if (data->samples_to_discard) {
|
if (data->samples_to_discard) {
|
||||||
/* discard samples for looping */
|
/* discard samples for looping */
|
||||||
if (samples_to_get > data->samples_to_discard)
|
if (samples_to_get > data->samples_to_discard)
|
||||||
samples_to_get = data->samples_to_discard;
|
samples_to_get = data->samples_to_discard;
|
||||||
data->samples_to_discard -= samples_to_get;
|
data->samples_to_discard -= samples_to_get;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* get max samples and copy */
|
/* get max samples and copy */
|
||||||
if (samples_to_get > samples_to_do - samples_done)
|
if (samples_to_get > samples_to_do - samples_done)
|
||||||
samples_to_get = samples_to_do - samples_done;
|
samples_to_get = samples_to_do - samples_done;
|
||||||
|
|
||||||
memcpy(outbuf + samples_done*channels,
|
memcpy(outbuf + samples_done*channels,
|
||||||
data->sample_buffer + data->samples_used*channels,
|
data->sample_buffer + data->samples_used*channels,
|
||||||
samples_to_get*channels * sizeof(sample));
|
samples_to_get*channels * sizeof(sample));
|
||||||
|
|
||||||
samples_done += samples_to_get;
|
samples_done += samples_to_get;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* mark consumed samples */
|
/* mark consumed samples */
|
||||||
data->samples_used += samples_to_get;
|
data->samples_used += samples_to_get;
|
||||||
data->samples_filled -= samples_to_get;
|
data->samples_filled -= samples_to_get;
|
||||||
}
|
}
|
||||||
else { /* decode data */
|
else { /* decode data */
|
||||||
int iframe, status;
|
int iframe, status;
|
||||||
int bytes_used = 0;
|
int bytes_used = 0;
|
||||||
uint8_t *buffer = data->data_buffer;
|
uint8_t *buffer = data->data_buffer;
|
||||||
size_t bytes;
|
size_t bytes;
|
||||||
|
|
||||||
data->samples_used = 0;
|
data->samples_used = 0;
|
||||||
|
|
||||||
/* ATRAC9 is made of decodable superframes with several sub-frames. AT9 config data gives
|
/* ATRAC9 is made of decodable superframes with several sub-frames. AT9 config data gives
|
||||||
* superframe size, number of frames and samples (~100-200 bytes and ~256/1024 samples). */
|
* superframe size, number of frames and samples (~100-200 bytes and ~256/1024 samples). */
|
||||||
|
|
||||||
/* read one raw block (superframe) and advance offsets */
|
/* read one raw block (superframe) and advance offsets */
|
||||||
bytes = read_streamfile(data->data_buffer,stream->offset, data->info.superframeSize,stream->streamfile);
|
bytes = read_streamfile(data->data_buffer,stream->offset, data->info.superframeSize,stream->streamfile);
|
||||||
if (bytes != data->data_buffer_size) goto decode_fail;
|
if (bytes != data->data_buffer_size) goto decode_fail;
|
||||||
|
|
||||||
stream->offset += bytes;
|
stream->offset += bytes;
|
||||||
|
|
||||||
/* decode all frames in the superframe block */
|
/* decode all frames in the superframe block */
|
||||||
for (iframe = 0; iframe < data->info.framesInSuperframe; iframe++) {
|
for (iframe = 0; iframe < data->info.framesInSuperframe; iframe++) {
|
||||||
status = Atrac9Decode(data->handle, buffer, data->sample_buffer + data->samples_filled*channels, &bytes_used);
|
status = Atrac9Decode(data->handle, buffer, data->sample_buffer + data->samples_filled*channels, &bytes_used);
|
||||||
if (status < 0) goto decode_fail;
|
if (status < 0) goto decode_fail;
|
||||||
|
|
||||||
buffer += bytes_used;
|
buffer += bytes_used;
|
||||||
data->samples_filled += data->info.frameSamples;
|
data->samples_filled += data->info.frameSamples;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
decode_fail:
|
decode_fail:
|
||||||
/* on error just put some 0 samples */
|
/* on error just put some 0 samples */
|
||||||
VGM_LOG("ATRAC9: decode fail at %x, missing %i samples\n", (uint32_t)stream->offset, (samples_to_do - samples_done));
|
VGM_LOG("ATRAC9: decode fail at %x, missing %i samples\n", (uint32_t)stream->offset, (samples_to_do - samples_done));
|
||||||
memset(outbuf + samples_done * channels, 0, (samples_to_do - samples_done) * sizeof(sample) * channels);
|
memset(outbuf + samples_done * channels, 0, (samples_to_do - samples_done) * sizeof(sample) * channels);
|
||||||
}
|
}
|
||||||
|
|
||||||
void reset_atrac9(VGMSTREAM *vgmstream) {
|
void reset_atrac9(VGMSTREAM *vgmstream) {
|
||||||
atrac9_codec_data *data = vgmstream->codec_data;
|
atrac9_codec_data *data = vgmstream->codec_data;
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
|
|
||||||
if (!data->handle)
|
if (!data->handle)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* reopen/flush, not needed as superframes decode separatedly and there is no carried state */
|
/* reopen/flush, not needed as superframes decode separatedly and there is no carried state */
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
uint8_t config_data[4];
|
uint8_t config_data[4];
|
||||||
|
|
||||||
Atrac9ReleaseHandle(data->handle);
|
Atrac9ReleaseHandle(data->handle);
|
||||||
data->handle = Atrac9GetHandle();
|
data->handle = Atrac9GetHandle();
|
||||||
if (!data->handle) goto fail;
|
if (!data->handle) goto fail;
|
||||||
|
|
||||||
put_32bitBE(config_data, data->config.config_data);
|
put_32bitBE(config_data, data->config.config_data);
|
||||||
status = Atrac9InitDecoder(data->handle, config_data);
|
status = Atrac9InitDecoder(data->handle, config_data);
|
||||||
if (status < 0) goto fail;
|
if (status < 0) goto fail;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
data->samples_used = 0;
|
data->samples_used = 0;
|
||||||
data->samples_filled = 0;
|
data->samples_filled = 0;
|
||||||
data->samples_to_discard = data->config.encoder_delay;
|
data->samples_to_discard = data->config.encoder_delay;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
return; /* decode calls should fail... */
|
return; /* decode calls should fail... */
|
||||||
}
|
}
|
||||||
|
|
||||||
void seek_atrac9(VGMSTREAM *vgmstream, int32_t num_sample) {
|
void seek_atrac9(VGMSTREAM *vgmstream, int32_t num_sample) {
|
||||||
atrac9_codec_data *data = vgmstream->codec_data;
|
atrac9_codec_data *data = vgmstream->codec_data;
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
|
|
||||||
reset_atrac9(vgmstream);
|
reset_atrac9(vgmstream);
|
||||||
|
|
||||||
/* find closest offset to desired sample, and samples to discard after that offset to reach loop */
|
/* find closest offset to desired sample, and samples to discard after that offset to reach loop */
|
||||||
{
|
{
|
||||||
int32_t seek_sample = data->config.encoder_delay + num_sample;
|
int32_t seek_sample = data->config.encoder_delay + num_sample;
|
||||||
off_t seek_offset;
|
off_t seek_offset;
|
||||||
int32_t seek_discard;
|
int32_t seek_discard;
|
||||||
int32_t superframe_samples = data->info.frameSamples * data->info.framesInSuperframe;
|
int32_t superframe_samples = data->info.frameSamples * data->info.framesInSuperframe;
|
||||||
size_t superframe_number, superframe_back;
|
size_t superframe_number, superframe_back;
|
||||||
|
|
||||||
superframe_number = (seek_sample / superframe_samples); /* closest */
|
superframe_number = (seek_sample / superframe_samples); /* closest */
|
||||||
|
|
||||||
/* decoded frames affect each other slightly, so move offset back to make PCM stable
|
/* decoded frames affect each other slightly, so move offset back to make PCM stable
|
||||||
* and equivalent to a full discard loop */
|
* and equivalent to a full discard loop */
|
||||||
superframe_back = 1; /* 1 seems enough (even when only 1 subframe in superframe) */
|
superframe_back = 1; /* 1 seems enough (even when only 1 subframe in superframe) */
|
||||||
if (superframe_back > superframe_number)
|
if (superframe_back > superframe_number)
|
||||||
superframe_back = superframe_number;
|
superframe_back = superframe_number;
|
||||||
|
|
||||||
seek_discard = (seek_sample % superframe_samples) + (superframe_back * superframe_samples);
|
seek_discard = (seek_sample % superframe_samples) + (superframe_back * superframe_samples);
|
||||||
seek_offset = (superframe_number - superframe_back) * data->info.superframeSize;
|
seek_offset = (superframe_number - superframe_back) * data->info.superframeSize;
|
||||||
|
|
||||||
data->samples_to_discard = seek_discard; /* already includes encoder delay */
|
data->samples_to_discard = seek_discard; /* already includes encoder delay */
|
||||||
|
|
||||||
if (vgmstream->loop_ch)
|
if (vgmstream->loop_ch)
|
||||||
vgmstream->loop_ch[0].offset = vgmstream->loop_ch[0].channel_start_offset + seek_offset;
|
vgmstream->loop_ch[0].offset = vgmstream->loop_ch[0].channel_start_offset + seek_offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
//old full discard loop
|
//old full discard loop
|
||||||
{
|
{
|
||||||
data->samples_to_discard = num_sample;
|
data->samples_to_discard = num_sample;
|
||||||
data->samples_to_discard += data->config.encoder_delay;
|
data->samples_to_discard += data->config.encoder_delay;
|
||||||
|
|
||||||
/* loop offsets are set during decode; force them to stream start so discard works */
|
/* loop offsets are set during decode; force them to stream start so discard works */
|
||||||
if (vgmstream->loop_ch)
|
if (vgmstream->loop_ch)
|
||||||
vgmstream->loop_ch[0].offset = vgmstream->loop_ch[0].channel_start_offset;
|
vgmstream->loop_ch[0].offset = vgmstream->loop_ch[0].channel_start_offset;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void free_atrac9(atrac9_codec_data *data) {
|
void free_atrac9(atrac9_codec_data *data) {
|
||||||
if (!data) return;
|
if (!data) return;
|
||||||
|
|
||||||
if (data->handle) Atrac9ReleaseHandle(data->handle);
|
if (data->handle) Atrac9ReleaseHandle(data->handle);
|
||||||
free(data->data_buffer);
|
free(data->data_buffer);
|
||||||
free(data->sample_buffer);
|
free(data->sample_buffer);
|
||||||
free(data);
|
free(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int atrac9_parse_config(uint32_t atrac9_config, int *out_sample_rate, int *out_channels, size_t *out_frame_size, size_t *out_samples_per_frame) {
|
static int atrac9_parse_config(uint32_t atrac9_config, int *out_sample_rate, int *out_channels, size_t *out_frame_size, size_t *out_samples_per_frame) {
|
||||||
static const int sample_rate_table[16] = {
|
static const int sample_rate_table[16] = {
|
||||||
11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000,
|
11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000,
|
||||||
44100, 48000, 64000, 88200, 96000,128000,176400,192000
|
44100, 48000, 64000, 88200, 96000,128000,176400,192000
|
||||||
};
|
};
|
||||||
static const int samples_power_table[16] = {
|
static const int samples_power_table[16] = {
|
||||||
6, 6, 7, 7, 7, 8, 8, 8,
|
6, 6, 7, 7, 7, 8, 8, 8,
|
||||||
6, 6, 7, 7, 7, 8, 8, 8
|
6, 6, 7, 7, 7, 8, 8, 8
|
||||||
};
|
};
|
||||||
static const int channel_table[8] = {
|
static const int channel_table[8] = {
|
||||||
1, 2, 2, 6, 8, 4, 0, 0
|
1, 2, 2, 6, 8, 4, 0, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
int superframe_size, frames_per_superframe, samples_per_frame, samples_per_superframe;
|
int superframe_size, frames_per_superframe, samples_per_frame, samples_per_superframe;
|
||||||
uint32_t sync = (atrac9_config >> 24) & 0xff; /* 8b */
|
uint32_t sync = (atrac9_config >> 24) & 0xff; /* 8b */
|
||||||
uint8_t sample_rate_index = (atrac9_config >> 20) & 0x0f; /* 4b */
|
uint8_t sample_rate_index = (atrac9_config >> 20) & 0x0f; /* 4b */
|
||||||
uint8_t channels_index = (atrac9_config >> 17) & 0x07; /* 3b */
|
uint8_t channels_index = (atrac9_config >> 17) & 0x07; /* 3b */
|
||||||
/* uint8_t validation bit = (atrac9_config >> 16) & 0x01; */ /* 1b */
|
/* uint8_t validation bit = (atrac9_config >> 16) & 0x01; */ /* 1b */
|
||||||
size_t frame_size = (atrac9_config >> 5) & 0x7FF; /* 11b */
|
size_t frame_size = (atrac9_config >> 5) & 0x7FF; /* 11b */
|
||||||
size_t superframe_index = (atrac9_config >> 3) & 0x3; /* 2b */
|
size_t superframe_index = (atrac9_config >> 3) & 0x3; /* 2b */
|
||||||
/* uint8_t unused = (atrac9_config >> 0) & 0x7);*/ /* 3b */
|
/* uint8_t unused = (atrac9_config >> 0) & 0x7);*/ /* 3b */
|
||||||
|
|
||||||
superframe_size = ((frame_size+1) << superframe_index);
|
superframe_size = ((frame_size+1) << superframe_index);
|
||||||
frames_per_superframe = (1 << superframe_index);
|
frames_per_superframe = (1 << superframe_index);
|
||||||
samples_per_frame = 1 << samples_power_table[sample_rate_index];
|
samples_per_frame = 1 << samples_power_table[sample_rate_index];
|
||||||
samples_per_superframe = samples_per_frame * frames_per_superframe;
|
samples_per_superframe = samples_per_frame * frames_per_superframe;
|
||||||
|
|
||||||
if (sync != 0xFE)
|
if (sync != 0xFE)
|
||||||
goto fail;
|
goto fail;
|
||||||
if (out_sample_rate)
|
if (out_sample_rate)
|
||||||
*out_sample_rate = sample_rate_table[sample_rate_index];
|
*out_sample_rate = sample_rate_table[sample_rate_index];
|
||||||
if (out_channels)
|
if (out_channels)
|
||||||
*out_channels = channel_table[channels_index];
|
*out_channels = channel_table[channels_index];
|
||||||
if (out_frame_size)
|
if (out_frame_size)
|
||||||
*out_frame_size = superframe_size;
|
*out_frame_size = superframe_size;
|
||||||
if (out_samples_per_frame)
|
if (out_samples_per_frame)
|
||||||
*out_samples_per_frame = samples_per_superframe;
|
*out_samples_per_frame = samples_per_superframe;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
fail:
|
fail:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t atrac9_bytes_to_samples(size_t bytes, atrac9_codec_data *data) {
|
size_t atrac9_bytes_to_samples(size_t bytes, atrac9_codec_data *data) {
|
||||||
return bytes / data->info.superframeSize * (data->info.frameSamples * data->info.framesInSuperframe);
|
return bytes / data->info.superframeSize * (data->info.frameSamples * data->info.framesInSuperframe);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t atrac9_bytes_to_samples_cfg(size_t bytes, uint32_t atrac9_config) {
|
size_t atrac9_bytes_to_samples_cfg(size_t bytes, uint32_t atrac9_config) {
|
||||||
size_t frame_size, samples_per_frame;
|
size_t frame_size, samples_per_frame;
|
||||||
if (!atrac9_parse_config(atrac9_config, NULL, NULL, &frame_size, &samples_per_frame))
|
if (!atrac9_parse_config(atrac9_config, NULL, NULL, &frame_size, &samples_per_frame))
|
||||||
return 0;
|
return 0;
|
||||||
return bytes / frame_size * samples_per_frame;
|
return bytes / frame_size * samples_per_frame;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,114 +1,114 @@
|
|||||||
#include "mpeg_decoder.h"
|
#include "mpeg_decoder.h"
|
||||||
|
|
||||||
#ifdef VGM_USE_MPEG
|
#ifdef VGM_USE_MPEG
|
||||||
#define MPEG_AHX_EXPECTED_FRAME_SIZE 0x414
|
#define MPEG_AHX_EXPECTED_FRAME_SIZE 0x414
|
||||||
|
|
||||||
static int ahx_decrypt_type08(uint8_t * buffer, mpeg_custom_config *config);
|
static int ahx_decrypt_type08(uint8_t * buffer, mpeg_custom_config *config);
|
||||||
|
|
||||||
/* writes data to the buffer and moves offsets, transforming AHX frames as needed */
|
/* writes data to the buffer and moves offsets, transforming AHX frames as needed */
|
||||||
int mpeg_custom_parse_frame_ahx(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, int num_stream) {
|
int mpeg_custom_parse_frame_ahx(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, int num_stream) {
|
||||||
mpeg_custom_stream *ms = data->streams[num_stream];
|
mpeg_custom_stream *ms = data->streams[num_stream];
|
||||||
size_t current_data_size = 0;
|
size_t current_data_size = 0;
|
||||||
size_t file_size = get_streamfile_size(stream->streamfile);
|
size_t file_size = get_streamfile_size(stream->streamfile);
|
||||||
|
|
||||||
/* AHX has a 0xFFF5E0C0 header with frame size 0x414 (160kbps, 22050Hz) but they actually are much shorter */
|
/* AHX has a 0xFFF5E0C0 header with frame size 0x414 (160kbps, 22050Hz) but they actually are much shorter */
|
||||||
|
|
||||||
/* read supposed frame size first (to minimize reads) */
|
/* read supposed frame size first (to minimize reads) */
|
||||||
ms->bytes_in_buffer = read_streamfile(ms->buffer, stream->offset, MPEG_AHX_EXPECTED_FRAME_SIZE, stream->streamfile);
|
ms->bytes_in_buffer = read_streamfile(ms->buffer, stream->offset, MPEG_AHX_EXPECTED_FRAME_SIZE, stream->streamfile);
|
||||||
|
|
||||||
/* find actual frame size by looking for the next frame header */
|
/* find actual frame size by looking for the next frame header */
|
||||||
{
|
{
|
||||||
uint32_t current_header = get_u32be(ms->buffer);
|
uint32_t current_header = get_u32be(ms->buffer);
|
||||||
int next_pos = 0x04;
|
int next_pos = 0x04;
|
||||||
|
|
||||||
while (next_pos <= MPEG_AHX_EXPECTED_FRAME_SIZE) {
|
while (next_pos <= MPEG_AHX_EXPECTED_FRAME_SIZE) {
|
||||||
uint32_t next_header = get_u32be(ms->buffer + next_pos);
|
uint32_t next_header = get_u32be(ms->buffer + next_pos);
|
||||||
|
|
||||||
if (current_header == next_header) {
|
if (current_header == next_header) {
|
||||||
current_data_size = next_pos;
|
current_data_size = next_pos;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* AHXs end in a 0x0c footer (0x41485845 28632943 52490000 / "AHXE(c)CRI\0\0") */
|
/* AHXs end in a 0x0c footer (0x41485845 28632943 52490000 / "AHXE(c)CRI\0\0") */
|
||||||
if (stream->offset + next_pos + 0x0c >= file_size) {
|
if (stream->offset + next_pos + 0x0c >= file_size) {
|
||||||
current_data_size = next_pos;
|
current_data_size = next_pos;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
next_pos++;
|
next_pos++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (current_data_size == 0 || current_data_size > ms->buffer_size || current_data_size > MPEG_AHX_EXPECTED_FRAME_SIZE) {
|
if (current_data_size == 0 || current_data_size > ms->buffer_size || current_data_size > MPEG_AHX_EXPECTED_FRAME_SIZE) {
|
||||||
VGM_LOG("MPEG AHX: incorrect data_size 0x%x\n", current_data_size);
|
VGM_LOG("MPEG AHX: incorrect data_size 0x%x\n", current_data_size);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 0-fill up to expected size to keep mpg123 happy */
|
/* 0-fill up to expected size to keep mpg123 happy */
|
||||||
memset(ms->buffer + current_data_size, 0, MPEG_AHX_EXPECTED_FRAME_SIZE - current_data_size);
|
memset(ms->buffer + current_data_size, 0, MPEG_AHX_EXPECTED_FRAME_SIZE - current_data_size);
|
||||||
ms->bytes_in_buffer = MPEG_AHX_EXPECTED_FRAME_SIZE;
|
ms->bytes_in_buffer = MPEG_AHX_EXPECTED_FRAME_SIZE;
|
||||||
|
|
||||||
|
|
||||||
/* decrypt if needed */
|
/* decrypt if needed */
|
||||||
switch(data->config.encryption) {
|
switch(data->config.encryption) {
|
||||||
case 0x00: break;
|
case 0x00: break;
|
||||||
case 0x08: ahx_decrypt_type08(ms->buffer, &data->config); break;
|
case 0x08: ahx_decrypt_type08(ms->buffer, &data->config); break;
|
||||||
default:
|
default:
|
||||||
VGM_LOG("MPEG AHX: unknown encryption 0x%x\n", data->config.encryption);
|
VGM_LOG("MPEG AHX: unknown encryption 0x%x\n", data->config.encryption);
|
||||||
break; /* garbled frame */
|
break; /* garbled frame */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* update offsets */
|
/* update offsets */
|
||||||
stream->offset += current_data_size;
|
stream->offset += current_data_size;
|
||||||
if (stream->offset + 0x0c >= file_size)
|
if (stream->offset + 0x0c >= file_size)
|
||||||
stream->offset = file_size; /* skip 0x0c footer to reach EOF (shouldn't happen normally) */
|
stream->offset = file_size; /* skip 0x0c footer to reach EOF (shouldn't happen normally) */
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
fail:
|
fail:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Decrypts an AHX type 0x08 (keystring) encrypted frame. Algorithm by Thealexbarney */
|
/* Decrypts an AHX type 0x08 (keystring) encrypted frame. Algorithm by Thealexbarney */
|
||||||
static int ahx_decrypt_type08(uint8_t * buffer, mpeg_custom_config *config) {
|
static int ahx_decrypt_type08(uint8_t * buffer, mpeg_custom_config *config) {
|
||||||
int i, index, encrypted_bits;
|
int i, index, encrypted_bits;
|
||||||
uint32_t value;
|
uint32_t value;
|
||||||
uint16_t current_key;
|
uint16_t current_key;
|
||||||
|
|
||||||
/* encryption 0x08 modifies a few bits every frame, here we decrypt and write to data buffer */
|
/* encryption 0x08 modifies a few bits every frame, here we decrypt and write to data buffer */
|
||||||
|
|
||||||
/* derive keystring to 3 primes, using the type 0x08 method, and assign each an index of 1/2/3 (0=no key) */
|
/* derive keystring to 3 primes, using the type 0x08 method, and assign each an index of 1/2/3 (0=no key) */
|
||||||
/* (externally done for now, see: https://github.com/Thealexbarney/VGAudio/blob/2.0/src/VGAudio/Codecs/CriAdx/CriAdxKey.cs) */
|
/* (externally done for now, see: https://github.com/Thealexbarney/VGAudio/blob/2.0/src/VGAudio/Codecs/CriAdx/CriAdxKey.cs) */
|
||||||
|
|
||||||
/* read 2b from a bitstream offset to decrypt, and use it as an index to get the key.
|
/* read 2b from a bitstream offset to decrypt, and use it as an index to get the key.
|
||||||
* AHX encrypted bitstream starts at 107b (0x0d*8+3), every frame, and seem to always use index 2 */
|
* AHX encrypted bitstream starts at 107b (0x0d*8+3), every frame, and seem to always use index 2 */
|
||||||
value = get_u32be(buffer + 0x0d);
|
value = get_u32be(buffer + 0x0d);
|
||||||
index = (value >> (32-3-2)) & 0x03;
|
index = (value >> (32-3-2)) & 0x03;
|
||||||
switch(index) {
|
switch(index) {
|
||||||
case 0: current_key = 0; break;
|
case 0: current_key = 0; break;
|
||||||
case 1: current_key = config->cri_key1; break;
|
case 1: current_key = config->cri_key1; break;
|
||||||
case 2: current_key = config->cri_key2; break;
|
case 2: current_key = config->cri_key2; break;
|
||||||
case 3: current_key = config->cri_key3; break;
|
case 3: current_key = config->cri_key3; break;
|
||||||
default: goto fail;
|
default: goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* AHX for DC: 16b, normal: 6b (no idea, probably some Layer II field) */
|
/* AHX for DC: 16b, normal: 6b (no idea, probably some Layer II field) */
|
||||||
encrypted_bits = config->cri_type == 0x10 ? 16 : 6;
|
encrypted_bits = config->cri_type == 0x10 ? 16 : 6;
|
||||||
|
|
||||||
/* decrypt next bitstream 2b pairs, up to 16b (max key size):
|
/* decrypt next bitstream 2b pairs, up to 16b (max key size):
|
||||||
* - read 2b from bitstream (from higher to lower)
|
* - read 2b from bitstream (from higher to lower)
|
||||||
* - read 2b from key (from lower to higher)
|
* - read 2b from key (from lower to higher)
|
||||||
* - XOR them to decrypt */
|
* - XOR them to decrypt */
|
||||||
for (i = 0; i < encrypted_bits; i+=2) {
|
for (i = 0; i < encrypted_bits; i+=2) {
|
||||||
uint32_t xor_2b = (current_key >> i) & 0x03;
|
uint32_t xor_2b = (current_key >> i) & 0x03;
|
||||||
value ^= ((xor_2b << (32-3-2-2)) >> i);
|
value ^= ((xor_2b << (32-3-2-2)) >> i);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* write output */
|
/* write output */
|
||||||
put_32bitBE(buffer + 0x0d, value);
|
put_32bitBE(buffer + 0x0d, value);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
fail:
|
fail:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,176 +1,176 @@
|
|||||||
#include "mpeg_decoder.h"
|
#include "mpeg_decoder.h"
|
||||||
|
|
||||||
#ifdef VGM_USE_MPEG
|
#ifdef VGM_USE_MPEG
|
||||||
|
|
||||||
/* parsed info from a single EAMP3 frame */
|
/* parsed info from a single EAMP3 frame */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint32_t extended_flag;
|
uint32_t extended_flag;
|
||||||
uint32_t stereo_flag; /* assumed */
|
uint32_t stereo_flag; /* assumed */
|
||||||
uint32_t unknown_flag; /* unused? */
|
uint32_t unknown_flag; /* unused? */
|
||||||
uint32_t frame_size; /* full size including headers and pcm block */
|
uint32_t frame_size; /* full size including headers and pcm block */
|
||||||
uint32_t pcm_number; /* samples in the PCM block (typically 1 MPEG frame, 1152) */
|
uint32_t pcm_number; /* samples in the PCM block (typically 1 MPEG frame, 1152) */
|
||||||
|
|
||||||
uint32_t pre_size; /* size of the header part */
|
uint32_t pre_size; /* size of the header part */
|
||||||
uint32_t mpeg_size; /* size of the MPEG part */
|
uint32_t mpeg_size; /* size of the MPEG part */
|
||||||
uint32_t pcm_size; /* size of the PCM block */
|
uint32_t pcm_size; /* size of the PCM block */
|
||||||
} eamp3_frame_info;
|
} eamp3_frame_info;
|
||||||
|
|
||||||
static int eamp3_parse_frame(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, eamp3_frame_info * eaf);
|
static int eamp3_parse_frame(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, eamp3_frame_info * eaf);
|
||||||
static int eamp3_write_pcm_block(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, int num_stream, eamp3_frame_info * eaf);
|
static int eamp3_write_pcm_block(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, int num_stream, eamp3_frame_info * eaf);
|
||||||
static int eamp3_skip_data(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, int num_stream, int at_start);
|
static int eamp3_skip_data(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, int num_stream, int at_start);
|
||||||
|
|
||||||
/* init config and validate */
|
/* init config and validate */
|
||||||
int mpeg_custom_setup_init_eamp3(STREAMFILE *streamFile, off_t start_offset, mpeg_codec_data *data, coding_t *coding_type) {
|
int mpeg_custom_setup_init_eamp3(STREAMFILE *streamFile, off_t start_offset, mpeg_codec_data *data, coding_t *coding_type) {
|
||||||
mpeg_frame_info info;
|
mpeg_frame_info info;
|
||||||
uint16_t frame_header;
|
uint16_t frame_header;
|
||||||
size_t header_size;
|
size_t header_size;
|
||||||
|
|
||||||
|
|
||||||
/* test unknown stuff */
|
/* test unknown stuff */
|
||||||
frame_header = (uint16_t)read_16bitLE(start_offset+0x00, streamFile);
|
frame_header = (uint16_t)read_16bitLE(start_offset+0x00, streamFile);
|
||||||
if (frame_header & 0x2000) {
|
if (frame_header & 0x2000) {
|
||||||
VGM_LOG("EAMP3: found unknown bit 13\n");
|
VGM_LOG("EAMP3: found unknown bit 13\n");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
if ((frame_header & 0x8000) && (uint32_t)read_32bitLE(start_offset+0x02, streamFile) > 0xFFFF) {
|
if ((frame_header & 0x8000) && (uint32_t)read_32bitLE(start_offset+0x02, streamFile) > 0xFFFF) {
|
||||||
VGM_LOG("EAMP3: found big PCM block\n");
|
VGM_LOG("EAMP3: found big PCM block\n");
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get frame info at offset */
|
/* get frame info at offset */
|
||||||
header_size = (frame_header & 0x8000) ? 0x06 : 0x02;
|
header_size = (frame_header & 0x8000) ? 0x06 : 0x02;
|
||||||
if (!mpeg_get_frame_info(streamFile, start_offset+header_size, &info))
|
if (!mpeg_get_frame_info(streamFile, start_offset+header_size, &info))
|
||||||
goto fail;
|
goto fail;
|
||||||
switch(info.layer) {
|
switch(info.layer) {
|
||||||
case 1: *coding_type = coding_MPEG_layer1; break;
|
case 1: *coding_type = coding_MPEG_layer1; break;
|
||||||
case 2: *coding_type = coding_MPEG_layer2; break;
|
case 2: *coding_type = coding_MPEG_layer2; break;
|
||||||
case 3: *coding_type = coding_MPEG_layer3; break;
|
case 3: *coding_type = coding_MPEG_layer3; break;
|
||||||
default: goto fail;
|
default: goto fail;
|
||||||
}
|
}
|
||||||
data->channels_per_frame = info.channels;
|
data->channels_per_frame = info.channels;
|
||||||
data->samples_per_frame = info.frame_samples;
|
data->samples_per_frame = info.frame_samples;
|
||||||
data->bitrate_per_frame = info.bit_rate;
|
data->bitrate_per_frame = info.bit_rate;
|
||||||
data->sample_rate_per_frame = info.sample_rate;
|
data->sample_rate_per_frame = info.sample_rate;
|
||||||
|
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
fail:
|
fail:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* reads custom frame header + MPEG data + (optional) PCM block */
|
/* reads custom frame header + MPEG data + (optional) PCM block */
|
||||||
int mpeg_custom_parse_frame_eamp3(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, int num_stream) {
|
int mpeg_custom_parse_frame_eamp3(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, int num_stream) {
|
||||||
mpeg_custom_stream *ms = data->streams[num_stream];
|
mpeg_custom_stream *ms = data->streams[num_stream];
|
||||||
eamp3_frame_info eaf;
|
eamp3_frame_info eaf;
|
||||||
int ok;
|
int ok;
|
||||||
|
|
||||||
|
|
||||||
if (!eamp3_skip_data(stream, data, num_stream, 1))
|
if (!eamp3_skip_data(stream, data, num_stream, 1))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
ok = eamp3_parse_frame(stream, data, &eaf);
|
ok = eamp3_parse_frame(stream, data, &eaf);
|
||||||
if (!ok) goto fail;
|
if (!ok) goto fail;
|
||||||
|
|
||||||
ms->bytes_in_buffer = read_streamfile(ms->buffer, stream->offset + eaf.pre_size, eaf.mpeg_size, stream->streamfile);
|
ms->bytes_in_buffer = read_streamfile(ms->buffer, stream->offset + eaf.pre_size, eaf.mpeg_size, stream->streamfile);
|
||||||
|
|
||||||
ok = eamp3_write_pcm_block(stream, data, num_stream, &eaf);
|
ok = eamp3_write_pcm_block(stream, data, num_stream, &eaf);
|
||||||
if (!ok) goto fail;
|
if (!ok) goto fail;
|
||||||
|
|
||||||
stream->offset += eaf.frame_size;
|
stream->offset += eaf.frame_size;
|
||||||
|
|
||||||
if (!eamp3_skip_data(stream, data, num_stream, 0))
|
if (!eamp3_skip_data(stream, data, num_stream, 0))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
fail:
|
fail:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int eamp3_parse_frame(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, eamp3_frame_info * eaf) {
|
static int eamp3_parse_frame(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, eamp3_frame_info * eaf) {
|
||||||
uint16_t current_header = (uint16_t)read_16bitLE(stream->offset+0x00, stream->streamfile);
|
uint16_t current_header = (uint16_t)read_16bitLE(stream->offset+0x00, stream->streamfile);
|
||||||
|
|
||||||
eaf->extended_flag = (current_header & 0x8000);
|
eaf->extended_flag = (current_header & 0x8000);
|
||||||
eaf->stereo_flag = (current_header & 0x4000);
|
eaf->stereo_flag = (current_header & 0x4000);
|
||||||
eaf->unknown_flag = (current_header & 0x2000);
|
eaf->unknown_flag = (current_header & 0x2000);
|
||||||
eaf->frame_size = (current_header & 0x1FFF); /* full size including PCM block */
|
eaf->frame_size = (current_header & 0x1FFF); /* full size including PCM block */
|
||||||
eaf->pcm_number = 0;
|
eaf->pcm_number = 0;
|
||||||
if (eaf->extended_flag > 0) {
|
if (eaf->extended_flag > 0) {
|
||||||
eaf->pcm_number = (uint32_t)read_32bitLE(stream->offset+0x02, stream->streamfile);
|
eaf->pcm_number = (uint32_t)read_32bitLE(stream->offset+0x02, stream->streamfile);
|
||||||
eaf->pcm_size = sizeof(sample) * eaf->pcm_number * data->channels_per_frame;
|
eaf->pcm_size = sizeof(sample) * eaf->pcm_number * data->channels_per_frame;
|
||||||
eaf->pre_size = 0x06;
|
eaf->pre_size = 0x06;
|
||||||
eaf->mpeg_size = eaf->frame_size - eaf->pre_size - eaf->pcm_size;
|
eaf->mpeg_size = eaf->frame_size - eaf->pre_size - eaf->pcm_size;
|
||||||
if (eaf->frame_size < eaf->pre_size + eaf->pcm_size) {
|
if (eaf->frame_size < eaf->pre_size + eaf->pcm_size) {
|
||||||
VGM_LOG("EAMP3: bad pcm size at %x\n", (uint32_t)stream->offset);
|
VGM_LOG("EAMP3: bad pcm size at %x\n", (uint32_t)stream->offset);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
eaf->pcm_size = 0;
|
eaf->pcm_size = 0;
|
||||||
eaf->pre_size = 0x02;
|
eaf->pre_size = 0x02;
|
||||||
eaf->mpeg_size = eaf->frame_size - eaf->pre_size;
|
eaf->mpeg_size = eaf->frame_size - eaf->pre_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
fail:
|
fail:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* write PCM block directly to sample buffer and setup decode discard (see EALayer3). */
|
/* write PCM block directly to sample buffer and setup decode discard (see EALayer3). */
|
||||||
static int eamp3_write_pcm_block(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, int num_stream, eamp3_frame_info * eaf) {
|
static int eamp3_write_pcm_block(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, int num_stream, eamp3_frame_info * eaf) {
|
||||||
mpeg_custom_stream *ms = data->streams[num_stream];
|
mpeg_custom_stream *ms = data->streams[num_stream];
|
||||||
size_t bytes_filled;
|
size_t bytes_filled;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
||||||
bytes_filled = sizeof(sample) * ms->samples_filled * data->channels_per_frame;
|
bytes_filled = sizeof(sample) * ms->samples_filled * data->channels_per_frame;
|
||||||
if (bytes_filled + eaf->pcm_size > ms->output_buffer_size) {
|
if (bytes_filled + eaf->pcm_size > ms->output_buffer_size) {
|
||||||
VGM_LOG("EAMP3: can't fill the sample buffer with 0x%x\n", eaf->pcm_size);
|
VGM_LOG("EAMP3: can't fill the sample buffer with 0x%x\n", eaf->pcm_size);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (eaf->pcm_number) {
|
if (eaf->pcm_number) {
|
||||||
|
|
||||||
/* read + write PCM block samples (always LE) */
|
/* read + write PCM block samples (always LE) */
|
||||||
for (i = 0; i < eaf->pcm_number * data->channels_per_frame; i++) {
|
for (i = 0; i < eaf->pcm_number * data->channels_per_frame; i++) {
|
||||||
off_t pcm_offset = stream->offset + eaf->pre_size + eaf->mpeg_size + sizeof(sample)*i;
|
off_t pcm_offset = stream->offset + eaf->pre_size + eaf->mpeg_size + sizeof(sample)*i;
|
||||||
int16_t pcm_sample = read_16bitLE(pcm_offset,stream->streamfile);
|
int16_t pcm_sample = read_16bitLE(pcm_offset,stream->streamfile);
|
||||||
put_16bitLE(ms->output_buffer + bytes_filled + sizeof(sample)*i, pcm_sample);
|
put_16bitLE(ms->output_buffer + bytes_filled + sizeof(sample)*i, pcm_sample);
|
||||||
}
|
}
|
||||||
ms->samples_filled += eaf->pcm_number;
|
ms->samples_filled += eaf->pcm_number;
|
||||||
|
|
||||||
/* modify decoded samples */
|
/* modify decoded samples */
|
||||||
{
|
{
|
||||||
size_t decode_to_discard = eaf->pcm_number; //todo guessed
|
size_t decode_to_discard = eaf->pcm_number; //todo guessed
|
||||||
ms->decode_to_discard += decode_to_discard;
|
ms->decode_to_discard += decode_to_discard;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
fail:
|
fail:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Skip EA-frames from other streams for .sns/sps multichannel (see EALayer3). */
|
/* Skip EA-frames from other streams for .sns/sps multichannel (see EALayer3). */
|
||||||
static int eamp3_skip_data(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, int num_stream, int at_start) {
|
static int eamp3_skip_data(VGMSTREAMCHANNEL *stream, mpeg_codec_data *data, int num_stream, int at_start) {
|
||||||
int ok, i;
|
int ok, i;
|
||||||
eamp3_frame_info eaf;
|
eamp3_frame_info eaf;
|
||||||
int skips = at_start ? num_stream : data->streams_size - 1 - num_stream;
|
int skips = at_start ? num_stream : data->streams_size - 1 - num_stream;
|
||||||
|
|
||||||
|
|
||||||
for (i = 0; i < skips; i++) {
|
for (i = 0; i < skips; i++) {
|
||||||
ok = eamp3_parse_frame(stream, data, &eaf);
|
ok = eamp3_parse_frame(stream, data, &eaf);
|
||||||
if (!ok) goto fail;
|
if (!ok) goto fail;
|
||||||
|
|
||||||
//;VGM_LOG("s%i: skipping %x, now at %lx\n", num_stream,eaf.frame_size,stream->offset);
|
//;VGM_LOG("s%i: skipping %x, now at %lx\n", num_stream,eaf.frame_size,stream->offset);
|
||||||
stream->offset += eaf.frame_size;
|
stream->offset += eaf.frame_size;
|
||||||
}
|
}
|
||||||
//;VGM_LOG("s%i: skipped %i frames, now at %lx\n", num_stream,skips,stream->offset);
|
//;VGM_LOG("s%i: skipped %i frames, now at %lx\n", num_stream,skips,stream->offset);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
fail:
|
fail:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
File diff suppressed because it is too large
Load Diff
1686
src/meta/xwb_xsb.h
1686
src/meta/xwb_xsb.h
File diff suppressed because it is too large
Load Diff
2222
src/mixing.c
2222
src/mixing.c
File diff suppressed because it is too large
Load Diff
84
src/mixing.h
84
src/mixing.h
@ -1,42 +1,42 @@
|
|||||||
#ifndef _MIXING_H_
|
#ifndef _MIXING_H_
|
||||||
#define _MIXING_H_
|
#define _MIXING_H_
|
||||||
|
|
||||||
#include "vgmstream.h"
|
#include "vgmstream.h"
|
||||||
|
|
||||||
/* Applies mixing commands to the sample buffer. Mixing must be externally enabled and
|
/* Applies mixing commands to the sample buffer. Mixing must be externally enabled and
|
||||||
* outbuf must big enough to hold output_channels*samples_to_do */
|
* outbuf must big enough to hold output_channels*samples_to_do */
|
||||||
void mix_vgmstream(sample_t *outbuf, int32_t sample_count, VGMSTREAM* vgmstream);
|
void mix_vgmstream(sample_t *outbuf, int32_t sample_count, VGMSTREAM* vgmstream);
|
||||||
|
|
||||||
/* internal mixing pre-setup for vgmstream (doesn't imply usage).
|
/* internal mixing pre-setup for vgmstream (doesn't imply usage).
|
||||||
* If init somehow fails next calls are ignored. */
|
* If init somehow fails next calls are ignored. */
|
||||||
void mixing_init(VGMSTREAM* vgmstream);
|
void mixing_init(VGMSTREAM* vgmstream);
|
||||||
void mixing_close(VGMSTREAM* vgmstream);
|
void mixing_close(VGMSTREAM* vgmstream);
|
||||||
void mixing_update_channel(VGMSTREAM* vgmstream);
|
void mixing_update_channel(VGMSTREAM* vgmstream);
|
||||||
|
|
||||||
/* Call to let vgmstream apply mixing, which must handle input/output_channels.
|
/* Call to let vgmstream apply mixing, which must handle input/output_channels.
|
||||||
* Once mixing is active any new mixes are ignored (to avoid the possibility
|
* Once mixing is active any new mixes are ignored (to avoid the possibility
|
||||||
* of down/upmixing without querying input/output_channels). */
|
* of down/upmixing without querying input/output_channels). */
|
||||||
void mixing_setup(VGMSTREAM * vgmstream, int32_t max_sample_count);
|
void mixing_setup(VGMSTREAM * vgmstream, int32_t max_sample_count);
|
||||||
|
|
||||||
/* gets current mixing info */
|
/* gets current mixing info */
|
||||||
void mixing_info(VGMSTREAM * vgmstream, int *input_channels, int *output_channels);
|
void mixing_info(VGMSTREAM * vgmstream, int *input_channels, int *output_channels);
|
||||||
|
|
||||||
/* adds mixes filtering and optimizing if needed */
|
/* adds mixes filtering and optimizing if needed */
|
||||||
void mixing_push_swap(VGMSTREAM* vgmstream, int ch_dst, int ch_src);
|
void mixing_push_swap(VGMSTREAM* vgmstream, int ch_dst, int ch_src);
|
||||||
void mixing_push_add(VGMSTREAM* vgmstream, int ch_dst, int ch_src, double volume);
|
void mixing_push_add(VGMSTREAM* vgmstream, int ch_dst, int ch_src, double volume);
|
||||||
void mixing_push_volume(VGMSTREAM* vgmstream, int ch_dst, double volume);
|
void mixing_push_volume(VGMSTREAM* vgmstream, int ch_dst, double volume);
|
||||||
void mixing_push_limit(VGMSTREAM* vgmstream, int ch_dst, double volume);
|
void mixing_push_limit(VGMSTREAM* vgmstream, int ch_dst, double volume);
|
||||||
void mixing_push_upmix(VGMSTREAM* vgmstream, int ch_dst);
|
void mixing_push_upmix(VGMSTREAM* vgmstream, int ch_dst);
|
||||||
void mixing_push_downmix(VGMSTREAM* vgmstream, int ch_dst);
|
void mixing_push_downmix(VGMSTREAM* vgmstream, int ch_dst);
|
||||||
void mixing_push_killmix(VGMSTREAM* vgmstream, int ch_dst);
|
void mixing_push_killmix(VGMSTREAM* vgmstream, int ch_dst);
|
||||||
void mixing_push_fade(VGMSTREAM* vgmstream, int ch_dst, double vol_start, double vol_end, char shape, int32_t time_pre, int32_t time_start, int32_t time_end, int32_t time_post);
|
void mixing_push_fade(VGMSTREAM* vgmstream, int ch_dst, double vol_start, double vol_end, char shape, int32_t time_pre, int32_t time_start, int32_t time_end, int32_t time_post);
|
||||||
|
|
||||||
void mixing_macro_volume(VGMSTREAM* vgmstream, double volume, uint32_t mask);
|
void mixing_macro_volume(VGMSTREAM* vgmstream, double volume, uint32_t mask);
|
||||||
void mixing_macro_track(VGMSTREAM* vgmstream, uint32_t mask);
|
void mixing_macro_track(VGMSTREAM* vgmstream, uint32_t mask);
|
||||||
void mixing_macro_layer(VGMSTREAM* vgmstream, int max, uint32_t mask, char mode);
|
void mixing_macro_layer(VGMSTREAM* vgmstream, int max, uint32_t mask, char mode);
|
||||||
void mixing_macro_crosstrack(VGMSTREAM* vgmstream, int max);
|
void mixing_macro_crosstrack(VGMSTREAM* vgmstream, int max);
|
||||||
void mixing_macro_crosslayer(VGMSTREAM* vgmstream, int max, char mode);
|
void mixing_macro_crosslayer(VGMSTREAM* vgmstream, int max, char mode);
|
||||||
void mixing_macro_downmix(VGMSTREAM* vgmstream, int max /*, mapping_t output_mapping*/);
|
void mixing_macro_downmix(VGMSTREAM* vgmstream, int max /*, mapping_t output_mapping*/);
|
||||||
|
|
||||||
|
|
||||||
#endif /* _MIXING_H_ */
|
#endif /* _MIXING_H_ */
|
||||||
|
688
src/plugins.c
688
src/plugins.c
@ -1,344 +1,344 @@
|
|||||||
#include "vgmstream.h"
|
#include "vgmstream.h"
|
||||||
#include "plugins.h"
|
#include "plugins.h"
|
||||||
#include "mixing.h"
|
#include "mixing.h"
|
||||||
|
|
||||||
|
|
||||||
/* ****************************************** */
|
/* ****************************************** */
|
||||||
/* CONTEXT: simplifies plugin code */
|
/* CONTEXT: simplifies plugin code */
|
||||||
/* ****************************************** */
|
/* ****************************************** */
|
||||||
|
|
||||||
int vgmstream_ctx_is_valid(const char* filename, vgmstream_ctx_valid_cfg *cfg) {
|
int vgmstream_ctx_is_valid(const char* filename, vgmstream_ctx_valid_cfg *cfg) {
|
||||||
const char ** extension_list;
|
const char ** extension_list;
|
||||||
size_t extension_list_len;
|
size_t extension_list_len;
|
||||||
const char *extension;
|
const char *extension;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
||||||
if (cfg->is_extension) {
|
if (cfg->is_extension) {
|
||||||
extension = filename;
|
extension = filename;
|
||||||
} else {
|
} else {
|
||||||
extension = filename_extension(filename);
|
extension = filename_extension(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* some metas accept extensionless files */
|
/* some metas accept extensionless files */
|
||||||
if (strlen(extension) <= 0) {
|
if (strlen(extension) <= 0) {
|
||||||
return !cfg->reject_extensionless;
|
return !cfg->reject_extensionless;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* try in default list */
|
/* try in default list */
|
||||||
if (!cfg->skip_standard) {
|
if (!cfg->skip_standard) {
|
||||||
extension_list = vgmstream_get_formats(&extension_list_len);
|
extension_list = vgmstream_get_formats(&extension_list_len);
|
||||||
for (i = 0; i < extension_list_len; i++) {
|
for (i = 0; i < extension_list_len; i++) {
|
||||||
if (strcasecmp(extension, extension_list[i]) == 0) {
|
if (strcasecmp(extension, extension_list[i]) == 0) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* try in common extensions */
|
/* try in common extensions */
|
||||||
if (cfg->accept_common) {
|
if (cfg->accept_common) {
|
||||||
extension_list = vgmstream_get_common_formats(&extension_list_len);
|
extension_list = vgmstream_get_common_formats(&extension_list_len);
|
||||||
for (i = 0; i < extension_list_len; i++) {
|
for (i = 0; i < extension_list_len; i++) {
|
||||||
if (strcasecmp(extension, extension_list[i]) == 0)
|
if (strcasecmp(extension, extension_list[i]) == 0)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* allow anything not in the normal list but not in common extensions */
|
/* allow anything not in the normal list but not in common extensions */
|
||||||
if (cfg->accept_unknown) {
|
if (cfg->accept_unknown) {
|
||||||
int is_common = 0;
|
int is_common = 0;
|
||||||
|
|
||||||
extension_list = vgmstream_get_common_formats(&extension_list_len);
|
extension_list = vgmstream_get_common_formats(&extension_list_len);
|
||||||
for (i = 0; i < extension_list_len; i++) {
|
for (i = 0; i < extension_list_len; i++) {
|
||||||
if (strcasecmp(extension, extension_list[i]) == 0) {
|
if (strcasecmp(extension, extension_list[i]) == 0) {
|
||||||
is_common = 1;
|
is_common = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_common)
|
if (!is_common)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ****************************************** */
|
/* ****************************************** */
|
||||||
/* TAGS: loads key=val tags from a file */
|
/* TAGS: loads key=val tags from a file */
|
||||||
/* ****************************************** */
|
/* ****************************************** */
|
||||||
|
|
||||||
#define VGMSTREAM_TAGS_LINE_MAX 2048
|
#define VGMSTREAM_TAGS_LINE_MAX 2048
|
||||||
|
|
||||||
/* opaque tag state */
|
/* opaque tag state */
|
||||||
struct VGMSTREAM_TAGS {
|
struct VGMSTREAM_TAGS {
|
||||||
/* extracted output */
|
/* extracted output */
|
||||||
char key[VGMSTREAM_TAGS_LINE_MAX];
|
char key[VGMSTREAM_TAGS_LINE_MAX];
|
||||||
char val[VGMSTREAM_TAGS_LINE_MAX];
|
char val[VGMSTREAM_TAGS_LINE_MAX];
|
||||||
|
|
||||||
/* file to find tags for */
|
/* file to find tags for */
|
||||||
int targetname_len;
|
int targetname_len;
|
||||||
char targetname[VGMSTREAM_TAGS_LINE_MAX];
|
char targetname[VGMSTREAM_TAGS_LINE_MAX];
|
||||||
/* path of targetname */
|
/* path of targetname */
|
||||||
char targetpath[VGMSTREAM_TAGS_LINE_MAX];
|
char targetpath[VGMSTREAM_TAGS_LINE_MAX];
|
||||||
|
|
||||||
/* tag section for filename (see comments below) */
|
/* tag section for filename (see comments below) */
|
||||||
int section_found;
|
int section_found;
|
||||||
off_t section_start;
|
off_t section_start;
|
||||||
off_t section_end;
|
off_t section_end;
|
||||||
off_t offset;
|
off_t offset;
|
||||||
|
|
||||||
/* commands */
|
/* commands */
|
||||||
int autotrack_on;
|
int autotrack_on;
|
||||||
int autotrack_written;
|
int autotrack_written;
|
||||||
int track_count;
|
int track_count;
|
||||||
|
|
||||||
int autoalbum_on;
|
int autoalbum_on;
|
||||||
int autoalbum_written;
|
int autoalbum_written;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void tags_clean(VGMSTREAM_TAGS* tag) {
|
static void tags_clean(VGMSTREAM_TAGS* tag) {
|
||||||
int i;
|
int i;
|
||||||
int val_len = strlen(tag->val);
|
int val_len = strlen(tag->val);
|
||||||
|
|
||||||
/* remove trailing spaces */
|
/* remove trailing spaces */
|
||||||
for (i = val_len - 1; i > 0; i--) {
|
for (i = val_len - 1; i > 0; i--) {
|
||||||
if (tag->val[i] != ' ')
|
if (tag->val[i] != ' ')
|
||||||
break;
|
break;
|
||||||
tag->val[i] = '\0';
|
tag->val[i] = '\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VGMSTREAM_TAGS* vgmstream_tags_init(const char* *tag_key, const char* *tag_val) {
|
VGMSTREAM_TAGS* vgmstream_tags_init(const char* *tag_key, const char* *tag_val) {
|
||||||
VGMSTREAM_TAGS* tags = malloc(sizeof(VGMSTREAM_TAGS));
|
VGMSTREAM_TAGS* tags = malloc(sizeof(VGMSTREAM_TAGS));
|
||||||
if (!tags) goto fail;
|
if (!tags) goto fail;
|
||||||
|
|
||||||
*tag_key = tags->key;
|
*tag_key = tags->key;
|
||||||
*tag_val = tags->val;
|
*tag_val = tags->val;
|
||||||
|
|
||||||
return tags;
|
return tags;
|
||||||
fail:
|
fail:
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void vgmstream_tags_close(VGMSTREAM_TAGS *tags) {
|
void vgmstream_tags_close(VGMSTREAM_TAGS *tags) {
|
||||||
free(tags);
|
free(tags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Find next tag and return 1 if found.
|
/* Find next tag and return 1 if found.
|
||||||
*
|
*
|
||||||
* Tags can be "global" @TAGS, "command" $TAGS, and "file" %TAGS for a target filename.
|
* Tags can be "global" @TAGS, "command" $TAGS, and "file" %TAGS for a target filename.
|
||||||
* To extract tags we must find either global tags, or the filename's tag "section"
|
* To extract tags we must find either global tags, or the filename's tag "section"
|
||||||
* where tags apply: (# @TAGS ) .. (other_filename) ..(# %TAGS section).. (target_filename).
|
* where tags apply: (# @TAGS ) .. (other_filename) ..(# %TAGS section).. (target_filename).
|
||||||
* When a new "other_filename" is found that offset is marked as section_start, and when
|
* When a new "other_filename" is found that offset is marked as section_start, and when
|
||||||
* target_filename is found it's marked as section_end. Then we can begin extracting tags
|
* target_filename is found it's marked as section_end. Then we can begin extracting tags
|
||||||
* within that section, until all tags are exhausted. Global tags are extracted as found,
|
* within that section, until all tags are exhausted. Global tags are extracted as found,
|
||||||
* so they always go first, also meaning any tags after file's section are ignored.
|
* so they always go first, also meaning any tags after file's section are ignored.
|
||||||
* Command tags have special meanings and are output after all section tags. */
|
* Command tags have special meanings and are output after all section tags. */
|
||||||
int vgmstream_tags_next_tag(VGMSTREAM_TAGS* tags, STREAMFILE* tagfile) {
|
int vgmstream_tags_next_tag(VGMSTREAM_TAGS* tags, STREAMFILE* tagfile) {
|
||||||
off_t file_size = get_streamfile_size(tagfile);
|
off_t file_size = get_streamfile_size(tagfile);
|
||||||
char currentname[VGMSTREAM_TAGS_LINE_MAX] = {0};
|
char currentname[VGMSTREAM_TAGS_LINE_MAX] = {0};
|
||||||
char line[VGMSTREAM_TAGS_LINE_MAX];
|
char line[VGMSTREAM_TAGS_LINE_MAX];
|
||||||
int ok, bytes_read, line_ok, n1,n2;
|
int ok, bytes_read, line_ok, n1,n2;
|
||||||
|
|
||||||
if (!tags)
|
if (!tags)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* prepare file start and skip BOM if needed */
|
/* prepare file start and skip BOM if needed */
|
||||||
if (tags->offset == 0) {
|
if (tags->offset == 0) {
|
||||||
if ((uint16_t)read_16bitLE(0x00, tagfile) == 0xFFFE ||
|
if ((uint16_t)read_16bitLE(0x00, tagfile) == 0xFFFE ||
|
||||||
(uint16_t)read_16bitLE(0x00, tagfile) == 0xFEFF) {
|
(uint16_t)read_16bitLE(0x00, tagfile) == 0xFEFF) {
|
||||||
tags->offset = 0x02;
|
tags->offset = 0x02;
|
||||||
if (tags->section_start == 0)
|
if (tags->section_start == 0)
|
||||||
tags->section_start = 0x02;
|
tags->section_start = 0x02;
|
||||||
}
|
}
|
||||||
else if (((uint32_t)read_32bitBE(0x00, tagfile) & 0xFFFFFF00) == 0xEFBBBF00) {
|
else if (((uint32_t)read_32bitBE(0x00, tagfile) & 0xFFFFFF00) == 0xEFBBBF00) {
|
||||||
tags->offset = 0x03;
|
tags->offset = 0x03;
|
||||||
if (tags->section_start == 0)
|
if (tags->section_start == 0)
|
||||||
tags->section_start = 0x03;
|
tags->section_start = 0x03;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* read lines */
|
/* read lines */
|
||||||
while (tags->offset <= file_size) {
|
while (tags->offset <= file_size) {
|
||||||
|
|
||||||
/* after section: no more tags to extract */
|
/* after section: no more tags to extract */
|
||||||
if (tags->section_found && tags->offset >= tags->section_end) {
|
if (tags->section_found && tags->offset >= tags->section_end) {
|
||||||
|
|
||||||
/* write extra tags after all regular tags */
|
/* write extra tags after all regular tags */
|
||||||
if (tags->autotrack_on && !tags->autotrack_written) {
|
if (tags->autotrack_on && !tags->autotrack_written) {
|
||||||
sprintf(tags->key, "%s", "TRACK");
|
sprintf(tags->key, "%s", "TRACK");
|
||||||
sprintf(tags->val, "%i", tags->track_count);
|
sprintf(tags->val, "%i", tags->track_count);
|
||||||
tags->autotrack_written = 1;
|
tags->autotrack_written = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tags->autoalbum_on && !tags->autoalbum_written && tags->targetpath[0] != '\0') {
|
if (tags->autoalbum_on && !tags->autoalbum_written && tags->targetpath[0] != '\0') {
|
||||||
const char* path;
|
const char* path;
|
||||||
|
|
||||||
path = strrchr(tags->targetpath,'\\');
|
path = strrchr(tags->targetpath,'\\');
|
||||||
if (!path) {
|
if (!path) {
|
||||||
path = strrchr(tags->targetpath,'/');
|
path = strrchr(tags->targetpath,'/');
|
||||||
}
|
}
|
||||||
if (!path) {
|
if (!path) {
|
||||||
path = tags->targetpath;
|
path = tags->targetpath;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(tags->key, "%s", "ALBUM");
|
sprintf(tags->key, "%s", "ALBUM");
|
||||||
sprintf(tags->val, "%s", path+1);
|
sprintf(tags->val, "%s", path+1);
|
||||||
tags->autoalbum_written = 1;
|
tags->autoalbum_written = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes_read = read_line(line, sizeof(line), tags->offset, tagfile, &line_ok);
|
bytes_read = read_line(line, sizeof(line), tags->offset, tagfile, &line_ok);
|
||||||
if (!line_ok || bytes_read == 0) goto fail;
|
if (!line_ok || bytes_read == 0) goto fail;
|
||||||
|
|
||||||
tags->offset += bytes_read;
|
tags->offset += bytes_read;
|
||||||
|
|
||||||
|
|
||||||
if (tags->section_found) {
|
if (tags->section_found) {
|
||||||
/* find possible file tag */
|
/* find possible file tag */
|
||||||
ok = sscanf(line, "# %%%[^ \t] %[^\r\n] ", tags->key,tags->val);
|
ok = sscanf(line, "# %%%[^ \t] %[^\r\n] ", tags->key,tags->val);
|
||||||
if (ok == 2) {
|
if (ok == 2) {
|
||||||
tags_clean(tags);
|
tags_clean(tags);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
if (line[0] == '#') {
|
if (line[0] == '#') {
|
||||||
/* find possible global command */
|
/* find possible global command */
|
||||||
ok = sscanf(line, "# $%[^ \t] %[^\r\n]", tags->key,tags->val);
|
ok = sscanf(line, "# $%[^ \t] %[^\r\n]", tags->key,tags->val);
|
||||||
if (ok == 1 || ok == 2) {
|
if (ok == 1 || ok == 2) {
|
||||||
if (strcasecmp(tags->key,"AUTOTRACK") == 0) {
|
if (strcasecmp(tags->key,"AUTOTRACK") == 0) {
|
||||||
tags->autotrack_on = 1;
|
tags->autotrack_on = 1;
|
||||||
}
|
}
|
||||||
else if (strcasecmp(tags->key,"AUTOALBUM") == 0) {
|
else if (strcasecmp(tags->key,"AUTOALBUM") == 0) {
|
||||||
tags->autoalbum_on = 1;
|
tags->autoalbum_on = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
continue; /* not an actual tag */
|
continue; /* not an actual tag */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* find possible global tag */
|
/* find possible global tag */
|
||||||
ok = sscanf(line, "# @%[^ \t] %[^\r\n]", tags->key,tags->val);
|
ok = sscanf(line, "# @%[^ \t] %[^\r\n]", tags->key,tags->val);
|
||||||
if (ok == 2) {
|
if (ok == 2) {
|
||||||
tags_clean(tags);
|
tags_clean(tags);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
continue; /* next line */
|
continue; /* next line */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* find possible filename and section start/end
|
/* find possible filename and section start/end
|
||||||
* (.m3u seem to allow filenames with whitespaces before, make sure to trim) */
|
* (.m3u seem to allow filenames with whitespaces before, make sure to trim) */
|
||||||
ok = sscanf(line, " %n%[^\r\n]%n ", &n1, currentname, &n2);
|
ok = sscanf(line, " %n%[^\r\n]%n ", &n1, currentname, &n2);
|
||||||
if (ok == 1) {
|
if (ok == 1) {
|
||||||
int currentname_len = n2 - n1;
|
int currentname_len = n2 - n1;
|
||||||
int filename_found = 0;
|
int filename_found = 0;
|
||||||
|
|
||||||
/* we want to find file with the same name (case insensitive), OR a virtual .txtp with
|
/* we want to find file with the same name (case insensitive), OR a virtual .txtp with
|
||||||
* the filename inside (so 'file.adx' gets tags from 'file.adx#i.txtp', reading
|
* the filename inside (so 'file.adx' gets tags from 'file.adx#i.txtp', reading
|
||||||
* tags even if we don't open !tags.m3u with virtual .txtp directly) */
|
* tags even if we don't open !tags.m3u with virtual .txtp directly) */
|
||||||
|
|
||||||
/* strcasecmp works ok even for UTF-8 */
|
/* strcasecmp works ok even for UTF-8 */
|
||||||
if (currentname_len >= tags->targetname_len && /* starts with targetname */
|
if (currentname_len >= tags->targetname_len && /* starts with targetname */
|
||||||
strncasecmp(currentname, tags->targetname, tags->targetname_len) == 0) {
|
strncasecmp(currentname, tags->targetname, tags->targetname_len) == 0) {
|
||||||
|
|
||||||
if (currentname_len == tags->targetname_len) { /* exact match */
|
if (currentname_len == tags->targetname_len) { /* exact match */
|
||||||
filename_found = 1;
|
filename_found = 1;
|
||||||
}
|
}
|
||||||
else if (vgmstream_is_virtual_filename(currentname)) { /* ends with .txth */
|
else if (vgmstream_is_virtual_filename(currentname)) { /* ends with .txth */
|
||||||
char c = currentname[tags->targetname_len];
|
char c = currentname[tags->targetname_len];
|
||||||
/* tell apart the unlikely case of having both 'bgm01.ad.txtp' and 'bgm01.adp.txtp' */
|
/* tell apart the unlikely case of having both 'bgm01.ad.txtp' and 'bgm01.adp.txtp' */
|
||||||
filename_found = (c==' ' || c == '.' || c == '#');
|
filename_found = (c==' ' || c == '.' || c == '#');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filename_found) {
|
if (filename_found) {
|
||||||
/* section ok, start would be set before this (or be 0) */
|
/* section ok, start would be set before this (or be 0) */
|
||||||
tags->section_end = tags->offset;
|
tags->section_end = tags->offset;
|
||||||
tags->section_found = 1;
|
tags->section_found = 1;
|
||||||
tags->offset = tags->section_start;
|
tags->offset = tags->section_start;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* mark new possible section */
|
/* mark new possible section */
|
||||||
tags->section_start = tags->offset;
|
tags->section_start = tags->offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
tags->track_count++; /* new track found (target filename or not) */
|
tags->track_count++; /* new track found (target filename or not) */
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* empty/bad line, probably */
|
/* empty/bad line, probably */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* may reach here if read up to file_size but no section was found */
|
/* may reach here if read up to file_size but no section was found */
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
tags->key[0] = '\0';
|
tags->key[0] = '\0';
|
||||||
tags->val[0] = '\0';
|
tags->val[0] = '\0';
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void vgmstream_tags_reset(VGMSTREAM_TAGS* tags, const char* target_filename) {
|
void vgmstream_tags_reset(VGMSTREAM_TAGS* tags, const char* target_filename) {
|
||||||
char *path;
|
char *path;
|
||||||
|
|
||||||
if (!tags)
|
if (!tags)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
memset(tags, 0, sizeof(VGMSTREAM_TAGS));
|
memset(tags, 0, sizeof(VGMSTREAM_TAGS));
|
||||||
|
|
||||||
//todo validate sizes and copy sensible max
|
//todo validate sizes and copy sensible max
|
||||||
|
|
||||||
/* get base name */
|
/* get base name */
|
||||||
strcpy(tags->targetpath, target_filename);
|
strcpy(tags->targetpath, target_filename);
|
||||||
|
|
||||||
/* Windows CMD accepts both \\ and /, and maybe plugin uses either */
|
/* Windows CMD accepts both \\ and /, and maybe plugin uses either */
|
||||||
path = strrchr(tags->targetpath,'\\');
|
path = strrchr(tags->targetpath,'\\');
|
||||||
if (!path) {
|
if (!path) {
|
||||||
path = strrchr(tags->targetpath,'/');
|
path = strrchr(tags->targetpath,'/');
|
||||||
}
|
}
|
||||||
if (path != NULL) {
|
if (path != NULL) {
|
||||||
path[0] = '\0'; /* leave targetpath with path only */
|
path[0] = '\0'; /* leave targetpath with path only */
|
||||||
path = path+1;
|
path = path+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (path) {
|
if (path) {
|
||||||
strcpy(tags->targetname, path);
|
strcpy(tags->targetname, path);
|
||||||
} else {
|
} else {
|
||||||
tags->targetpath[0] = '\0';
|
tags->targetpath[0] = '\0';
|
||||||
strcpy(tags->targetname, target_filename);
|
strcpy(tags->targetname, target_filename);
|
||||||
}
|
}
|
||||||
tags->targetname_len = strlen(tags->targetname);
|
tags->targetname_len = strlen(tags->targetname);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ****************************************** */
|
/* ****************************************** */
|
||||||
/* MIXING: modifies vgmstream output */
|
/* MIXING: modifies vgmstream output */
|
||||||
/* ****************************************** */
|
/* ****************************************** */
|
||||||
|
|
||||||
void vgmstream_mixing_enable(VGMSTREAM* vgmstream, int32_t max_sample_count, int *input_channels, int *output_channels) {
|
void vgmstream_mixing_enable(VGMSTREAM* vgmstream, int32_t max_sample_count, int *input_channels, int *output_channels) {
|
||||||
mixing_setup(vgmstream, max_sample_count);
|
mixing_setup(vgmstream, max_sample_count);
|
||||||
mixing_info(vgmstream, input_channels, output_channels);
|
mixing_info(vgmstream, input_channels, output_channels);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vgmstream_mixing_autodownmix(VGMSTREAM *vgmstream, int max_channels) {
|
void vgmstream_mixing_autodownmix(VGMSTREAM *vgmstream, int max_channels) {
|
||||||
if (max_channels <= 0)
|
if (max_channels <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* guess mixing the best we can, using standard downmixing if possible
|
/* guess mixing the best we can, using standard downmixing if possible
|
||||||
* (without mapping we can't be sure if format is using a standard layout) */
|
* (without mapping we can't be sure if format is using a standard layout) */
|
||||||
if (vgmstream->channel_layout && max_channels <= 2) {
|
if (vgmstream->channel_layout && max_channels <= 2) {
|
||||||
mixing_macro_downmix(vgmstream, max_channels);
|
mixing_macro_downmix(vgmstream, max_channels);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mixing_macro_layer(vgmstream, max_channels, 0, 'e');
|
mixing_macro_layer(vgmstream, max_channels, 0, 'e');
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
212
src/plugins.h
212
src/plugins.h
@ -1,106 +1,106 @@
|
|||||||
/*
|
/*
|
||||||
* plugins.h - helper for plugins
|
* plugins.h - helper for plugins
|
||||||
*/
|
*/
|
||||||
#ifndef _PLUGINS_H_
|
#ifndef _PLUGINS_H_
|
||||||
#define _PLUGINS_H_
|
#define _PLUGINS_H_
|
||||||
|
|
||||||
#include "streamfile.h"
|
#include "streamfile.h"
|
||||||
|
|
||||||
/* ****************************************** */
|
/* ****************************************** */
|
||||||
/* CONTEXT: simplifies plugin code */
|
/* CONTEXT: simplifies plugin code */
|
||||||
/* ****************************************** */
|
/* ****************************************** */
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int is_extension; /* set if filename is already an extension */
|
int is_extension; /* set if filename is already an extension */
|
||||||
int skip_standard; /* set if shouldn't check standard formats */
|
int skip_standard; /* set if shouldn't check standard formats */
|
||||||
int reject_extensionless; /* set if player can't play extensionless files */
|
int reject_extensionless; /* set if player can't play extensionless files */
|
||||||
int accept_unknown; /* set to allow any extension (for txth) */
|
int accept_unknown; /* set to allow any extension (for txth) */
|
||||||
int accept_common; /* set to allow known-but-common extension (when player has plugin priority) */
|
int accept_common; /* set to allow known-but-common extension (when player has plugin priority) */
|
||||||
} vgmstream_ctx_valid_cfg;
|
} vgmstream_ctx_valid_cfg;
|
||||||
|
|
||||||
/* returns if vgmstream can parse file by extension */
|
/* returns if vgmstream can parse file by extension */
|
||||||
int vgmstream_ctx_is_valid(const char* filename, vgmstream_ctx_valid_cfg *cfg);
|
int vgmstream_ctx_is_valid(const char* filename, vgmstream_ctx_valid_cfg *cfg);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
||||||
/* opaque player state */
|
/* opaque player state */
|
||||||
typedef struct VGMSTREAM_CTX VGMSTREAM_CTX;
|
typedef struct VGMSTREAM_CTX VGMSTREAM_CTX;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
//...
|
//...
|
||||||
} VGMSTREAM_CTX_INFO;
|
} VGMSTREAM_CTX_INFO;
|
||||||
|
|
||||||
VGMSTREAM_CTX* vgmstream_ctx_init(...);
|
VGMSTREAM_CTX* vgmstream_ctx_init(...);
|
||||||
|
|
||||||
VGMSTREAM_CTX* vgmstream_ctx_format_check(...);
|
VGMSTREAM_CTX* vgmstream_ctx_format_check(...);
|
||||||
VGMSTREAM_CTX* vgmstream_ctx_set_format_whilelist(...);
|
VGMSTREAM_CTX* vgmstream_ctx_set_format_whilelist(...);
|
||||||
VGMSTREAM_CTX* vgmstream_ctx_set_format_blacklist(...);
|
VGMSTREAM_CTX* vgmstream_ctx_set_format_blacklist(...);
|
||||||
|
|
||||||
VGMSTREAM_CTX* vgmstream_ctx_set_file(...);
|
VGMSTREAM_CTX* vgmstream_ctx_set_file(...);
|
||||||
|
|
||||||
VGMSTREAM_CTX* vgmstream_ctx_get_config(...);
|
VGMSTREAM_CTX* vgmstream_ctx_get_config(...);
|
||||||
|
|
||||||
VGMSTREAM_CTX* vgmstream_ctx_set_config(...);
|
VGMSTREAM_CTX* vgmstream_ctx_set_config(...);
|
||||||
|
|
||||||
VGMSTREAM_CTX* vgmstream_ctx_get_buffer(...);
|
VGMSTREAM_CTX* vgmstream_ctx_get_buffer(...);
|
||||||
|
|
||||||
VGMSTREAM_CTX* vgmstream_ctx_get_info(...);
|
VGMSTREAM_CTX* vgmstream_ctx_get_info(...);
|
||||||
|
|
||||||
VGMSTREAM_CTX* vgmstream_ctx_describe(...);
|
VGMSTREAM_CTX* vgmstream_ctx_describe(...);
|
||||||
|
|
||||||
VGMSTREAM_CTX* vgmstream_ctx_get_title(...);
|
VGMSTREAM_CTX* vgmstream_ctx_get_title(...);
|
||||||
|
|
||||||
VGMSTREAM_CTX* vgmstream_ctx_get_tagfile(...);
|
VGMSTREAM_CTX* vgmstream_ctx_get_tagfile(...);
|
||||||
|
|
||||||
VGMSTREAM_CTX* vgmstream_ctx_play(...);
|
VGMSTREAM_CTX* vgmstream_ctx_play(...);
|
||||||
|
|
||||||
VGMSTREAM_CTX* vgmstream_ctx_seek(...);
|
VGMSTREAM_CTX* vgmstream_ctx_seek(...);
|
||||||
|
|
||||||
VGMSTREAM_CTX* vgmstream_ctx_close(...);
|
VGMSTREAM_CTX* vgmstream_ctx_close(...);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ****************************************** */
|
/* ****************************************** */
|
||||||
/* TAGS: loads key=val tags from a file */
|
/* TAGS: loads key=val tags from a file */
|
||||||
/* ****************************************** */
|
/* ****************************************** */
|
||||||
|
|
||||||
/* opaque tag state */
|
/* opaque tag state */
|
||||||
typedef struct VGMSTREAM_TAGS VGMSTREAM_TAGS;
|
typedef struct VGMSTREAM_TAGS VGMSTREAM_TAGS;
|
||||||
|
|
||||||
/* Initializes TAGS and returns pointers to extracted strings (always valid but change
|
/* Initializes TAGS and returns pointers to extracted strings (always valid but change
|
||||||
* on every vgmstream_tags_next_tag call). Next functions are safe to call even if this fails (validate NULL).
|
* on every vgmstream_tags_next_tag call). Next functions are safe to call even if this fails (validate NULL).
|
||||||
* ex.: const char *tag_key, *tag_val; tags=vgmstream_tags_init(&tag_key, &tag_val); */
|
* ex.: const char *tag_key, *tag_val; tags=vgmstream_tags_init(&tag_key, &tag_val); */
|
||||||
VGMSTREAM_TAGS* vgmstream_tags_init(const char* *tag_key, const char* *tag_val);
|
VGMSTREAM_TAGS* vgmstream_tags_init(const char* *tag_key, const char* *tag_val);
|
||||||
|
|
||||||
/* Resets tagfile to restart reading from the beginning for a new filename.
|
/* Resets tagfile to restart reading from the beginning for a new filename.
|
||||||
* Must be called first before extracting tags. */
|
* Must be called first before extracting tags. */
|
||||||
void vgmstream_tags_reset(VGMSTREAM_TAGS* tags, const char* target_filename);
|
void vgmstream_tags_reset(VGMSTREAM_TAGS* tags, const char* target_filename);
|
||||||
|
|
||||||
|
|
||||||
/* Extracts next valid tag in tagfile to *tag. Returns 0 if no more tags are found (meant to be
|
/* Extracts next valid tag in tagfile to *tag. Returns 0 if no more tags are found (meant to be
|
||||||
* called repeatedly until 0). Key/values are trimmed and values can be in UTF-8. */
|
* called repeatedly until 0). Key/values are trimmed and values can be in UTF-8. */
|
||||||
int vgmstream_tags_next_tag(VGMSTREAM_TAGS* tags, STREAMFILE* tagfile);
|
int vgmstream_tags_next_tag(VGMSTREAM_TAGS* tags, STREAMFILE* tagfile);
|
||||||
|
|
||||||
/* Closes tag file */
|
/* Closes tag file */
|
||||||
void vgmstream_tags_close(VGMSTREAM_TAGS* tags);
|
void vgmstream_tags_close(VGMSTREAM_TAGS* tags);
|
||||||
|
|
||||||
|
|
||||||
/* ****************************************** */
|
/* ****************************************** */
|
||||||
/* MIXING: modifies vgmstream output */
|
/* MIXING: modifies vgmstream output */
|
||||||
/* ****************************************** */
|
/* ****************************************** */
|
||||||
|
|
||||||
/* Enables mixing effects, with max outbuf samples as a hint. Once active, plugin
|
/* Enables mixing effects, with max outbuf samples as a hint. Once active, plugin
|
||||||
* must use returned input_channels to create outbuf and output_channels to output audio.
|
* must use returned input_channels to create outbuf and output_channels to output audio.
|
||||||
* max_sample_count may be 0 if you only need to query values and not actually enable it.
|
* max_sample_count may be 0 if you only need to query values and not actually enable it.
|
||||||
* Needs to be enabled last after adding effects. */
|
* Needs to be enabled last after adding effects. */
|
||||||
void vgmstream_mixing_enable(VGMSTREAM* vgmstream, int32_t max_sample_count, int *input_channels, int *output_channels);
|
void vgmstream_mixing_enable(VGMSTREAM* vgmstream, int32_t max_sample_count, int *input_channels, int *output_channels);
|
||||||
|
|
||||||
/* sets automatic downmixing if vgmstream's channels are higher than max_channels */
|
/* sets automatic downmixing if vgmstream's channels are higher than max_channels */
|
||||||
void vgmstream_mixing_autodownmix(VGMSTREAM *vgmstream, int max_channels);
|
void vgmstream_mixing_autodownmix(VGMSTREAM *vgmstream, int max_channels);
|
||||||
|
|
||||||
/* sets a fadeout */
|
/* sets a fadeout */
|
||||||
//void vgmstream_mixing_fadeout(VGMSTREAM *vgmstream, float start_second, float duration_seconds);
|
//void vgmstream_mixing_fadeout(VGMSTREAM *vgmstream, float start_second, float duration_seconds);
|
||||||
|
|
||||||
#endif /* _PLUGINS_H_ */
|
#endif /* _PLUGINS_H_ */
|
||||||
|
@ -1,154 +1,154 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
<Configuration>Release</Configuration>
|
<Configuration>Release</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Template|Win32">
|
<ProjectConfiguration Include="Template|Win32">
|
||||||
<Configuration>Template</Configuration>
|
<Configuration>Template</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<ProjectGuid>{42D86561-8CE4-40F5-86CE-58C986B77502}</ProjectGuid>
|
<ProjectGuid>{42D86561-8CE4-40F5-86CE-58C986B77502}</ProjectGuid>
|
||||||
<RootNamespace>in_vgmstream</RootNamespace>
|
<RootNamespace>in_vgmstream</RootNamespace>
|
||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<SccProjectName>
|
<SccProjectName>
|
||||||
</SccProjectName>
|
</SccProjectName>
|
||||||
<SccAuxPath>
|
<SccAuxPath>
|
||||||
</SccAuxPath>
|
</SccAuxPath>
|
||||||
<SccLocalPath>
|
<SccLocalPath>
|
||||||
</SccLocalPath>
|
</SccLocalPath>
|
||||||
<SccProvider>
|
<SccProvider>
|
||||||
</SccProvider>
|
</SccProvider>
|
||||||
<WindowsTargetPlatformVersion>7.0</WindowsTargetPlatformVersion>
|
<WindowsTargetPlatformVersion>7.0</WindowsTargetPlatformVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<PlatformToolset>v141_xp</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<PlatformToolset>v141_xp</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">
|
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">
|
||||||
<PlatformToolset>v141_xp</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|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" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
<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" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros">
|
<PropertyGroup Label="UserMacros">
|
||||||
<DependenciesDir>../dependencies</DependenciesDir>
|
<DependenciesDir>../dependencies</DependenciesDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" />
|
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" />
|
||||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" />
|
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<AdditionalIncludeDirectories>..;../ext_includes;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;../ext_includes;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;VGM_USE_ATRAC9;VGM_USE_CELT;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;VGM_WINAMP_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;VGM_USE_ATRAC9;VGM_USE_CELT;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;VGM_WINAMP_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg7221_decode.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg7221_decode.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
<DataExecutionPrevention />
|
<DataExecutionPrevention />
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Command>"$(ProjectDir)..\version.bat" "$(ProjectDir)..\version.h" VERSION</Command>
|
<Command>"$(ProjectDir)..\version.bat" "$(ProjectDir)..\version.h" VERSION</Command>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Message>Generating version.h</Message>
|
<Message>Generating version.h</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<AdditionalIncludeDirectories>..;../ext_includes;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..;../ext_includes;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||||
<PreprocessorDefinitions>WIN32;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;VGM_USE_ATRAC9;VGM_USE_CELT;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;VGM_WINAMP_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;VGM_USE_VORBIS;VGM_USE_MPEG;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;VGM_USE_ATRAC9;VGM_USE_CELT;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;VGM_WINAMP_UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||||
<FloatingPointModel>Fast</FloatingPointModel>
|
<FloatingPointModel>Fast</FloatingPointModel>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<AdditionalDependencies>../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg7221_decode.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
<AdditionalDependencies>../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg7221_decode.lib;../ext_libs/libg719_decode.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;../ext_libs/swresample.lib;../ext_libs/libatrac9.lib;../ext_libs/libcelt-0061.lib;../ext_libs/libcelt-0110.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||||
<DataExecutionPrevention />
|
<DataExecutionPrevention />
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<TargetMachine>MachineX86</TargetMachine>
|
<TargetMachine>MachineX86</TargetMachine>
|
||||||
</Link>
|
</Link>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Command>"$(ProjectDir)..\version.bat" "$(ProjectDir)..\version.h" VERSION</Command>
|
<Command>"$(ProjectDir)..\version.bat" "$(ProjectDir)..\version.h" VERSION</Command>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
<Message>Generating version.h</Message>
|
<Message>Generating version.h</Message>
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="resource.h" />
|
<ClInclude Include="resource.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="resource.rc" />
|
<ResourceCompile Include="resource.rc" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="in_vgmstream.c" />
|
<ClCompile Include="in_vgmstream.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="$(DependenciesDir)/fdk-aac/msvc/fdk-aac.vcxproj">
|
<ProjectReference Include="$(DependenciesDir)/fdk-aac/msvc/fdk-aac.vcxproj">
|
||||||
<Project>{308e2ad5-be31-4770-9441-a8d50f56895c}</Project>
|
<Project>{308e2ad5-be31-4770-9441-a8d50f56895c}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="$(DependenciesDir)/qaac/vcproject/mp4v2/mp4v2.vcxproj">
|
<ProjectReference Include="$(DependenciesDir)/qaac/vcproject/mp4v2/mp4v2.vcxproj">
|
||||||
<Project>{86a064e2-c81b-4eee-8be0-a39a2e7c7c76}</Project>
|
<Project>{86a064e2-c81b-4eee-8be0-a39a2e7c7c76}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\ext_libs\ext_libs.vcxproj">
|
<ProjectReference Include="..\ext_libs\ext_libs.vcxproj">
|
||||||
<Project>{10e6bfc6-1e5b-46e4-ba42-f04dfbd0abff}</Project>
|
<Project>{10e6bfc6-1e5b-46e4-ba42-f04dfbd0abff}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\src\libvgmstream.vcxproj">
|
<ProjectReference Include="..\src\libvgmstream.vcxproj">
|
||||||
<Project>{54a6ad11-5369-4895-a06f-e255abb99b11}</Project>
|
<Project>{54a6ad11-5369-4895-a06f-e255abb99b11}</Project>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
</Project>
|
</Project>
|
@ -1,32 +1,32 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Header Files">
|
<Filter Include="Header Files">
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Resource Files">
|
<Filter Include="Resource Files">
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Source Files">
|
<Filter Include="Source Files">
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="resource.h">
|
<ClInclude Include="resource.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="resource.rc">
|
<ResourceCompile Include="resource.rc">
|
||||||
<Filter>Resource Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="in_vgmstream.c">
|
<ClCompile Include="in_vgmstream.c">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
|
Loading…
Reference in New Issue
Block a user