mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-02-20 20:41:08 +01:00
Merge pull request #63 from bnnm/vsbuild-io-fixes
VS builds, I/O & fixes
This commit is contained in:
commit
1b8eae012c
20
BUILD.md
20
BUILD.md
@ -2,7 +2,7 @@
|
||||
|
||||
## Compilation requirements
|
||||
|
||||
**GCC**: you need GCC and MAKE somewhere in path. In Windows this means one of these:
|
||||
**GCC**: you need GCC and MAKE somewhere in PATH. In Windows this means one of these:
|
||||
- MinGW-w64 (32bit version): https://sourceforge.net/projects/mingw-w64/
|
||||
- MSYS2 with the MinGW-w64_shell (32bit) package: https://msys2.github.io/
|
||||
|
||||
@ -33,7 +33,7 @@ mingw32-make.exe mingw_test -f Makefile ^
|
||||
SHELL=sh.exe CC=gcc.exe AR=ar.exe STRIP=strip.exe DLLTOOL=dlltool.exe WINDRES=windres.exe
|
||||
```
|
||||
|
||||
**With MSVC**: open *./vgmstream.sln* and compile in Visual Studio.
|
||||
**With MSVC**: open *./vgmstream_full.sln* and compile in Visual Studio.
|
||||
For XMPlay open *xmp-vgmstream/xmp-vgmstream.sln* instead; FDK-AAC/QAAC/others may be needed (see below).
|
||||
|
||||
|
||||
@ -42,16 +42,16 @@ Requires MSVC (foobar/SDK only links to MSVC C++ DLLs) and these dependencies:
|
||||
- foobar2000 SDK, in *(vgmstream)/../foobar/*: http://www.foobar2000.org/SDK
|
||||
- FDK-AAC, in *(vgmstream)/../fdk-aac/*: https://github.com/kode54/fdk-aac
|
||||
- QAAC, in *(vgmstream)/../qaac/*: https://github.com/kode54/qaac
|
||||
- WTL91_5321_Final includes (if needed): http://wtl.sourceforge.net/
|
||||
FDK-AAC/QAAC can be disabled by removing *VGM_USE_MP4V2* and *VGM_USE_FDKAAC*.
|
||||
- WTL (if needed), in *(vgmstream)/../WTL/*: http://wtl.sourceforge.net/
|
||||
|
||||
Open *./vgmstream.sln* as a base and add *fb2k/foo_input_vgmstream.vcxproj*, which expects the above, and all projects from those dependencies.
|
||||
Open *./vgmstream_full.sln* as a base, which expects the above dependencies. Then, depending on your VS version (like VS2015) you may need to manually do the following (in *Debug* and *Release* options):
|
||||
- Change each project's compiler version from VS2010 to your version (right click menu)
|
||||
- For *foobar2000_ATL_helpers* add *../../../WTL/Include* to the compilers's *additional includes*
|
||||
- For *foo_input_vgmstream* add *../../WTL/Include* to the compilers's *additional includes*
|
||||
- For *foo_input_vgmstream* add *../../foobar/foobar2000/shared/shared.lib* to the linker's *additional dependencies*
|
||||
|
||||
Depending on your VS version you may need to manually do the following:
|
||||
- Change each project's compiler version from VS2010 to yours
|
||||
- For foobar add *(vgmstream)/../WTL91_5321_Final/Include* to the compilers's *additional includes*
|
||||
- For foobar add *(vgmstream)/../foobar/foobar2000/shared/shared.lib* to the linker's *additional dependencies*
|
||||
VS2013 may not be compatible with the SDK.
|
||||
VS2013 may not be compatible with the SDK in release mode due to compiler bugs.
|
||||
FDK-AAC/QAAC can be disabled by removing *VGM_USE_MP4V2* and *VGM_USE_FDKAAC* in the compiler/linker options and the project dependencies.
|
||||
|
||||
|
||||
## Development
|
||||
|
@ -1,79 +1,90 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{330B53AE-4FAE-46DA-8785-9016DB4E3E23}</ProjectGuid>
|
||||
<RootNamespace>getopt</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>14.0.23107.0</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="getopt.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="getopt.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{330B53AE-4FAE-46DA-8785-9016DB4E3E23}</ProjectGuid>
|
||||
<RootNamespace>getopt</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<FloatingPointModel>Precise</FloatingPointModel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="getopt.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="getopt.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
@ -79,13 +79,13 @@
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg7221_decode.lib;../ext_libs/libg719_decode.lib;../ext_libs/at3plusdecoder.lib;../../FFmpeg/dev/lib/avcodec.lib;../../FFmpeg/dev/lib/avformat.lib;../../FFmpeg/dev/lib/avutil.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/at3plusdecoder.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(ProjectDir)version.bat" "$(ProjectDir)version.h" VERSION</Command>
|
||||
<Command>"$(ProjectDir)..\version.bat" "$(ProjectDir)..\version.h" VERSION</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Generating version.h</Message>
|
||||
@ -103,7 +103,7 @@
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg7221_decode.lib;../ext_libs/libg719_decode.lib;../ext_libs/at3plusdecoder.lib;../../FFmpeg/dev/lib/avcodec.lib;../../FFmpeg/dev/lib/avformat.lib;../../FFmpeg/dev/lib/avutil.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/at3plusdecoder.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
|
||||
@ -112,7 +112,7 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(ProjectDir)version.bat" "$(ProjectDir)version.h" VERSION</Command>
|
||||
<Command>"$(ProjectDir)..\version.bat" "$(ProjectDir)..\version.h" VERSION</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Generating version.h</Message>
|
||||
@ -122,7 +122,6 @@
|
||||
<ClInclude Include="foo_prefs.h" />
|
||||
<ClInclude Include="foo_vgmstream.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="version.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="foo_input_vgmstream.rc" />
|
||||
|
@ -24,9 +24,6 @@
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="version.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="foo_input_vgmstream.rc">
|
||||
|
@ -12,6 +12,7 @@ typedef struct _FOO_STREAMFILE {
|
||||
size_t validsize;
|
||||
uint8_t * buffer;
|
||||
size_t buffersize;
|
||||
size_t filesize;
|
||||
} FOO_STREAMFILE;
|
||||
|
||||
class input_vgmstream {
|
||||
|
@ -45,25 +45,28 @@ static size_t read_the_rest_foo(uint8_t * dest, off_t offset, size_t length, FOO
|
||||
/* read as much of the beginning of the request as possible, proceed */
|
||||
while (length>0) {
|
||||
size_t length_to_read;
|
||||
size_t length_read=0;
|
||||
size_t length_read;
|
||||
streamfile->validsize=0;
|
||||
|
||||
/* request outside file: ignore to avoid seek/read */
|
||||
if (offset > streamfile->filesize) {
|
||||
streamfile->offset = streamfile->filesize;
|
||||
memset(dest,0,length);
|
||||
return length; /* return partially-read buffer and 0-set the rest */
|
||||
}
|
||||
|
||||
/* position to new offset */
|
||||
try {
|
||||
if(offset > streamfile->m_file->get_size(*streamfile->p_abort)) {
|
||||
/* Update offset at end of file */
|
||||
streamfile->offset = streamfile->m_file->get_size(*streamfile->p_abort);
|
||||
return length_read;
|
||||
}
|
||||
streamfile->m_file->seek(offset,*streamfile->p_abort);
|
||||
//if (streamfile->m_file->is_eof(*streamfile->p_abort)) /* allow edge case of offset=filesize */
|
||||
// return length_read;
|
||||
} catch (...) {
|
||||
streamfile->offset = streamfile->m_file->get_size(*streamfile->p_abort);
|
||||
streamfile->m_file->seek(offset,*streamfile->p_abort);
|
||||
//if (streamfile->m_file->is_eof(*streamfile->p_abort)) /* allow edge case of offset=filesize */
|
||||
// return length_read;
|
||||
} catch (...) {
|
||||
streamfile->offset = streamfile->filesize;
|
||||
#ifdef PROFILE_STREAMFILE
|
||||
streamfile->error_count++;
|
||||
streamfile->error_count++;
|
||||
#endif
|
||||
return length_read; //fail miserably
|
||||
}
|
||||
return 0; //fail miserably
|
||||
}
|
||||
|
||||
streamfile->offset=offset;
|
||||
|
||||
@ -73,12 +76,12 @@ static size_t read_the_rest_foo(uint8_t * dest, off_t offset, size_t length, FOO
|
||||
|
||||
/* always try to fill the buffer */
|
||||
try {
|
||||
length_read = streamfile->m_file->read(streamfile->buffer,streamfile->buffersize,*streamfile->p_abort);
|
||||
length_read = streamfile->m_file->read(streamfile->buffer,streamfile->buffersize,*streamfile->p_abort);
|
||||
} catch(...) {
|
||||
#ifdef PROFILE_STREAMFILE
|
||||
streamfile->error_count++;
|
||||
streamfile->error_count++;
|
||||
#endif
|
||||
return length_read; //fail miserably
|
||||
return 0; //fail miserably
|
||||
}
|
||||
streamfile->validsize=length_read;
|
||||
|
||||
@ -106,25 +109,33 @@ static size_t read_the_rest_foo(uint8_t * dest, off_t offset, size_t length, FOO
|
||||
|
||||
static size_t read_foo(FOO_STREAMFILE *streamfile, uint8_t * dest, off_t offset, size_t length) {
|
||||
|
||||
if (!streamfile || !dest || length<=0) return 0;
|
||||
if (!streamfile || !dest || length<=0) return 0;
|
||||
|
||||
/* if entire request is within the buffer */
|
||||
/* if entire request is within the buffer */
|
||||
if (offset >= streamfile->offset && offset+length <= streamfile->offset+streamfile->validsize) {
|
||||
memcpy(dest,streamfile->buffer+(offset-streamfile->offset),length);
|
||||
return length;
|
||||
}
|
||||
|
||||
/* request outside file: ignore to avoid seek/read in read_the_rest_foo() */
|
||||
if (offset > streamfile->filesize) {
|
||||
streamfile->offset = streamfile->filesize;
|
||||
memset(dest, 0, length);
|
||||
return length;
|
||||
}
|
||||
|
||||
/* request outside buffer: new fread */
|
||||
return read_the_rest_foo(dest,offset,length,streamfile);
|
||||
}
|
||||
|
||||
STREAMFILE * open_foo_streamfile(const char * const filename, abort_callback * p_abort, t_filestats * stats) {
|
||||
return open_foo_streamfile_buffer(filename,STREAMFILE_DEFAULT_BUFFER_SIZE, p_abort, stats);
|
||||
return open_foo_streamfile_buffer(filename,STREAMFILE_DEFAULT_BUFFER_SIZE, p_abort, stats);
|
||||
}
|
||||
|
||||
static STREAMFILE *open_foo(FOO_STREAMFILE *streamFile,const char * const filename,size_t buffersize) {
|
||||
service_ptr_t<file> m_file;
|
||||
service_ptr_t<file> m_file;
|
||||
|
||||
STREAMFILE *newstreamFile;
|
||||
STREAMFILE *newstreamFile;
|
||||
|
||||
if (!filename)
|
||||
return NULL;
|
||||
@ -142,12 +153,11 @@ static STREAMFILE *open_foo(FOO_STREAMFILE *streamFile,const char * const filena
|
||||
}
|
||||
// a normal open, open a new file
|
||||
|
||||
return open_foo_streamfile_buffer(filename,buffersize,streamFile->p_abort,NULL);
|
||||
return open_foo_streamfile_buffer(filename,buffersize,streamFile->p_abort,NULL);
|
||||
}
|
||||
|
||||
static size_t get_size_foo(FOO_STREAMFILE * streamfile) {
|
||||
//fseeko(streamfile->infile,0,SEEK_END);
|
||||
return streamfile->m_file->get_size(*streamfile->p_abort);//ftello(streamfile->infile);
|
||||
return streamfile->filesize;
|
||||
}
|
||||
|
||||
static off_t get_offset_foo(FOO_STREAMFILE *streamFile) {
|
||||
@ -156,7 +166,7 @@ static off_t get_offset_foo(FOO_STREAMFILE *streamFile) {
|
||||
|
||||
static void close_foo(FOO_STREAMFILE * streamfile) {
|
||||
streamfile->m_file.release();
|
||||
free(streamfile->name);
|
||||
free(streamfile->name);
|
||||
free(streamfile->buffer);
|
||||
free(streamfile);
|
||||
}
|
||||
@ -190,12 +200,12 @@ static STREAMFILE * open_foo_streamfile_buffer_by_file(service_ptr_t<file> m_fil
|
||||
streamfile->sf.get_size = (size_t (__cdecl *)(_STREAMFILE *)) get_size_foo;
|
||||
streamfile->sf.get_offset = (off_t (__cdecl *)(_STREAMFILE *)) get_offset_foo;
|
||||
streamfile->sf.get_name = (void (__cdecl *)(_STREAMFILE *,char *,size_t)) get_name_foo;
|
||||
streamfile->sf.get_realname = (void (__cdecl *)(_STREAMFILE *,char *,size_t)) get_name_foo;
|
||||
streamfile->sf.get_realname = (void (__cdecl *)(_STREAMFILE *,char *,size_t)) get_name_foo;
|
||||
streamfile->sf.open = (_STREAMFILE *(__cdecl *)(_STREAMFILE *,const char *const ,size_t)) open_foo;
|
||||
streamfile->sf.close = (void (__cdecl *)(_STREAMFILE *)) close_foo;
|
||||
#ifdef PROFILE_STREAMFILE
|
||||
streamfile->sf.get_bytes_read = (void*)get_bytes_read_stdio;
|
||||
streamfile->sf.get_error_count = (void*)get_error_count_stdio;
|
||||
streamfile->sf.get_error_count = (void*)get_error_count_stdio;
|
||||
#endif
|
||||
|
||||
streamfile->m_file = m_file;
|
||||
@ -205,11 +215,14 @@ static STREAMFILE * open_foo_streamfile_buffer_by_file(service_ptr_t<file> m_fil
|
||||
streamfile->p_abort = p_abort;
|
||||
|
||||
streamfile->name = strdup(filename);
|
||||
if (!streamfile->name) {
|
||||
free(streamfile);
|
||||
free(buffer);
|
||||
return NULL;
|
||||
}
|
||||
if (!streamfile->name) {
|
||||
free(streamfile);
|
||||
free(buffer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* cache filesize */
|
||||
streamfile->filesize = streamfile->m_file->get_size(*streamfile->p_abort);
|
||||
|
||||
return &streamfile->sf;
|
||||
}
|
||||
@ -219,7 +232,7 @@ STREAMFILE * open_foo_streamfile_buffer(const char * const filename, size_t buff
|
||||
service_ptr_t<file> infile;
|
||||
|
||||
if(!(filesystem::g_exists(filename, *p_abort)))
|
||||
return NULL;
|
||||
return NULL;
|
||||
|
||||
filesystem::g_open_read(infile,filename,*p_abort);
|
||||
if(stats) *stats = infile->get_stats(*p_abort);
|
||||
|
@ -23,8 +23,10 @@ extern "C" {
|
||||
#include "../src/vgmstream.h"
|
||||
}
|
||||
#include "foo_vgmstream.h"
|
||||
#include "version.h"
|
||||
|
||||
#ifndef VERSION
|
||||
#include "../version.h"
|
||||
#endif
|
||||
#ifndef VERSION
|
||||
#define PLUGIN_VERSION __DATE__
|
||||
#else
|
||||
@ -250,6 +252,11 @@ void input_vgmstream::decode_seek(double p_seconds,abort_callback & p_abort) {
|
||||
int max_buffer_samples = sizeof(sample_buffer)/sizeof(sample_buffer[0])/vgmstream->channels;
|
||||
bool loop_okay = loop_forever && vgmstream->loop_flag && !ignore_loop && !force_ignore_loop;
|
||||
|
||||
/* start on first channel to avoid problems in some decoders */
|
||||
if (seek_pos_samples % vgmstream->channels) {
|
||||
seek_pos_samples -= seek_pos_samples % vgmstream->channels;
|
||||
}
|
||||
|
||||
int corrected_pos_samples = seek_pos_samples;
|
||||
|
||||
// adjust for correct position within loop
|
||||
|
@ -137,8 +137,6 @@ VGMSTREAM * init_vgmstream_sqex_scd(STREAMFILE *streamFile) {
|
||||
|
||||
start_offset = post_meta_offset + read_32bit(meta_offset+0x18,streamFile);
|
||||
|
||||
VGM_LOG("post_meta_offset=%lx, start_offset=%lx\n", post_meta_offset, start_offset);
|
||||
|
||||
#ifdef VGM_USE_VORBIS
|
||||
if (codec_id == 0x6)
|
||||
{
|
||||
@ -272,7 +270,9 @@ VGMSTREAM * init_vgmstream_sqex_scd(STREAMFILE *streamFile) {
|
||||
vgmstream->loop_end_sample = msadpcm_bytes_to_samples(loop_end, vgmstream->interleave_block_size, vgmstream->channels);
|
||||
}
|
||||
break;
|
||||
case 0xA:
|
||||
|
||||
case 0xA: /* Dragon Quest X (Wii) */
|
||||
case 0x15: /* Dragon Quest X (Wii U) (no apparent differences except higher sample rate) */
|
||||
/* GC/Wii DSP ADPCM */
|
||||
{
|
||||
STREAMFILE * file;
|
||||
|
@ -8,11 +8,15 @@
|
||||
typedef struct {
|
||||
STREAMFILE sf;
|
||||
FILE * infile;
|
||||
char name[PATH_LIMIT];
|
||||
off_t offset;
|
||||
size_t validsize;
|
||||
uint8_t * buffer;
|
||||
size_t buffersize;
|
||||
char name[PATH_LIMIT];
|
||||
size_t filesize;
|
||||
#ifdef VGM_DEBUG_OUTPUT
|
||||
int error_notified;
|
||||
#endif
|
||||
#ifdef PROFILE_STREAMFILE
|
||||
size_t bytes_read;
|
||||
int error_count;
|
||||
@ -47,9 +51,31 @@ static size_t read_the_rest(uint8_t * dest, off_t offset, size_t length, STDIOST
|
||||
/* read as much of the beginning of the request as possible, proceed */
|
||||
while (length>0) {
|
||||
size_t length_to_read;
|
||||
size_t length_read=0;
|
||||
size_t length_read;
|
||||
streamfile->validsize=0;
|
||||
if (fseeko(streamfile->infile,offset,SEEK_SET)) return length_read;
|
||||
|
||||
/* request outside file: ignore to avoid seek/read */
|
||||
if (offset > streamfile->filesize) {
|
||||
#ifdef VGM_DEBUG_OUTPUT
|
||||
if (!streamfile->error_notified) {
|
||||
VGM_LOG("ERROR: reading outside filesize, at offset 0x%lx + 0x%x (buggy meta?)\n", offset, length);
|
||||
streamfile->error_notified = 1;
|
||||
}
|
||||
#endif
|
||||
streamfile->offset = streamfile->filesize;
|
||||
memset(dest,0,length);
|
||||
return length; /* return partially-read buffer and 0-set the rest */
|
||||
}
|
||||
|
||||
/* position to new offset */
|
||||
if (fseeko(streamfile->infile,offset,SEEK_SET)) {
|
||||
streamfile->offset = streamfile->filesize;
|
||||
#ifdef PROFILE_STREAMFILE
|
||||
streamfile->error_count++;
|
||||
#endif
|
||||
return 0; //fail miserably
|
||||
}
|
||||
|
||||
streamfile->offset=offset;
|
||||
|
||||
/* decide how much must be read this time */
|
||||
@ -87,9 +113,8 @@ static size_t read_the_rest(uint8_t * dest, off_t offset, size_t length, STDIOST
|
||||
return length_read_total;
|
||||
}
|
||||
|
||||
static size_t read_stdio(STDIOSTREAMFILE *streamfile,uint8_t * dest, off_t offset, size_t length)
|
||||
{
|
||||
// read
|
||||
static size_t read_stdio(STDIOSTREAMFILE *streamfile,uint8_t * dest, off_t offset, size_t length) {
|
||||
|
||||
if (!streamfile || !dest || length<=0) return 0;
|
||||
|
||||
/* if entire request is within the buffer */
|
||||
@ -98,6 +123,21 @@ static size_t read_stdio(STDIOSTREAMFILE *streamfile,uint8_t * dest, off_t offse
|
||||
return length;
|
||||
}
|
||||
|
||||
/* request outside file: ignore to avoid seek/read in read_the_rest() */
|
||||
if (offset > streamfile->filesize) {
|
||||
#ifdef VGM_DEBUG_OUTPUT
|
||||
if (!streamfile->error_notified) {
|
||||
VGM_LOG("ERROR: reading outside filesize, at offset over 0x%lx (buggy meta?)\n", offset);
|
||||
streamfile->error_notified = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
streamfile->offset = streamfile->filesize;
|
||||
memset(dest,0,length);
|
||||
return length;
|
||||
}
|
||||
|
||||
/* request outside buffer: new fread */
|
||||
{
|
||||
size_t length_read = read_the_rest(dest,offset,length,streamfile);
|
||||
#if PROFILE_STREAMFILE
|
||||
@ -115,8 +155,7 @@ static void close_stdio(STDIOSTREAMFILE * streamfile) {
|
||||
}
|
||||
|
||||
static size_t get_size_stdio(STDIOSTREAMFILE * streamfile) {
|
||||
fseeko(streamfile->infile,0,SEEK_END);
|
||||
return ftello(streamfile->infile);
|
||||
return streamfile->filesize;
|
||||
}
|
||||
|
||||
static off_t get_offset_stdio(STDIOSTREAMFILE *streamFile) {
|
||||
@ -195,6 +234,10 @@ static STREAMFILE * open_stdio_streamfile_buffer_by_FILE(FILE *infile,const char
|
||||
strncpy(streamfile->name,filename,sizeof(streamfile->name));
|
||||
streamfile->name[sizeof(streamfile->name)-1] = '\0';
|
||||
|
||||
/* cache filesize */
|
||||
fseeko(streamfile->infile,0,SEEK_END);
|
||||
streamfile->filesize = ftello(streamfile->infile);
|
||||
|
||||
return &streamfile->sf;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
#define fseeko fseek
|
||||
#endif
|
||||
|
||||
#define STREAMFILE_DEFAULT_BUFFER_SIZE 0x400
|
||||
#define STREAMFILE_DEFAULT_BUFFER_SIZE 0x8000
|
||||
|
||||
#ifndef DIR_SEPARATOR
|
||||
#if defined (_WIN32) || defined (WIN32)
|
||||
|
@ -1037,6 +1037,7 @@ int get_vgmstream_samples_per_frame(VGMSTREAM * vgmstream) {
|
||||
return (vgmstream->interleave_block_size - 1) * 2; /* decodes 1 byte into 2 bytes */
|
||||
case coding_XBOX:
|
||||
case coding_INT_XBOX:
|
||||
return 64;
|
||||
case coding_EA_XA:
|
||||
return 28;
|
||||
case coding_MAXIS_ADPCM:
|
||||
@ -2240,53 +2241,66 @@ int vgmstream_open_stream(VGMSTREAM * vgmstream, STREAMFILE *streamFile, off_t s
|
||||
STREAMFILE * file;
|
||||
char filename[PATH_LIMIT];
|
||||
int ch;
|
||||
int buffer_size = STREAMFILE_DEFAULT_BUFFER_SIZE;
|
||||
int use_streamfile_per_channel = 0;
|
||||
int use_same_offset_per_channel = 0;
|
||||
|
||||
#ifdef VGM_USE_FFMPEG
|
||||
if (vgmstream->coding_type == coding_FFmpeg) /* not needed */
|
||||
if (vgmstream->coding_type == coding_FFmpeg) /* stream not needed, FFmpeg manages itself */
|
||||
return 1;
|
||||
#endif
|
||||
|
||||
/* minor optimizations */
|
||||
if (vgmstream->layout_type == layout_interleave
|
||||
&&vgmstream->interleave_block_size > 0
|
||||
&& vgmstream->interleave_block_size > buffer_size) {
|
||||
buffer_size = vgmstream->interleave_block_size;
|
||||
/* if interleave is big enough keep a buffer per channel */
|
||||
if (vgmstream->interleave_block_size >= STREAMFILE_DEFAULT_BUFFER_SIZE) {
|
||||
use_streamfile_per_channel = 1;
|
||||
}
|
||||
|
||||
if (buffer_size > 0x8000) {
|
||||
buffer_size = 0x8000;
|
||||
/* todo if interleave is big enough open one streamfile per channel so each uses it's own buffer */
|
||||
if (vgmstream->layout_type == layout_none
|
||||
//#ifdef VGM_USE_MPEG || (vgmstream->layout_type == layout_mpeg) #endif //no appreciable difference
|
||||
) {
|
||||
/* for some codecs like IMA where channels work with the same bytes *///todo which ones?
|
||||
use_same_offset_per_channel = 1;
|
||||
}
|
||||
|
||||
|
||||
streamFile->get_name(streamFile,filename,sizeof(filename));
|
||||
/* open the file for reading by each channel */
|
||||
{
|
||||
file = streamFile->open(streamFile,filename,buffer_size);
|
||||
if (!file) return 0;
|
||||
if (!use_streamfile_per_channel) {
|
||||
file = streamFile->open(streamFile,filename, STREAMFILE_DEFAULT_BUFFER_SIZE);
|
||||
if (!file) goto fail;
|
||||
}
|
||||
|
||||
for (ch=0; ch < vgmstream->channels; ch++) {
|
||||
off_t offset;
|
||||
if (use_same_offset_per_channel) {
|
||||
offset = start_offset;
|
||||
} else {
|
||||
offset = start_offset + vgmstream->interleave_block_size*ch;
|
||||
}
|
||||
|
||||
/* open new one if needed */
|
||||
if (use_streamfile_per_channel) {
|
||||
file = streamFile->open(streamFile,filename, STREAMFILE_DEFAULT_BUFFER_SIZE);
|
||||
if (!file) goto fail;
|
||||
}
|
||||
|
||||
vgmstream->ch[ch].streamfile = file;
|
||||
|
||||
if (vgmstream->layout_type == layout_none
|
||||
#ifdef VGM_USE_MPEG
|
||||
|| vgmstream->layout_type == layout_mpeg //todo simplify using flag "start offset"
|
||||
#endif
|
||||
) { /* no appreciable difference for mpeg */
|
||||
/* for some codecs like IMA where channels work with the same bytes */
|
||||
vgmstream->ch[ch].channel_start_offset =
|
||||
vgmstream->ch[ch].offset = start_offset;
|
||||
}
|
||||
else {
|
||||
vgmstream->ch[ch].channel_start_offset =
|
||||
vgmstream->ch[ch].offset = start_offset
|
||||
+ vgmstream->interleave_block_size*ch;
|
||||
}
|
||||
vgmstream->ch[ch].channel_start_offset =
|
||||
vgmstream->ch[ch].offset = offset;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
|
||||
fail:
|
||||
if (!use_streamfile_per_channel) {
|
||||
streamFile->close(file); /* only one file was ever open */
|
||||
} else {
|
||||
for (ch=0; ch < vgmstream->channels; ch++) {
|
||||
if (vgmstream->ch[ch].streamfile)
|
||||
streamFile->close(vgmstream->ch[ch].streamfile); /* close all open files */
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -14,11 +14,13 @@
|
||||
#endif
|
||||
|
||||
#ifndef VERSION
|
||||
/* To include the git version number / commit in test.exe, compile outside of Visual Studio and make sure git / sh is in the current PATH */
|
||||
#define VERSION ""
|
||||
#include "../version.h"
|
||||
#endif
|
||||
#ifndef VERSION
|
||||
#define VERSION "(unknown version)"
|
||||
#endif
|
||||
|
||||
#define BUFSIZE 4000
|
||||
#define BUFSIZE 0x8000
|
||||
|
||||
extern char * optarg;
|
||||
extern int optind, opterr, optopt;
|
||||
|
@ -9,23 +9,39 @@
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Template|Win32">
|
||||
<Configuration>Template</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{AF7D88A0-3CB1-4CD8-BAD1-0305EB996D69}</ProjectGuid>
|
||||
<RootNamespace>test</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@ -38,69 +54,71 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>14.0.23107.0</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir>$(Configuration)\</IntDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>..\ext_libs\Getopt;..\ext_includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../ext_libs/Getopt;../ext_includes;../../qaac/mp4v2/include;../../fdk-aac/libSYS/include;../../fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;VGM_USE_MAIATRAC3PLUS;_DEBUG;_WINDOWS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<ForcedIncludeFiles>%(ForcedIncludeFiles)</ForcedIncludeFiles>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>libg719_decode.lib;libg7221_decode.lib;libmpg123-0.lib;libvorbis.lib;at3plusdecoder.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\ext_libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg7221_decode.lib;../ext_libs/libg719_decode.lib;../ext_libs/at3plusdecoder.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(ProjectDir)..\version.bat" "$(ProjectDir)..\version.h" VERSION</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Generating version.h</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<PreBuildEvent>
|
||||
<Command>
|
||||
</Command>
|
||||
</PreBuildEvent>
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>..\ext_libs\Getopt;..\ext_includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;VGM_USE_G7221;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader />
|
||||
<AdditionalIncludeDirectories>../ext_libs/Getopt;../ext_includes;../../qaac/mp4v2/include;../../fdk-aac/libSYS/include;../../fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;VGM_USE_MAIATRAC3PLUS;NDEBUG;_WINDOWS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<ForcedIncludeFiles>%(ForcedIncludeFiles)</ForcedIncludeFiles>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>libg719_decode.lib;libg7221_decode.lib;libmpg123-0.lib;libvorbis.lib;at3plusdecoder.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>..\ext_libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg7221_decode.lib;../ext_libs/libg719_decode.lib;../ext_libs/at3plusdecoder.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(ProjectDir)..\version.bat" "$(ProjectDir)..\version.h" VERSION</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Generating version.h</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="test.c" />
|
||||
@ -109,9 +127,6 @@
|
||||
<ProjectReference Include="..\..\fdk-aac\msvc\fdk-aac.vcxproj">
|
||||
<Project>{308e2ad5-be31-4770-9441-a8d50f56895c}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\libg719_decode\g719.vcxproj">
|
||||
<Project>{82f4986a-b8da-4ad3-981a-4d26cc94a88e}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\qaac\vcproject\mp4v2\mp4v2.vcxproj">
|
||||
<Project>{86a064e2-c81b-4eee-8be0-a39a2e7c7c76}</Project>
|
||||
</ProjectReference>
|
||||
|
@ -1,5 +1,8 @@
|
||||
@echo off
|
||||
|
||||
REM creates or updates version.h
|
||||
REM params: $1=filename (usually version.h), $2=VARNAME (usually VERSION)
|
||||
|
||||
setlocal enableextensions enabledelayedexpansion
|
||||
|
||||
cd /d "%~dp0"
|
||||
@ -10,7 +13,7 @@ if not "%version%"=="" set version=!version:^:=_!
|
||||
|
||||
if not "%version%"=="" goto :gotversion
|
||||
|
||||
if exist "..\version.mk" goto :getversion
|
||||
if exist "version.mk" goto :getversion
|
||||
|
||||
echo Git cannot be found, nor can version.mk. Generating unknown version.
|
||||
|
||||
@ -20,7 +23,7 @@ goto :gotversion
|
||||
|
||||
:getversion
|
||||
|
||||
for /f "delims== tokens=2" %%v in (..\version.mk) do set version=%%v
|
||||
for /f "delims== tokens=2" %%v in (version.mk) do set version=%%v
|
||||
|
||||
set version=!version:^"=!
|
||||
set version=!version: =!
|
||||
@ -34,8 +37,8 @@ echo %version_out%> %1_temp
|
||||
|
||||
if %version%==unknown goto :skipgenerate
|
||||
|
||||
echo # static version string; update manually before and after every release.> "..\version.mk"
|
||||
echo %version_mk%>> "..\version.mk"
|
||||
echo # static version string; update manually before and after every release.> "version.mk"
|
||||
echo %version_mk%>> "version.mk"
|
||||
|
||||
:skipgenerate
|
||||
|
0
fb2k/version.h → version.h
Executable file → Normal file
0
fb2k/version.h → version.h
Executable file → Normal file
145
vgmstream_full.sln
Normal file
145
vgmstream_full.sln
Normal file
@ -0,0 +1,145 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvgmstream", "src\libvgmstream.vcxproj", "{54A6AD11-5369-4895-A06F-E255ABB99B11}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ext_libs", "ext_libs\ext_libs.vcxproj", "{10E6BFC6-1E5B-46E4-BA42-F04DFBD0ABFF}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "getopt", "ext_libs\Getopt\getopt.vcxproj", "{330B53AE-4FAE-46DA-8785-9016DB4E3E23}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fdk-aac", "..\fdk-aac\msvc\fdk-aac.vcxproj", "{308E2AD5-BE31-4770-9441-A8D50F56895C}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mp4v2", "..\qaac\vcproject\mp4v2\mp4v2.vcxproj", "{86A064E2-C81B-4EEE-8BE0-A39A2E7C7C76}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test\test.vcxproj", "{AF7D88A0-3CB1-4CD8-BAD1-0305EB996D69}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "in_vgmstream", "winamp\in_vgmstream.vcxproj", "{42D86561-8CE4-40F5-86CE-58C986B77502}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foo_input_vgmstream", "fb2k\foo_input_vgmstream.vcxproj", "{F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foobar2000_SDK", "..\foobar\foobar2000\SDK\foobar2000_SDK.vcxproj", "{E8091321-D79D-4575-86EF-064EA1A4A20D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foobar2000_sdk_helpers", "..\foobar\foobar2000\helpers\foobar2000_sdk_helpers.vcxproj", "{EE47764E-A202-4F85-A767-ABDAB4AFF35F}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foobar2000_ATL_helpers", "..\foobar\foobar2000\ATLHelpers\foobar2000_ATL_helpers.vcxproj", "{622E8B19-8109-4717-BD4D-9657AA78363E}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "foobar2000_component_client", "..\foobar\foobar2000\foobar2000_component_client\foobar2000_component_client.vcxproj", "{71AD2674-065B-48F5-B8B0-E1F9D3892081}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pfc", "..\foobar\pfc\pfc.vcxproj", "{EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
Template|Win32 = Template|Win32
|
||||
Template|x64 = Template|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{54A6AD11-5369-4895-A06F-E255ABB99B11}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{54A6AD11-5369-4895-A06F-E255ABB99B11}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{54A6AD11-5369-4895-A06F-E255ABB99B11}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{54A6AD11-5369-4895-A06F-E255ABB99B11}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{54A6AD11-5369-4895-A06F-E255ABB99B11}.Release|Win32.Build.0 = Release|Win32
|
||||
{54A6AD11-5369-4895-A06F-E255ABB99B11}.Release|x64.ActiveCfg = Release|Win32
|
||||
{54A6AD11-5369-4895-A06F-E255ABB99B11}.Template|Win32.ActiveCfg = Release|Win32
|
||||
{54A6AD11-5369-4895-A06F-E255ABB99B11}.Template|Win32.Build.0 = Release|Win32
|
||||
{54A6AD11-5369-4895-A06F-E255ABB99B11}.Template|x64.ActiveCfg = Release|Win32
|
||||
{54A6AD11-5369-4895-A06F-E255ABB99B11}.Template|x64.Build.0 = Release|Win32
|
||||
{10E6BFC6-1E5B-46E4-BA42-F04DFBD0ABFF}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{10E6BFC6-1E5B-46E4-BA42-F04DFBD0ABFF}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{10E6BFC6-1E5B-46E4-BA42-F04DFBD0ABFF}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{10E6BFC6-1E5B-46E4-BA42-F04DFBD0ABFF}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{10E6BFC6-1E5B-46E4-BA42-F04DFBD0ABFF}.Release|Win32.Build.0 = Release|Win32
|
||||
{10E6BFC6-1E5B-46E4-BA42-F04DFBD0ABFF}.Release|x64.ActiveCfg = Release|Win32
|
||||
{10E6BFC6-1E5B-46E4-BA42-F04DFBD0ABFF}.Template|Win32.ActiveCfg = Release|Win32
|
||||
{10E6BFC6-1E5B-46E4-BA42-F04DFBD0ABFF}.Template|Win32.Build.0 = Release|Win32
|
||||
{10E6BFC6-1E5B-46E4-BA42-F04DFBD0ABFF}.Template|x64.ActiveCfg = Release|Win32
|
||||
{10E6BFC6-1E5B-46E4-BA42-F04DFBD0ABFF}.Template|x64.Build.0 = Release|Win32
|
||||
{330B53AE-4FAE-46DA-8785-9016DB4E3E23}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{330B53AE-4FAE-46DA-8785-9016DB4E3E23}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{330B53AE-4FAE-46DA-8785-9016DB4E3E23}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{330B53AE-4FAE-46DA-8785-9016DB4E3E23}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{330B53AE-4FAE-46DA-8785-9016DB4E3E23}.Release|Win32.Build.0 = Release|Win32
|
||||
{330B53AE-4FAE-46DA-8785-9016DB4E3E23}.Release|x64.ActiveCfg = Release|Win32
|
||||
{330B53AE-4FAE-46DA-8785-9016DB4E3E23}.Template|Win32.ActiveCfg = Release|Win32
|
||||
{330B53AE-4FAE-46DA-8785-9016DB4E3E23}.Template|Win32.Build.0 = Release|Win32
|
||||
{330B53AE-4FAE-46DA-8785-9016DB4E3E23}.Template|x64.ActiveCfg = Release|Win32
|
||||
{330B53AE-4FAE-46DA-8785-9016DB4E3E23}.Template|x64.Build.0 = Release|Win32
|
||||
{F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Release|Win32.Build.0 = Release|Win32
|
||||
{F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Release|x64.ActiveCfg = Release|Win32
|
||||
{F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Template|Win32.ActiveCfg = Template|Win32
|
||||
{F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Template|Win32.Build.0 = Template|Win32
|
||||
{F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}.Template|x64.ActiveCfg = Template|Win32
|
||||
{EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Debug|x64.Build.0 = Debug|x64
|
||||
{EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|Win32.Build.0 = Release|Win32
|
||||
{EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|x64.ActiveCfg = Release|x64
|
||||
{EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Release|x64.Build.0 = Release|x64
|
||||
{EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Template|Win32.ActiveCfg = Release|Win32
|
||||
{EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Template|Win32.Build.0 = Release|Win32
|
||||
{EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Template|x64.ActiveCfg = Release|x64
|
||||
{EBFFFB4E-261D-44D3-B89C-957B31A0BF9C}.Template|x64.Build.0 = Release|x64
|
||||
{E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E8091321-D79D-4575-86EF-064EA1A4A20D}.Debug|x64.Build.0 = Debug|x64
|
||||
{E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|Win32.Build.0 = Release|Win32
|
||||
{E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|x64.ActiveCfg = Release|x64
|
||||
{E8091321-D79D-4575-86EF-064EA1A4A20D}.Release|x64.Build.0 = Release|x64
|
||||
{E8091321-D79D-4575-86EF-064EA1A4A20D}.Template|Win32.ActiveCfg = Release|Win32
|
||||
{E8091321-D79D-4575-86EF-064EA1A4A20D}.Template|Win32.Build.0 = Release|Win32
|
||||
{E8091321-D79D-4575-86EF-064EA1A4A20D}.Template|x64.ActiveCfg = Release|x64
|
||||
{E8091321-D79D-4575-86EF-064EA1A4A20D}.Template|x64.Build.0 = Release|x64
|
||||
{EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Debug|x64.Build.0 = Debug|x64
|
||||
{EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|Win32.Build.0 = Release|Win32
|
||||
{EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|x64.ActiveCfg = Release|x64
|
||||
{EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Release|x64.Build.0 = Release|x64
|
||||
{EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Template|Win32.ActiveCfg = Release|Win32
|
||||
{EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Template|Win32.Build.0 = Release|Win32
|
||||
{EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Template|x64.ActiveCfg = Release|x64
|
||||
{EE47764E-A202-4F85-A767-ABDAB4AFF35F}.Template|x64.Build.0 = Release|x64
|
||||
{622E8B19-8109-4717-BD4D-9657AA78363E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{622E8B19-8109-4717-BD4D-9657AA78363E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{622E8B19-8109-4717-BD4D-9657AA78363E}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{622E8B19-8109-4717-BD4D-9657AA78363E}.Debug|x64.Build.0 = Debug|x64
|
||||
{622E8B19-8109-4717-BD4D-9657AA78363E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{622E8B19-8109-4717-BD4D-9657AA78363E}.Release|Win32.Build.0 = Release|Win32
|
||||
{622E8B19-8109-4717-BD4D-9657AA78363E}.Release|x64.ActiveCfg = Release|x64
|
||||
{622E8B19-8109-4717-BD4D-9657AA78363E}.Release|x64.Build.0 = Release|x64
|
||||
{622E8B19-8109-4717-BD4D-9657AA78363E}.Template|Win32.ActiveCfg = Release|Win32
|
||||
{622E8B19-8109-4717-BD4D-9657AA78363E}.Template|Win32.Build.0 = Release|Win32
|
||||
{622E8B19-8109-4717-BD4D-9657AA78363E}.Template|x64.ActiveCfg = Release|x64
|
||||
{622E8B19-8109-4717-BD4D-9657AA78363E}.Template|x64.Build.0 = Release|x64
|
||||
{71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{71AD2674-065B-48F5-B8B0-E1F9D3892081}.Debug|x64.Build.0 = Debug|x64
|
||||
{71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|Win32.Build.0 = Release|Win32
|
||||
{71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|x64.ActiveCfg = Release|x64
|
||||
{71AD2674-065B-48F5-B8B0-E1F9D3892081}.Release|x64.Build.0 = Release|x64
|
||||
{71AD2674-065B-48F5-B8B0-E1F9D3892081}.Template|Win32.ActiveCfg = Release|Win32
|
||||
{71AD2674-065B-48F5-B8B0-E1F9D3892081}.Template|Win32.Build.0 = Release|Win32
|
||||
{71AD2674-065B-48F5-B8B0-E1F9D3892081}.Template|x64.ActiveCfg = Release|x64
|
||||
{71AD2674-065B-48F5-B8B0-E1F9D3892081}.Template|x64.Build.0 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -23,7 +23,10 @@
|
||||
#include "resource.h"
|
||||
|
||||
#ifndef VERSION
|
||||
#define VERSION
|
||||
#include "../version.h"
|
||||
#endif
|
||||
#ifndef VERSION
|
||||
#define VERSION "(unknown version)"
|
||||
#endif
|
||||
|
||||
#define APP_NAME "vgmstream plugin"
|
||||
|
@ -9,20 +9,39 @@
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Template|Win32">
|
||||
<Configuration>Template</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{42D86561-8CE4-40F5-86CE-58C986B77502}</ProjectGuid>
|
||||
<RootNamespace>in_vgmstream</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<SccProjectName>
|
||||
</SccProjectName>
|
||||
<SccAuxPath>
|
||||
</SccAuxPath>
|
||||
<SccLocalPath>
|
||||
</SccLocalPath>
|
||||
<SccProvider>
|
||||
</SccProvider>
|
||||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">
|
||||
<PlatformToolset>v100</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
@ -35,59 +54,75 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>14.0.23107.0</_ProjectFileVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>Debug\</OutDir>
|
||||
<IntDir>Debug\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>Release\</OutDir>
|
||||
<IntDir>Release\</IntDir>
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Template|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Template|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../ext_includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>../ext_includes;../../qaac/mp4v2/include;../../fdk-aac/libSYS/include;../../fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;VGM_USE_MAIATRAC3PLUS;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg7221_decode.lib;../ext_libs/libg719_decode.lib;../ext_libs/at3plusdecoder.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/at3plusdecoder.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention />
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(ProjectDir)..\version.bat" "$(ProjectDir)..\version.h" VERSION</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Generating version.h</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>../ext_includes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeader />
|
||||
<AdditionalIncludeDirectories>../ext_includes;../../qaac/mp4v2/include;../../fdk-aac/libSYS/include;../../fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN32_WINNT=0x501;WIN32;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;VGM_USE_MAIATRAC3PLUS;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<FloatingPointModel>Fast</FloatingPointModel>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg7221_decode.lib;../ext_libs/libg719_decode.lib;../ext_libs/at3plusdecoder.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile />
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<AdditionalDependencies>../ext_libs/libvorbis.lib;../ext_libs/libmpg123-0.lib;../ext_libs/libg7221_decode.lib;../ext_libs/libg719_decode.lib;../ext_libs/at3plusdecoder.lib;../ext_libs/avcodec.lib;../ext_libs/avformat.lib;../ext_libs/avutil.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<RandomizedBaseAddress>false</RandomizedBaseAddress>
|
||||
<DataExecutionPrevention />
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(ProjectDir)..\version.bat" "$(ProjectDir)..\version.h" VERSION</Command>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>
|
||||
<Message>Generating version.h</Message>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="resource.h" />
|
||||
@ -102,9 +137,6 @@
|
||||
<ProjectReference Include="..\..\fdk-aac\msvc\fdk-aac.vcxproj">
|
||||
<Project>{308e2ad5-be31-4770-9441-a8d50f56895c}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\libg719_decode\g719.vcxproj">
|
||||
<Project>{82f4986a-b8da-4ad3-981a-4d26cc94a88e}</Project>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\qaac\vcproject\mp4v2\mp4v2.vcxproj">
|
||||
<Project>{86a064e2-c81b-4eee-8be0-a39a2e7c7c76}</Project>
|
||||
</ProjectReference>
|
||||
|
@ -16,11 +16,12 @@
|
||||
#include "../src/formats.h"
|
||||
#include "../src/vgmstream.h"
|
||||
#include "xmpin.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
#ifndef VERSION
|
||||
#define VERSION
|
||||
#include "../version.h"
|
||||
#endif
|
||||
#ifndef VERSION
|
||||
#define VERSION "(unknown version)"
|
||||
#endif
|
||||
|
||||
static XMPFUNC_IN *xmpfin;
|
||||
|
@ -1,50 +0,0 @@
|
||||
@echo off
|
||||
|
||||
setlocal enableextensions enabledelayedexpansion
|
||||
|
||||
cd /d "%~dp0"
|
||||
|
||||
for /f %%v in ('git describe --always --tag') do set version=%%v
|
||||
|
||||
set version=!version:^:=_!
|
||||
|
||||
if not "%version%"=="" goto :gotversion
|
||||
|
||||
if exist "..\version.mk" goto :getversion
|
||||
|
||||
echo Git cannot be found, nor can version.mk. Generating unknown version.
|
||||
|
||||
set version=unknown
|
||||
|
||||
goto :gotversion
|
||||
|
||||
:getversion
|
||||
|
||||
for /f "delims== tokens=2" %%v in (..\version.mk) do set version=%%v
|
||||
|
||||
set version=!version:^"=!
|
||||
set version=!version: =!
|
||||
|
||||
:gotversion
|
||||
|
||||
set version_out=#define %2 "%version%"
|
||||
set version_mk=%2 = "%version%"
|
||||
|
||||
echo %version_out%> %1_temp
|
||||
|
||||
if %version%==unknown goto :skipgenerate
|
||||
|
||||
echo # static version string; update manually before and after every release.> "..\version.mk"
|
||||
echo %version_mk%>> "..\version.mk"
|
||||
|
||||
:skipgenerate
|
||||
|
||||
echo n | comp %1_temp %1 > NUL 2> NUL
|
||||
|
||||
if not errorlevel 1 goto exit
|
||||
|
||||
copy /y %1_temp %1 > NUL 2> NUL
|
||||
|
||||
:exit
|
||||
|
||||
del %1_temp
|
@ -66,7 +66,7 @@
|
||||
<ModuleDefinitionFile>xmpin.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(ProjectDir)version.bat" "$(ProjectDir)version.h" VERSION</Command>
|
||||
<Command>"$(ProjectDir)..\version.bat" "$(ProjectDir)..\version.h" VERSION</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
@ -89,14 +89,13 @@
|
||||
<ModuleDefinitionFile>xmpin.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<PreBuildEvent>
|
||||
<Command>"$(ProjectDir)version.bat" "$(ProjectDir)version.h" VERSION</Command>
|
||||
<Command>"$(ProjectDir)..\version.bat" "$(ProjectDir)..\version.h" VERSION</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="DllMain.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="version.h" />
|
||||
<ClInclude Include="xmpfunc.h" />
|
||||
<ClInclude Include="xmpin.h" />
|
||||
</ItemGroup>
|
||||
|
@ -4,7 +4,6 @@
|
||||
<ClCompile Include="DllMain.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="version.h" />
|
||||
<ClInclude Include="xmpfunc.h" />
|
||||
<ClInclude Include="xmpin.h" />
|
||||
</ItemGroup>
|
||||
|
Loading…
x
Reference in New Issue
Block a user