mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-31 04:13:47 +01:00
cleanup: minor compiler warnings, etc
This commit is contained in:
parent
a6fc7546fe
commit
bb445efea1
@ -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,89 +1,89 @@
|
|||||||
<?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>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<PropertyGroup Label="Globals">
|
||||||
<ProjectGuid>{330B53AE-4FAE-46DA-8785-9016DB4E3E23}</ProjectGuid>
|
<ProjectGuid>{330B53AE-4FAE-46DA-8785-9016DB4E3E23}</ProjectGuid>
|
||||||
<RootNamespace>getopt</RootNamespace>
|
<RootNamespace>getopt</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>
|
||||||
</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>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<PlatformToolset>v141_xp</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||||
<PlatformToolset>v141_xp</PlatformToolset>
|
<PlatformToolset>v141_xp</PlatformToolset>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</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" />
|
||||||
<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'" />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<FloatingPointModel>Precise</FloatingPointModel>
|
<FloatingPointModel>Precise</FloatingPointModel>
|
||||||
<PrecompiledHeader>
|
<PrecompiledHeader>
|
||||||
</PrecompiledHeader>
|
</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<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>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="getopt.c" />
|
<ClCompile Include="getopt.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="getopt.h" />
|
<ClInclude Include="getopt.h" />
|
||||||
</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,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>
|
@ -131,7 +131,7 @@ static void transform(int32_t* invbuf, int32_t* tmpbuf) {
|
|||||||
for (lpc1 = 0; lpc1 < 12 - 2; lpc1++) {
|
for (lpc1 = 0; lpc1 < 12 - 2; lpc1++) {
|
||||||
int sub1, sub2;
|
int sub1, sub2;
|
||||||
int i1, i2, i3, i4;
|
int i1, i2, i3, i4;
|
||||||
int64_t cos1, sin1, cos2, sin2; /* needs i64 to force 64b ops (avoid overflows) */
|
int64_t cos1, sin1, cos2, sin2; /* needs i64 to force 64b ops (avoid overflows) then converted to i32 */
|
||||||
|
|
||||||
cos1 = (int64_t)sincos_table[sc1 + 1024];
|
cos1 = (int64_t)sincos_table[sc1 + 1024];
|
||||||
sin1 = (int64_t)sincos_table[sc1 + 0];
|
sin1 = (int64_t)sincos_table[sc1 + 0];
|
||||||
@ -153,8 +153,8 @@ static void transform(int32_t* invbuf, int32_t* tmpbuf) {
|
|||||||
sub2 = tmpbuf[i1 + 1] - tmpbuf[i2 + 1];
|
sub2 = tmpbuf[i1 + 1] - tmpbuf[i2 + 1];
|
||||||
invbuf[i1 + 1] += invbuf[i2 + 1];
|
invbuf[i1 + 1] += invbuf[i2 + 1];
|
||||||
tmpbuf[i1 + 1] += tmpbuf[i2 + 1];
|
tmpbuf[i1 + 1] += tmpbuf[i2 + 1];
|
||||||
invbuf[i2 + 1] = ((sub1 * cos1) >> 12) + ((sub2 * sin1) >> 12);
|
invbuf[i2 + 1] = (int32_t)( ((sub1 * cos1) >> 12) + ((sub2 * sin1) >> 12) );
|
||||||
tmpbuf[i2 + 1] = ((sub2 * cos1) >> 12) - ((sub1 * sin1) >> 12);
|
tmpbuf[i2 + 1] = (int32_t)( ((sub2 * cos1) >> 12) - ((sub1 * sin1) >> 12) );
|
||||||
|
|
||||||
sub1 = invbuf[i3 + 0] - invbuf[i4 + 0];
|
sub1 = invbuf[i3 + 0] - invbuf[i4 + 0];
|
||||||
sub2 = tmpbuf[i3 + 0] - tmpbuf[i4 + 0];
|
sub2 = tmpbuf[i3 + 0] - tmpbuf[i4 + 0];
|
||||||
@ -167,8 +167,8 @@ static void transform(int32_t* invbuf, int32_t* tmpbuf) {
|
|||||||
sub2 = tmpbuf[i3 + 1] - tmpbuf[i4 + 1];
|
sub2 = tmpbuf[i3 + 1] - tmpbuf[i4 + 1];
|
||||||
invbuf[i3 + 1] += invbuf[i4 + 1];
|
invbuf[i3 + 1] += invbuf[i4 + 1];
|
||||||
tmpbuf[i3 + 1] += tmpbuf[i4 + 1];
|
tmpbuf[i3 + 1] += tmpbuf[i4 + 1];
|
||||||
invbuf[i4 + 1] = ((sub2 * cos1) >> 12) - ((sub1 * sin1) >> 12);
|
invbuf[i4 + 1] = (int32_t)( ((sub2 * cos1) >> 12) - ((sub1 * sin1) >> 12) );
|
||||||
tmpbuf[i4 + 1] = -(((sub1 * cos1) >> 12) + ((sub2 * sin1) >> 12));
|
tmpbuf[i4 + 1] = (int32_t)( -(((sub1 * cos1) >> 12) + ((sub2 * sin1) >> 12)) );
|
||||||
|
|
||||||
i1 += step1;
|
i1 += step1;
|
||||||
i2 += step1;
|
i2 += step1;
|
||||||
@ -194,15 +194,15 @@ static void transform(int32_t* invbuf, int32_t* tmpbuf) {
|
|||||||
sub2 = tmpbuf[i1] - tmpbuf[i2];
|
sub2 = tmpbuf[i1] - tmpbuf[i2];
|
||||||
invbuf[i1] += invbuf[i2];
|
invbuf[i1] += invbuf[i2];
|
||||||
tmpbuf[i1] += tmpbuf[i2];
|
tmpbuf[i1] += tmpbuf[i2];
|
||||||
invbuf[i2] = ((sub1 * cos2) >> 12) + ((sub2 * sin2) >> 12);
|
invbuf[i2] = (int32_t)( ((sub1 * cos2) >> 12) + ((sub2 * sin2) >> 12) );
|
||||||
tmpbuf[i2] = ((sub2 * cos2) >> 12) - ((sub1 * sin2) >> 12);
|
tmpbuf[i2] = (int32_t)( ((sub2 * cos2) >> 12) - ((sub1 * sin2) >> 12) );
|
||||||
|
|
||||||
sub1 = invbuf[i3] - invbuf[i4];
|
sub1 = invbuf[i3] - invbuf[i4];
|
||||||
sub2 = tmpbuf[i3] - tmpbuf[i4];
|
sub2 = tmpbuf[i3] - tmpbuf[i4];
|
||||||
invbuf[i3] += invbuf[i4];
|
invbuf[i3] += invbuf[i4];
|
||||||
tmpbuf[i3] += tmpbuf[i4];
|
tmpbuf[i3] += tmpbuf[i4];
|
||||||
invbuf[i4] = ((sub2 * cos2) >> 12) - ((sub1 * sin2) >> 12);
|
invbuf[i4] = (int32_t)( ((sub2 * cos2) >> 12) - ((sub1 * sin2) >> 12) );
|
||||||
tmpbuf[i4] = -(((sub1 * cos2) >> 12) + ((sub2 * sin2) >> 12));
|
tmpbuf[i4] = (int32_t)( -(((sub1 * cos2) >> 12) + ((sub2 * sin2) >> 12)) );
|
||||||
|
|
||||||
i1 += step1;
|
i1 += step1;
|
||||||
i2 += step1;
|
i2 += step1;
|
||||||
|
@ -100,7 +100,7 @@ fail:
|
|||||||
|
|
||||||
/* for simple style speex (seen in EA-Speex and libspeex's sampledec.c) */
|
/* for simple style speex (seen in EA-Speex and libspeex's sampledec.c) */
|
||||||
static int read_frame(speex_codec_data* data, VGMSTREAMCHANNEL* stream) {
|
static int read_frame(speex_codec_data* data, VGMSTREAMCHANNEL* stream) {
|
||||||
uint8_t bytes;
|
size_t bytes;
|
||||||
|
|
||||||
data->frame_size = read_u8(stream->offset, stream->streamfile);
|
data->frame_size = read_u8(stream->offset, stream->streamfile);
|
||||||
stream->offset += 0x01;
|
stream->offset += 0x01;
|
||||||
|
@ -60,7 +60,6 @@ static void wasf_get_name(WINAMP_STREAMFILE* sf, char* buffer, size_t length) {
|
|||||||
|
|
||||||
static STREAMFILE *wasf_open(WINAMP_STREAMFILE* sf, const char* const filename, size_t buffersize) {
|
static STREAMFILE *wasf_open(WINAMP_STREAMFILE* sf, const char* const filename, size_t buffersize) {
|
||||||
in_char wpath[PATH_LIMIT];
|
in_char wpath[PATH_LIMIT];
|
||||||
char name[PATH_LIMIT];
|
|
||||||
|
|
||||||
if (!filename)
|
if (!filename)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -69,23 +68,25 @@ static STREAMFILE *wasf_open(WINAMP_STREAMFILE* sf, const char* const filename,
|
|||||||
/* When enabling this for MSVC it'll seemingly work, but there are issues possibly related to underlying
|
/* When enabling this for MSVC it'll seemingly work, but there are issues possibly related to underlying
|
||||||
* IO buffers when using dup(), noticeable by re-opening the same streamfile with small buffer sizes
|
* IO buffers when using dup(), noticeable by re-opening the same streamfile with small buffer sizes
|
||||||
* (reads garbage). This reportedly causes issues in Android too */
|
* (reads garbage). This reportedly causes issues in Android too */
|
||||||
|
{
|
||||||
|
char name[PATH_LIMIT];
|
||||||
|
sf->stdiosf->get_name(sf->stdiosf, name, PATH_LIMIT);
|
||||||
|
/* if same name, duplicate the file descriptor we already have open */ //unsure if all this is needed
|
||||||
|
if (sf->infile_ref && !strcmp(name,filename)) {
|
||||||
|
int new_fd;
|
||||||
|
FILE *new_file;
|
||||||
|
|
||||||
sf->stdiosf->get_name(sf->stdiosf, name, PATH_LIMIT);
|
if (((new_fd = dup(fileno(sf->infile_ref))) >= 0) && (new_file = wa_fdopen(new_fd))) {
|
||||||
/* if same name, duplicate the file descriptor we already have open */ //unsure if all this is needed
|
STREAMFILE *new_sf = open_winamp_streamfile_by_file(new_file, filename);
|
||||||
if (sf->infile_ref && !strcmp(name,filename)) {
|
if (new_sf)
|
||||||
int new_fd;
|
return new_sf;
|
||||||
FILE *new_file;
|
fclose(new_file);
|
||||||
|
}
|
||||||
|
if (new_fd >= 0 && !new_file)
|
||||||
|
close(new_fd); /* fdopen may fail when opening too many files */
|
||||||
|
|
||||||
if (((new_fd = dup(fileno(sf->infile_ref))) >= 0) && (new_file = wa_fdopen(new_fd))) {
|
/* on failure just close and try the default path (which will probably fail a second time) */
|
||||||
STREAMFILE *new_sf = open_winamp_streamfile_by_file(new_file, filename);
|
|
||||||
if (new_sf)
|
|
||||||
return new_sf;
|
|
||||||
fclose(new_file);
|
|
||||||
}
|
}
|
||||||
if (new_fd >= 0 && !new_file)
|
|
||||||
close(new_fd); /* fdopen may fail when opening too many files */
|
|
||||||
|
|
||||||
/* on failure just close and try the default path (which will probably fail a second time) */
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
<?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>
|
||||||
<ClCompile Include="xmp_vgmstream.c" />
|
<ClCompile Include="xmp_vgmstream.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="xmpfunc.h" />
|
<ClInclude Include="xmpfunc.h" />
|
||||||
<ClInclude Include="xmpin.h" />
|
<ClInclude Include="xmpin.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="xmpin.def" />
|
<None Include="xmpin.def" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="External libraries">
|
<Filter Include="External libraries">
|
||||||
<UniqueIdentifier>{6505ad02-c535-487f-bcb4-745b0a6cb8e7}</UniqueIdentifier>
|
<UniqueIdentifier>{6505ad02-c535-487f-bcb4-745b0a6cb8e7}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
@ -629,7 +629,7 @@ double WINAPI xmplay_GetGranularity() {
|
|||||||
/* seek to a position (in granularity units), return new position or -1 = failed */
|
/* seek to a position (in granularity units), return new position or -1 = failed */
|
||||||
double WINAPI xmplay_SetPosition(DWORD pos) {
|
double WINAPI xmplay_SetPosition(DWORD pos) {
|
||||||
double cpos;
|
double cpos;
|
||||||
int seek_sample = pos * xmplay_GetGranularity() * vgmstream->sample_rate;
|
int32_t seek_sample = (int32_t)(pos * xmplay_GetGranularity() * vgmstream->sample_rate);
|
||||||
|
|
||||||
if (pos == XMPIN_POS_AUTOLOOP || pos == XMPIN_POS_LOOP)
|
if (pos == XMPIN_POS_AUTOLOOP || pos == XMPIN_POS_LOOP)
|
||||||
xmplay_doneloop = 1;
|
xmplay_doneloop = 1;
|
||||||
@ -714,10 +714,9 @@ static DWORD WINAPI xmplay_GetSubSongs(float *length) {
|
|||||||
/* get times for all subsongs */
|
/* get times for all subsongs */
|
||||||
//todo request updating playlist update every subsong change instead?
|
//todo request updating playlist update every subsong change instead?
|
||||||
{
|
{
|
||||||
int stream_length_samples;
|
|
||||||
|
|
||||||
/* not good for vgmstream as would mean re-parsing many times */
|
/* not good for vgmstream as would mean re-parsing many times */
|
||||||
//int i;
|
//int i;
|
||||||
|
//*length = 0;
|
||||||
//for (i = 0; i < subsong_count; i++) {
|
//for (i = 0; i < subsong_count; i++) {
|
||||||
// float subsong_length = ...
|
// float subsong_length = ...
|
||||||
// *length += subsong_length;
|
// *length += subsong_length;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user