Merge pull request #202 from bnnm/waf-atsl

WAF, ATSL
This commit is contained in:
Christopher Snowhill 2018-03-03 17:35:03 -08:00 committed by GitHub
commit 6fccb2a529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
34 changed files with 968 additions and 1327 deletions

View File

@ -5,10 +5,11 @@
**GCC / Make**: In Windows this means one of these two somewhere in PATH:
- MinGW-w64 (32bit version): https://sourceforge.net/projects/mingw-w64/
- Use this for easier standalone executables
- Latest online installer with any config should work (for example: gcc-7.2.0, i686, win32, sjlj).
- MSYS2 with the MinGW-w64_shell (32bit) package: https://msys2.github.io/
**MSVC / Visual Studio**: Microsoft's Visual C++ and MSBuild, bundled in either:
- Visual Studio 2017: https://www.visualstudio.com/downloads/
- Visual Studio (2015/2017/latest): https://www.visualstudio.com/downloads/
- Visual Studio Community should work (free, but must register after trial period)
- Visual C++ Build Tools (no IDE): http://landinghub.visualstudio.com/visual-cpp-build-tools
@ -20,7 +21,7 @@
### CLI (test.exe/vgmstream-cli) / Winamp plugin (in_vgmstream) / XMPlay plugin (xmp-vgmstream)
**With GCC**: use the *./Makefile* in the root folder, see inside for options. For compilation flags check the *Makefile* in each folder.
You need to manually rebuild if you change a *.h* file (use *make clean*).
You may need to manually rebuild if you change a *.h* file (use *make clean*).
In Linux, Makefiles can be used to cross-compile with the MingW headers, but may not be updated to generate native code at the moment. It should be fixable with some effort. Autotools should build it as vgmstream-cli instead (see the Audacious section).
@ -33,13 +34,15 @@ set PATH=C:\Program Files (x86)\mingw-w64\i686-5.4.0-win32-sjlj-rt_v5-rev0\mingw
cd vgmstream
mingw32-make.exe vgmstream_cli -f Makefile ^
VGM_ENABLE_FFMPEG=1 VGM_ENABLE_MAIATRAC3PLUS=0 ^
VGM_ENABLE_FFMPEG=1 ^
SHELL=sh.exe CC=gcc.exe AR=ar.exe STRIP=strip.exe DLLTOOL=dlltool.exe WINDRES=windres.exe
```
**With MSVC**: To build in Visual Studio, run *./init-build.bat*, open *./vgmstream_full.sln* and compile. To build from the command line, run *./build.bat*.
The build script will automatically handle obtaining dependencies and making the project changes listed in the foobar2000 section.
The build script will automatically handle obtaining dependencies and making the project changes listed in the foobar2000 section (you may need to get some PowerShell .NET packages).
You can also call MSBuild directly in the command line (see the foobar2000 section for dependencies and examples)
### foobar2000 plugin (foo\_input\_vgmstream)
Requires MSVC (foobar/SDK only links to MSVC C++ DLLs) and these dependencies:
@ -51,9 +54,31 @@ Requires MSVC (foobar/SDK only links to MSVC C++ DLLs) and these dependencies:
The following project modifications are required:
- For *foobar2000_ATL_helpers* add *../../../WTL/Include* to the compilers's *additional includes*
FDK-AAC/QAAC can be safely disabled by removing *VGM_USE_MP4V2* and *VGM_USE_FDKAAC* in the compiler/linker options and the project dependencies, MAIATRAC3 too, as FFmpeg is used instead to support their codecs.
FDK-AAC/QAAC can be safely disabled by removing *VGM_USE_MP4V2* and *VGM_USE_FDKAAC* in the compiler/linker options and the project dependencies, as FFmpeg is used instead to support their codecs.
You can also use the command line to compile with MSBuild, if you don't want to touch the .vcxproj files, register VS2017 after trial, or only have VC++/MSBuild tools.
You can also manually use the command line to compile with MSBuild, if you don't want to touch the .vcxproj files, register VS after trial, get PowerShell dependencies for the build script, or only have VC++/MSBuild tools.
Windows CMD example for foobar2000:
```
prompt $P$G$_$S
set PATH=C:\Program Files (x86)\Git\usr\bin;%PATH%
set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
cd vgmstream
set CL=/I"C:\projects\WTL\Include"
set LINK="C:\projects\foobar\foobar2000\shared\shared.lib"
msbuild fb2k/foo_input_vgmstream.vcxproj ^
/t:Clean
msbuild fb2k/foo_input_vgmstream.vcxproj ^
/t:Build ^
/p:Platform=Win32 ^
/p:PlatformToolset=v140 ^
/p:Configuration=Release ^
/p:DependenciesDir=../..
```
### Audacious plugin
Requires the dev version of Audacious (and dependencies), automake/autoconf, and gcc/make (C++11). It must be compiled and installed into Audacious, where it should appear in the plugin list as "vgmstream".

View File

@ -52,7 +52,9 @@
<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 Label="UserMacros">
<DependenciesDir>../dependencies</DependenciesDir>
</PropertyGroup>
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
@ -68,7 +70,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../ext_libs/Getopt;../ext_includes;../dependencies/qaac/mp4v2/include;../dependencies/fdk-aac/libSYS/include;../dependencies/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_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;_DEBUG;_WINDOWS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -94,7 +96,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>../ext_libs/Getopt;../ext_includes;../dependencies/qaac/mp4v2/include;../dependencies/fdk-aac/libSYS/include;../dependencies/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_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;NDEBUG;_WINDOWS;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
@ -124,10 +126,10 @@
<ClCompile Include="vgmstream_cli.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\dependencies\fdk-aac\msvc\fdk-aac.vcxproj">
<ProjectReference Include="$(DependenciesDir)/fdk-aac/msvc/fdk-aac.vcxproj">
<Project>{308e2ad5-be31-4770-9441-a8d50f56895c}</Project>
</ProjectReference>
<ProjectReference Include="..\dependencies\qaac\vcproject\mp4v2\mp4v2.vcxproj">
<ProjectReference Include="$(DependenciesDir)/qaac/vcproject/mp4v2/mp4v2.vcxproj">
<Project>{86a064e2-c81b-4eee-8be0-a39a2e7c7c76}</Project>
</ProjectReference>
<ProjectReference Include="..\ext_libs\ext_libs.vcxproj">

View File

@ -308,7 +308,7 @@ int main(int argc, char ** argv) {
if (!play_sdtout && !print_adxencd && !print_oggenc && !print_batchvar) {
printf("samples to play: %d (%.4lf seconds)\n", len_samples, (double)len_samples / vgmstream->sample_rate);
}
fade_samples = fade_seconds * vgmstream->sample_rate;
fade_samples = (int32_t)(fade_seconds * vgmstream->sample_rate);
if (loop_count > 0 && ignore_fade) {
vgmstream->loop_target = (int)loop_count;
@ -356,7 +356,7 @@ int main(int argc, char ** argv) {
if (samples_into_fade > 0) {
double fadedness = (double)(fade_samples-samples_into_fade)/fade_samples;
for (k = 0; k < vgmstream->channels; k++) {
buf[j*vgmstream->channels+k] = buf[j*vgmstream->channels+k]*fadedness;
buf[j*vgmstream->channels+k] = (sample)buf[j*vgmstream->channels+k]*fadedness;
}
}
}
@ -423,7 +423,7 @@ int main(int argc, char ** argv) {
if (samples_into_fade > 0) {
double fadedness = (double)(fade_samples-samples_into_fade)/fade_samples;
for (k = 0; k < vgmstream->channels; k++) {
buf[j*vgmstream->channels+k] = buf[j*vgmstream->channels+k]*fadedness;
buf[j*vgmstream->channels+k] = (sample)buf[j*vgmstream->channels+k]*fadedness;
}
}
}

View File

@ -52,7 +52,9 @@
<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 Label="UserMacros">
<DependenciesDir>../dependencies</DependenciesDir>
</PropertyGroup>
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
@ -68,7 +70,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\dependencies\wtl\include;../ext_includes;..\dependencies\foobar\foobar2000\SDK;..\dependencies\foobar\foobar2000\shared;..\dependencies\foobar\foobar2000;../dependencies/qaac/mp4v2/include;../dependencies/fdk-aac/libSYS/include;../dependencies/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../ext_includes;$(DependenciesDir)/WTL/Include;$(DependenciesDir)/foobar/foobar2000/SDK;$(DependenciesDir)/foobar/foobar2000/shared;$(DependenciesDir)/foobar/foobar2000;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -81,8 +83,8 @@
<AdditionalOptions>/d2notypeopt %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>../dependencies/foobar/foobar2000/shared/shared.lib;../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;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>../dependencies/foobar/foobar2000/shared/shared.lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(DependenciesDir)/foobar/foobar2000/shared/shared.lib;../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;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DependenciesDir)/foobar/foobar2000/shared/shared.lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
@ -95,7 +97,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\dependencies\wtl\include;../ext_includes;..\dependencies\foobar\foobar2000\SDK;..\dependencies\foobar\foobar2000\shared;..\dependencies\foobar\foobar2000;../dependencies/qaac/mp4v2/include;../dependencies/fdk-aac/libSYS/include;../dependencies/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>../ext_includes;$(DependenciesDir)/WTL/Include;$(DependenciesDir)/foobar/foobar2000/SDK;$(DependenciesDir)/foobar/foobar2000/shared;$(DependenciesDir)/foobar/foobar2000;$(DependenciesDir)/qaac/mp4v2/include;$(DependenciesDir)/fdk-aac/libSYS/include;$(DependenciesDir)/fdk-aac/libAACdec/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
@ -107,8 +109,8 @@
<AdditionalOptions>/d2notypeopt</AdditionalOptions>
</ClCompile>
<Link>
<AdditionalDependencies>../dependencies/foobar/foobar2000/shared/shared.lib;../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;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>../dependencies/foobar/foobar2000/shared/shared.lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>$(DependenciesDir)/foobar/foobar2000/shared/shared.lib;../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;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(DependenciesDir)/foobar/foobar2000/shared/shared.lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<DelayLoadDLLs>%(DelayLoadDLLs)</DelayLoadDLLs>
<OptimizeReferences>true</OptimizeReferences>
@ -137,25 +139,25 @@
<ClCompile Include="foo_vgmstream.cpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\dependencies\fdk-aac\msvc\fdk-aac.vcxproj">
<ProjectReference Include="$(DependenciesDir)/fdk-aac/msvc/fdk-aac.vcxproj">
<Project>{308e2ad5-be31-4770-9441-a8d50f56895c}</Project>
</ProjectReference>
<ProjectReference Include="..\dependencies\foobar\foobar2000\ATLHelpers\foobar2000_ATL_helpers.vcxproj">
<ProjectReference Include="$(DependenciesDir)/foobar/foobar2000/ATLHelpers/foobar2000_ATL_helpers.vcxproj">
<Project>{622e8b19-8109-4717-bd4d-9657aa78363e}</Project>
</ProjectReference>
<ProjectReference Include="..\dependencies\foobar\foobar2000\foobar2000_component_client\foobar2000_component_client.vcxproj">
<ProjectReference Include="$(DependenciesDir)/foobar/foobar2000/foobar2000_component_client/foobar2000_component_client.vcxproj">
<Project>{71ad2674-065b-48f5-b8b0-e1f9d3892081}</Project>
</ProjectReference>
<ProjectReference Include="..\dependencies\foobar\foobar2000\helpers\foobar2000_sdk_helpers.vcxproj">
<ProjectReference Include="$(DependenciesDir)/foobar/foobar2000/helpers/foobar2000_sdk_helpers.vcxproj">
<Project>{ee47764e-a202-4f85-a767-abdab4aff35f}</Project>
</ProjectReference>
<ProjectReference Include="..\dependencies\foobar\foobar2000\SDK\foobar2000_SDK.vcxproj">
<ProjectReference Include="$(DependenciesDir)/foobar/foobar2000/SDK/foobar2000_SDK.vcxproj">
<Project>{e8091321-d79d-4575-86ef-064ea1a4a20d}</Project>
</ProjectReference>
<ProjectReference Include="..\dependencies\foobar\pfc\pfc.vcxproj">
<ProjectReference Include="$(DependenciesDir)/foobar/pfc/pfc.vcxproj">
<Project>{ebfffb4e-261d-44d3-b89c-957b31a0bf9c}</Project>
</ProjectReference>
<ProjectReference Include="..\dependencies\qaac\vcproject\mp4v2\mp4v2.vcxproj">
<ProjectReference Include="$(DependenciesDir)/qaac/vcproject/mp4v2/mp4v2.vcxproj">
<Project>{86a064e2-c81b-4eee-8be0-a39a2e7c7c76}</Project>
</ProjectReference>
<ProjectReference Include="..\ext_libs\ext_libs.vcxproj">

View File

@ -436,20 +436,19 @@ fail:
static void ms_audio_get_samples(ms_sample_data * msd, STREAMFILE *streamFile, int start_packet, int channels_per_packet, int bytes_per_packet, int samples_per_frame, int samples_per_subframe, int bits_frame_size) {
int frames = 0, samples = 0, loop_start_frame = 0, loop_end_frame = 0, start_skip = 0, end_skip = 0;
uint32_t first_frame_b, packet_skip_count = 0, frame_size_b, packet_size_b, header_size_b;
uint64_t offset_b, packet_offset_b, frame_offset_b;
size_t size;
size_t first_frame_b, packet_skip_count = 0, frame_size_b, packet_size_b, header_size_b;
off_t offset_b, packet_offset_b, frame_offset_b;
uint32_t packet_size = bytes_per_packet;
size_t packet_size = bytes_per_packet;
off_t offset = msd->data_offset;
uint32_t stream_offset_b = msd->data_offset * 8;
off_t max_offset = msd->data_offset + msd->data_size;
off_t stream_offset_b = msd->data_offset * 8;
offset += start_packet * packet_size;
size = offset + msd->data_size;
packet_size_b = packet_size * 8;
/* read packets */
while (offset < size) {
while (offset < max_offset) {
offset_b = offset * 8; /* global offset in bits */
offset += packet_size; /* global offset in bytes */
@ -678,7 +677,7 @@ void wmapro_get_samples(ms_sample_data * msd, STREAMFILE *streamFile, int block_
return;
}
samples_per_frame = wma_get_samples_per_frame(version, sample_rate, decode_flags);
bits_frame_size = floor(log(block_align) / log(2)) + 4; /* max bits needed to represent this block_align */
bits_frame_size = (int)floor(log(block_align) / log(2)) + 4; /* max bits needed to represent this block_align */
samples_per_subframe = 0; /* not really needed WMAPro can't use loop subframes (complex subframe lengths) */
msd->xma_version = 0; /* signal it's not XMA */
@ -705,7 +704,8 @@ void wma_get_samples(ms_sample_data * msd, STREAMFILE *streamFile, int block_ali
else {
/* variable frames per packet (mini-header values) */
off_t offset = msd->data_offset;
while (offset < msd->data_size) { /* read packets (superframes) */
off_t max_offset = msd->data_offset + msd->data_size;
while (offset < max_offset) { /* read packets (superframes) */
int packet_frames;
uint8_t header = read_8bit(offset, streamFile); /* upper nibble: index; lower nibble: frames */

View File

@ -177,7 +177,7 @@ void decode_pcmfloat(VGMSTREAMCHANNEL * stream, sample * outbuf, int channelspac
int sample_pcm;
sample_float = (float*)&sample_int;
sample_pcm = floor((*sample_float) * 32767.f + .5f);
sample_pcm = (int)floor((*sample_float) * 32767.f + .5f);
outbuf[sample_count] = clamp16(sample_pcm);
}

View File

@ -180,7 +180,7 @@ static void pcm_convert_float_to_16(vorbis_custom_codec_data * data, sample * ou
sample *ptr = outbuf + i;
float *mono = pcm[i];
for (j = 0; j < samples_to_do; j++) {
int val = floor(mono[j] * 32767.f + .5f);
int val = (int)floor(mono[j] * 32767.f + .5f);
if (val > 32767) val = 32767;
if (val < -32768) val = -32768;

View File

@ -13,11 +13,11 @@
/* DEFS */
/* **************************************************************************** */
static int build_header_identification(uint8_t * buf, size_t bufsize, int channels, int sample_rate, int blocksize_short, int blocksize_long);
static int build_header_comment(uint8_t * buf, size_t bufsize);
static int get_packet_header(STREAMFILE *streamFile, off_t offset, wwise_header_t header_type, int * granulepos, size_t * packet_size, int big_endian);
static int rebuild_packet(uint8_t * obuf, size_t obufsize, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian);
static int rebuild_setup(uint8_t * obuf, size_t obufsize, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian, int channels);
static size_t build_header_identification(uint8_t * buf, size_t bufsize, int channels, int sample_rate, int blocksize_short, int blocksize_long);
static size_t build_header_comment(uint8_t * buf, size_t bufsize);
static size_t get_packet_header(STREAMFILE *streamFile, off_t offset, wwise_header_t header_type, int * granulepos, size_t * packet_size, int big_endian);
static size_t rebuild_packet(uint8_t * obuf, size_t obufsize, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian);
static size_t rebuild_setup(uint8_t * obuf, size_t obufsize, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian, int channels);
static int ww2ogg_generate_vorbis_packet(vgm_bitstream * ow, vgm_bitstream * iw, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian);
static int ww2ogg_generate_vorbis_setup(vgm_bitstream * ow, vgm_bitstream * iw, vorbis_custom_codec_data * data, int channels, size_t packet_size, STREAMFILE *streamFile);
@ -126,7 +126,7 @@ fail:
/* **************************************************************************** */
/* loads info from a wwise packet header */
static int get_packet_header(STREAMFILE *streamFile, off_t offset, wwise_header_t header_type, int * granulepos, size_t * packet_size, int big_endian) {
static size_t get_packet_header(STREAMFILE *streamFile, off_t offset, wwise_header_t header_type, int * granulepos, size_t * packet_size, int big_endian) {
int32_t (*read_32bit)(off_t,STREAMFILE*) = big_endian ? read_32bitBE : read_32bitLE;
int16_t (*read_16bit)(off_t,STREAMFILE*) = big_endian ? read_16bitBE : read_16bitLE;
@ -153,7 +153,7 @@ static int get_packet_header(STREAMFILE *streamFile, off_t offset, wwise_header_
}
/* Transforms a Wwise data packet into a real Vorbis one (depending on config) */
static int rebuild_packet(uint8_t * obuf, size_t obufsize, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian) {
static size_t rebuild_packet(uint8_t * obuf, size_t obufsize, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian) {
vgm_bitstream ow, iw;
int rc, granulepos;
size_t header_size, packet_size;
@ -196,7 +196,7 @@ fail:
/* Transforms a Wwise setup packet into a real Vorbis one (depending on config). */
static int rebuild_setup(uint8_t * obuf, size_t obufsize, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian, int channels) {
static size_t rebuild_setup(uint8_t * obuf, size_t obufsize, STREAMFILE *streamFile, off_t offset, vorbis_custom_codec_data * data, int big_endian, int channels) {
vgm_bitstream ow, iw;
int rc, granulepos;
size_t header_size, packet_size;
@ -238,8 +238,8 @@ fail:
return 0;
}
static int build_header_identification(uint8_t * buf, size_t bufsize, int channels, int sample_rate, int blocksize_0_exp, int blocksize_1_exp) {
int bytes = 0x1e;
static size_t build_header_identification(uint8_t * buf, size_t bufsize, int channels, int sample_rate, int blocksize_0_exp, int blocksize_1_exp) {
size_t bytes = 0x1e;
uint8_t blocksizes;
if (bytes > bufsize) return 0;
@ -260,8 +260,8 @@ static int build_header_identification(uint8_t * buf, size_t bufsize, int channe
return bytes;
}
static int build_header_comment(uint8_t * buf, size_t bufsize) {
int bytes = 0x19;
static size_t build_header_comment(uint8_t * buf, size_t bufsize) {
size_t bytes = 0x19;
if (bytes > bufsize) return 0;

View File

@ -43,7 +43,9 @@ static const char* extension_list[] = {
"ast",
"at3",
"at9",
"atsl",
"atsl3",
"atsl4",
"atx",
"aud",
"aus",
@ -237,6 +239,7 @@ static const char* extension_list[] = {
"psnd",
"psw",
"rac", //txth/reserved [Manhunt (Xbox)]
"rak",
"ras",
"raw",
@ -351,6 +354,7 @@ static const char* extension_list[] = {
"waa",
"wac",
"wad",
"waf",
"wam",
"was",
//"wav", //common
@ -650,8 +654,8 @@ static const meta_info meta_info_list[] = {
{meta_CFN, "tri-Crescendo CAF Header"},
{meta_PS2_VPK, "VPK Header"},
{meta_GENH, "GENH Generic Header"},
{meta_DSP_SADB, "sadb header"},
{meta_SADL, "sadl header"},
{meta_DSP_SADB, "Procyon Studio SADB header"},
{meta_SADL, "Procyon Studio SADL header"},
{meta_PS2_BMDX, "Beatmania .bmdx header"},
{meta_DSP_WSI, ".wsi header"},
{meta_AIFC, "Audio Interchange File Format AIFF-C"},
@ -726,7 +730,7 @@ static const meta_info meta_info_list[] = {
{meta_NGC_YMF, "YMF DSP Header"},
{meta_PS2_CCC, "CCC Header"},
{meta_PSX_FAG, "FAG Header"},
{meta_PS2_MIHB, "Merged MIH+MIB"},
{meta_PS2_MIHB, "MIH+MIB header"},
{meta_DSP_WII_MUS, "mus header"},
{meta_WII_SNG, "SNG DSP Header"},
{meta_RSD2VAG, "RSD2/VAG Header"},
@ -792,8 +796,8 @@ static const meta_info meta_info_list[] = {
{meta_ZSD, "ZSD Header"},
{meta_RedSpark, "RedSpark Header"},
{meta_PC_IVAUD, "assumed GTA IV Audio file by .ivaud extension"},
{meta_DSP_WII_WSD, "Standard Nintendo DSP headers in .wsd"},
{meta_WII_NDP, "Vertigo NDP Header"},
{meta_DSP_WII_WSD, ".WSD header"},
{meta_WII_NDP, "Icon Games NDP header"},
{meta_PS2_SPS, "Ape Escape 2 SPS Header"},
{meta_PS2_XA2_RRP, "Acclaim XA2 Header"},
{meta_NDS_HWAS, "Vicarious Visions HWAS header"},
@ -812,7 +816,7 @@ static const meta_info meta_info_list[] = {
{meta_MAXIS_XA, "Maxis XAI/XAJ Header"},
{meta_EXAKT_SC, "assumed Activision / EXAKT SC by extension"},
{meta_WII_BNS, "Nintendo BNS header"},
{meta_WII_WAS, "WAS (iSWS) DSP header"},
{meta_WII_WAS, "Sumo Digital iSWS header"},
{meta_XBOX_HLWAV, "Half Life 2 bgm header"},
{meta_STX, "Nintendo .stx header"},
{meta_MYSPD, "U-Sing .MYSPD header"},
@ -822,7 +826,7 @@ static const meta_info meta_info_list[] = {
{meta_DMSG, "RIFF/DMSGsegh header"},
{meta_PONA_3DO, "Policenauts BGM header"},
{meta_PONA_PSX, "Policenauts BGM header"},
{meta_NGC_DSP_AAAP, "Double standard DSP header in 'AAAp'"},
{meta_NGC_DSP_AAAP, "Acclaim Austin AAAp header"},
{meta_NGC_DSP_KONAMI, "Konami DSP header"},
{meta_PS2_STER, "STER Header"},
{meta_BNSF, "Namco Bandai BNSF header"},
@ -835,11 +839,12 @@ static const meta_info meta_info_list[] = {
{meta_PC_SMP, "Ghostbusters .smp Header"},
{meta_NGC_PDT, "PDT DSP header"},
{meta_NGC_BO2, "Blood Omen 2 DSP header"},
{meta_DSP_DDSP, ".DDSP header"},
{meta_P3D, "Radical P3D header"},
{meta_PS2_TK1, "Tekken TK5STRM1 Header"},
{meta_PS2_ADSC, "ADSC Header"},
{meta_NGC_DSP_MPDS, "MPDS DSP header"},
{meta_DSP_STR_IG, "Infogrames dual dsp header"},
{meta_DSP_STR_IG, "Infogrames .DSP header"},
{meta_EA_SWVR, "Electronic Arts SWVR header"},
{meta_PS2_B1S, "B1S header"},
{meta_PS2_WAD, "WAD header"},
@ -852,7 +857,7 @@ static const meta_info meta_info_list[] = {
{meta_XAU, "XPEC XAU header"},
{meta_GH3_BAR, "Guitar Hero III Mobile .bar"},
{meta_FFW, "Freedom Fighters BGM header"},
{meta_DSP_DSPW, "DSPW dsp header"},
{meta_DSP_DSPW, "Capcom DSPW header"},
{meta_PS2_JSTM, "JSTM Header"},
{meta_XVAG, "Sony XVAG header"},
{meta_PS3_CPS, "tri-Crescendo CPS Header"},
@ -959,6 +964,7 @@ static const meta_info meta_info_list[] = {
{meta_SQEX_SAB, "Square-Enix SAB header"},
{meta_SQEX_MAB, "Square-Enix MAB header"},
{meta_OGG_L2SD, "Ogg Vorbis (L2SD)"},
{meta_WAF, "KID WAF header"},
#ifdef VGM_USE_MP4V2
{meta_MP4, "AAC header"},

View File

@ -277,7 +277,7 @@
>
</File>
<File
RelativePath=".\meta\atsl3.c"
RelativePath=".\meta\atsl.c"
>
</File>
<File
@ -1278,6 +1278,10 @@
RelativePath=".\meta\waa_wac_wad_wam.c"
>
</File>
<File
RelativePath=".\meta\waf.c"
>
</File>
<File
RelativePath=".\meta\wii_04sw.c"
>

View File

@ -43,7 +43,9 @@
<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 Label="UserMacros">
<DependenciesDir>../dependencies</DependenciesDir>
</PropertyGroup>
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
@ -56,7 +58,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../ext_includes;../dependencies/qaac/mp4v2/include;../dependencies/fdk-aac/libSYS/include;../dependencies/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_FFMPEG;VGM_USE_G7221;VGM_USE_G719;VGM_USE_MP4V2;VGM_USE_FDKAAC;VGM_USE_ATRAC9;USE_ALLOCA;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -70,7 +72,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>../ext_includes;../dependencies/qaac/mp4v2/include;../dependencies/fdk-aac/libSYS/include;../dependencies/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_WINNT=0x501;WIN32;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_G719;VGM_USE_MP4V2;VGM_USE_FDKAAC;VGM_USE_ATRAC9;USE_ALLOCA;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
@ -186,7 +188,7 @@
<ClCompile Include="meta\aix.c" />
<ClCompile Include="meta\apple_caff.c" />
<ClCompile Include="meta\ast.c" />
<ClCompile Include="meta\atsl3.c" />
<ClCompile Include="meta\atsl.c" />
<ClCompile Include="meta\atx.c" />
<ClCompile Include="meta\baf.c" />
<ClCompile Include="meta\bgw.c" />
@ -397,6 +399,7 @@
<ClCompile Include="meta\vsf_tta.c" />
<ClCompile Include="meta\vxn.c" />
<ClCompile Include="meta\waa_wac_wad_wam.c" />
<ClCompile Include="meta\waf.c" />
<ClCompile Include="meta\wii_04sw.c" />
<ClCompile Include="meta\wii_bns.c" />
<ClCompile Include="meta\wii_mus.c" />

View File

@ -169,7 +169,7 @@
<ClCompile Include="meta\ast.c">
<Filter>meta\Source Files</Filter>
</ClCompile>
<ClCompile Include="meta\atsl3.c">
<ClCompile Include="meta\atsl.c">
<Filter>meta\Source Files</Filter>
</ClCompile>
<ClCompile Include="meta\atx.c">
@ -781,6 +781,9 @@
<ClCompile Include="meta\waa_wac_wad_wam.c">
<Filter>meta\Source Files</Filter>
</ClCompile>
<ClCompile Include="meta\waf.c">
<Filter>meta\Source Files</Filter>
</ClCompile>
<ClCompile Include="meta\wii_04sw.c">
<Filter>meta\Source Files</Filter>
</ClCompile>

129
src/meta/atsl.c Normal file
View File

@ -0,0 +1,129 @@
#include "meta.h"
#include "../coding/coding.h"
static STREAMFILE* setup_atsl_streamfile(STREAMFILE *streamFile, off_t subfile_offset, size_t subfile_size, const char* fake_ext);
typedef enum { ATRAC3, ATRAC9, KOVS } atsl_codec;
/* .ATSL - Koei Tecmo audio container [One Piece Pirate Warriors (PS3), Warriors All-Stars (PC)] */
VGMSTREAM * init_vgmstream_atsl(STREAMFILE *streamFile) {
VGMSTREAM *vgmstream = NULL;
STREAMFILE *temp_streamFile = NULL;
int total_subsongs, target_subsong = streamFile->stream_index;
int type, big_endian = 0;
atsl_codec codec;
const char* fake_ext;
off_t subfile_offset;
size_t subfile_size, header_size;
int32_t (*read_32bit)(off_t,STREAMFILE*) = NULL;
/* check extensions
* .atsl: header id (for G1L extractions), .atsl3: PS3 games, .atsl4: PS4 games */
if ( !check_extensions(streamFile,"atsl,atsl3,atsl4"))
goto fail;
if (read_32bitBE(0x00,streamFile) != 0x4154534C) /* "ATSL" */
goto fail;
/* main header (LE) */
header_size = read_32bitLE(0x04,streamFile);
/* 0x08/0c: flags?, 0x10: fixed? (0x03E8) */
total_subsongs = read_32bitLE(0x14,streamFile);
/* 0x18: 0x28, or 0x30 (rarer) */
/* 0x1c: null, 0x20: subheader size, 0x24/28: null */
//todo: sometimes entries are repeated/dummy and point to the first entry
if (target_subsong == 0) target_subsong = 1;
if (target_subsong > total_subsongs || total_subsongs <= 0) goto fail;
/* Type byte may be wrong (could need header id tests instead).
* Example flags at 0x08/0x0c:
* - 00010101 00020001 .atsl3 from One Piece Pirate Warriors (PS3)[ATRAC3]
* - 00000201 00020001 .atsl3 from Fist of North Star: Ken's Rage 2 (PS3)[ATRAC3]
* 00000301 00020101 (same)
* - 01040301 00060301 .atsl4 from Nobunaga's Ambition: Sphere of Influence (PS4)[ATRAC9]
* - 00060301 00040301 atsl in G1L from One Piece Pirate Warriors 3 (Vita)[ATRAC9]
* - 00060301 00010301 atsl in G1L from One Piece Pirate Warriors 3 (PC)[KOVS]
* - 000A0301 00010501 atsl in G1L from Warriors All-Stars (PC)[KOVS]
*/
type = read_8bit(0x0d, streamFile);
switch(type) {
case 0x01:
codec = KOVS;
fake_ext = "kvs";
break;
case 0x02:
codec = ATRAC3;
fake_ext = "at3";
big_endian = 1;
break;
case 0x04:
case 0x06:
codec = ATRAC9;
fake_ext = "at9";
break;
default:
goto fail;
}
read_32bit = big_endian ? read_32bitBE : read_32bitLE;
/* entry header (machine endianness) */
/* 0x00: id */
subfile_offset = read_32bit(header_size + (target_subsong-1)*0x28 + 0x04,streamFile);
subfile_size = read_32bit(header_size + (target_subsong-1)*0x28 + 0x08,streamFile);
/* 0x08+: sample rate/num_samples/loop_start/etc, matching subfile header */
/* some kind of seek/switch table follows (optional, found in .atsl3) */
temp_streamFile = setup_atsl_streamfile(streamFile, subfile_offset,subfile_size, fake_ext);
if (!temp_streamFile) goto fail;
/* init the VGMSTREAM */
switch(codec) {
case ATRAC3:
case ATRAC9:
vgmstream = init_vgmstream_riff(temp_streamFile);
if (!vgmstream) goto fail;
break;
case KOVS:
vgmstream = init_vgmstream_ogg_vorbis(temp_streamFile);
if (!vgmstream) goto fail;
break;
default:
goto fail;
}
vgmstream->num_streams = total_subsongs;
close_streamfile(temp_streamFile);
return vgmstream;
fail:
close_streamfile(temp_streamFile);
close_vgmstream(vgmstream);
return NULL;
}
static STREAMFILE* setup_atsl_streamfile(STREAMFILE *streamFile, off_t subfile_offset, size_t subfile_size, const char* fake_ext) {
STREAMFILE *temp_streamFile = NULL, *new_streamFile = NULL;
/* setup subfile */
new_streamFile = open_wrap_streamfile(streamFile);
if (!new_streamFile) goto fail;
temp_streamFile = new_streamFile;
new_streamFile = open_clamp_streamfile(temp_streamFile, subfile_offset,subfile_size);
if (!new_streamFile) goto fail;
temp_streamFile = new_streamFile;
new_streamFile = open_fakename_streamfile(temp_streamFile, NULL,fake_ext);
if (!new_streamFile) goto fail;
temp_streamFile = new_streamFile;
return temp_streamFile;
fail:
close_streamfile(temp_streamFile);
return NULL;
}

View File

@ -1,76 +0,0 @@
#include "meta.h"
#include "../coding/coding.h"
static STREAMFILE* setup_atsl3_streamfile(STREAMFILE *streamFile, off_t subfile_offset, size_t subfile_size);
/* .ATSL3 - Koei Tecmo container of multiple .AT3 [One Piece Pirate Warriors (PS3)] */
VGMSTREAM * init_vgmstream_atsl3(STREAMFILE *streamFile) {
VGMSTREAM *vgmstream = NULL;
STREAMFILE *temp_streamFile = NULL;
int total_subsongs, target_subsong = streamFile->stream_index;
off_t subfile_offset;
size_t subfile_size, header_size, entry_size;
/* check extensions */
if ( !check_extensions(streamFile,"atsl3"))
goto fail;
if (read_32bitBE(0x00,streamFile) != 0x4154534C) /* "ATSL" */
goto fail;
/* main header (LE) */
header_size = read_32bitLE(0x04,streamFile);
/* 0x08/0c: flags?, 0x10: some size? */
total_subsongs = read_32bitLE(0x14,streamFile);
entry_size = read_32bitLE(0x18,streamFile);
/* 0x1c: null, 0x20: subheader size, 0x24/28: null */
if (target_subsong == 0) target_subsong = 1;
if (target_subsong > total_subsongs || total_subsongs <= 0) goto fail;
/* entry header (BE) */
/* 0x00: id */
subfile_offset = read_32bitBE(header_size + (target_subsong-1)*entry_size + 0x04,streamFile);
subfile_size = read_32bitBE(header_size + (target_subsong-1)*entry_size + 0x08,streamFile);
/* 0x08+: sample rate/num_samples/loop_start/etc, matching subfile header */
/* some kind of seek/switch table follows */
temp_streamFile = setup_atsl3_streamfile(streamFile, subfile_offset,subfile_size);
if (!temp_streamFile) goto fail;
/* init the VGMSTREAM */
vgmstream = init_vgmstream_riff(temp_streamFile);
if (!vgmstream) goto fail;
vgmstream->num_streams = total_subsongs;
close_streamfile(temp_streamFile);
return vgmstream;
fail:
close_streamfile(temp_streamFile);
close_vgmstream(vgmstream);
return NULL;
}
static STREAMFILE* setup_atsl3_streamfile(STREAMFILE *streamFile, off_t subfile_offset, size_t subfile_size) {
STREAMFILE *temp_streamFile = NULL, *new_streamFile = NULL;
/* setup subfile */
new_streamFile = open_wrap_streamfile(streamFile);
if (!new_streamFile) goto fail;
temp_streamFile = new_streamFile;
new_streamFile = open_clamp_streamfile(temp_streamFile, subfile_offset,subfile_size);
if (!new_streamFile) goto fail;
temp_streamFile = new_streamFile;
new_streamFile = open_fakename_streamfile(temp_streamFile, NULL,"at3");
if (!new_streamFile) goto fail;
temp_streamFile = new_streamFile;
return temp_streamFile;
fail:
close_streamfile(temp_streamFile);
return NULL;
}

View File

@ -17,7 +17,7 @@ typedef struct {
int block_chunk;
off_t stream_offset;
off_t stream_size;
size_t stream_size;
} awc_header;
@ -187,12 +187,15 @@ static int parse_awc_header(STREAMFILE* streamFile, awc_header* awc) {
/* get stream tags */
for (i = 0; i < tag_count; i++) {
uint64_t tag_header, tag, size, offset;
uint64_t tag_header;
uint8_t tag;
size_t size;
off_t offset;
tag_header = (uint64_t)read_64bit(off + 0x08*i,streamFile);
tag = (tag_header >> 56) & 0xFF; /* 8b */
size = (tag_header >> 28) & 0x0FFFFFFF; /* 28b */
offset = (tag_header >> 0) & 0x0FFFFFFF; /* 28b */
tag = (uint8_t)((tag_header >> 56) & 0xFF); /* 8b */
size = (size_t)((tag_header >> 28) & 0x0FFFFFFF); /* 28b */
offset = (off_t)((tag_header >> 0) & 0x0FFFFFFF); /* 28b */
/* Tags are apparently part of a hash derived from a word ("data", "format", etc).
* If music + 1ch, the header and data chunks can repeat for no reason (sometimes not even pointed). */

View File

@ -4,12 +4,12 @@
static VGMSTREAM * init_vgmstream_kt_wiibgm_offset(STREAMFILE *streamFile, off_t offset);
/* Koei Tecmo G1L - pack format, sometimes containing a single stream
*
/* Koei Tecmo G1L - container format, sometimes containing a single stream.
* It probably makes more sense to extract it externally, it's here mainly for Hyrule Warriors */
VGMSTREAM * init_vgmstream_kt_g1l(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
int type, num_streams, target_stream = streamFile->stream_index;
int type;
int total_streams, target_stream = streamFile->stream_index;
off_t stream_offset;
int32_t (*read_32bit)(off_t,STREAMFILE*) = NULL;
@ -29,23 +29,23 @@ VGMSTREAM * init_vgmstream_kt_g1l(STREAMFILE *streamFile) {
}
/* 0x08 filesize */
/* 0x0c first file offset (same as 0x18) */
/* 0x08: filesize, 0x0c: header size */
type = read_32bit(0x10,streamFile);
num_streams = read_32bit(0x14,streamFile);
total_streams = read_32bit(0x14,streamFile);
if (target_stream==0) target_stream = 1;
if (target_stream < 0 || target_stream > num_streams || num_streams < 1) goto fail;
if (target_stream < 0 || target_stream > total_streams || total_streams < 1) goto fail;
stream_offset = read_32bit(0x18 + 0x4*(target_stream-1),streamFile);
/* filesize = stream_offset - stream_next_offset*/
//stream_size = stream_offset - stream_next_offset;//not ok, sometimes entries are unordered/repeats */
switch(type) { /* type may not be correct */
case 0x09: /* DSP (WiiBGM) from Hyrule Warriors (Wii U) */
vgmstream = init_vgmstream_kt_wiibgm_offset(streamFile, stream_offset);
break;
case 0x06: /* ATRAC9 (RIFF) from One Piece Pirate Warriors 3 (Vita) */
case 0x01: /* ATRAC3plus (RIFF) from One Piece Pirate Warriors 2 (PS3) */
case 0x00: /* OGG (KOVS) from Romance Three Kindgoms 13 (PC)*/
case 0x0A: /* OGG (KOVS) from Dragon Quest Heroes (PC)*/
case 0x0A: /* OGG (KOVS) from Dragon Quest Heroes (PC), Bladestorm (PC) w/ single files */
default:
goto fail;
}

View File

@ -195,7 +195,15 @@ VGMSTREAM * init_vgmstream_genh(STREAMFILE *streamFile) {
vgmstream->layout_type = layout_none;
break;
case coding_XBOX_IMA:
if (genh.codec_mode == 1) {
if (!genh.interleave) goto fail; /* creates garbage */
coding = coding_XBOX_IMA_int;
vgmstream->layout_type = layout_interleave;
vgmstream->interleave_block_size = genh.interleave;
}
else {
vgmstream->layout_type = layout_none;
}
break;
case coding_NGC_DTK:
if (vgmstream->channels != 2) goto fail;
@ -367,14 +375,16 @@ static int parse_genh(STREAMFILE * streamFile, genh_header * genh) {
genh->num_samples = read_32bitLE(0x40,streamFile);
genh->skip_samples = read_32bitLE(0x44,streamFile); /* for FFmpeg based codecs */
genh->skip_samples_mode = read_8bit(0x48,streamFile); /* 0=autodetect, 1=force manual value @ 0x44 */
if (genh->codec == ATRAC3 || genh->codec == ATRAC3PLUS)
genh->codec_mode = read_8bit(0x49,streamFile); /* 0=autodetect, 1=force joint stereo, 2=force full stereo */
if (genh->codec == XMA1 || genh->codec == XMA2)
genh->codec_mode = read_8bit(0x4a,streamFile); /* 0=default (4ch = 2ch + 2ch), 1=single (4ch = 1ch + 1ch + 1ch + 1ch) */
genh->codec_mode = read_8bit(0x4b,streamFile);
if ((genh->codec == ATRAC3 || genh->codec == ATRAC3PLUS) && genh->codec_mode==0)
genh->codec_mode = read_8bit(0x49,streamFile);
if ((genh->codec == XMA1 || genh->codec == XMA2) && genh->codec_mode==0)
genh->codec_mode = read_8bit(0x4a,streamFile);
genh->data_size = read_32bitLE(0x50,streamFile);
if (genh->data_size == 0)
genh->data_size = get_streamfile_size(streamFile) - genh->start_offset;
genh->num_samples = genh->num_samples > 0 ? genh->num_samples : genh->loop_end_sample;
genh->loop_flag = genh->loop_start_sample != -1;

View File

@ -697,11 +697,13 @@ VGMSTREAM * init_vgmstream_fsb_encrypted(STREAMFILE * streamFile);
VGMSTREAM * init_vgmstream_xwc(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_atsl3(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_atsl(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_sps_n1(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_atx(STREAMFILE *streamFile);
VGMSTREAM * init_vgmstream_sqex_sead(STREAMFILE * streamFile);
VGMSTREAM * init_vgmstream_waf(STREAMFILE * streamFile);
#endif /*_META_H*/

File diff suppressed because it is too large Load Diff

View File

@ -193,13 +193,13 @@ VGMSTREAM * init_vgmstream_ogg_vorbis(STREAMFILE *streamFile) {
/* check extension */
if (check_extensions(streamFile,"ogg,logg")) { /* .ogg: standard/psychic, .logg: renamed for plugins */
if (check_extensions(streamFile,"ogg,logg,adx")) { /* .ogg: standard/psychic, .logg: renamed for plugins, .adx: KID [Remember11 (PC)] */
is_ogg = 1;
} else if (check_extensions(streamFile,"um3")) {
is_um3 = 1;
} else if (check_extensions(streamFile,"kvs,kovs")) { /* .kvs: Atelier Sophie (PC), kovs: header id only? */
is_kovs = 1;
} else if (check_extensions(streamFile,"sngw")) { /* .sngw: Devil May Cry 4 SE (PC), Biohazard 6 (PC) */
} else if (check_extensions(streamFile,"sngw")) { /* .sngw: Capcom [Devil May Cry 4 SE (PC), Biohazard 6 (PC)] */
is_sngw = 1;
} else if (check_extensions(streamFile,"isd")) { /* .isd: Azure Striker Gunvolt (PC) */
is_isd = 1;
@ -390,7 +390,7 @@ VGMSTREAM * init_vgmstream_ogg_vorbis_callbacks(STREAMFILE *streamFile, const ch
loop_length = atol(strrchr(user_comment,'=')+1);
loop_length_found = 1;
}
else if (strstr(user_comment,"title=-lps")==user_comment) { /* Memories Off #5 (PC) */
else if (strstr(user_comment,"title=-lps")==user_comment) { /* KID [Memories Off #5 (PC), Remember11 (PC)] */
loop_start = atol(user_comment+10);
loop_flag = (loop_start >= 0);
}

View File

@ -1,72 +1,53 @@
#include "meta.h"
#include "../util.h"
#include "../coding/coding.h"
/* MIHB (Merged MIH+MIB) */
/* MIC/MIHB - Merged MIH+MIB [Rogue Trooper (PS2), The Sims 2 (PS2)] */
VGMSTREAM * init_vgmstream_ps2_mihb(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
char filename[PATH_LIMIT];
off_t start_offset;
int mib_blocks;
int loop_flag = 0;
int channel_count;
size_t data_size, frame_size, frame_last, frame_count;
int channel_count, loop_flag;
/* check extension, case insensitive */
streamFile->get_name(streamFile,filename,sizeof(filename));
if (strcasecmp("mihb",filename_extension(filename))) goto fail;
/* check header */
if (read_32bitBE(0x00,streamFile) != 0x40000000)
/* check extension */
/* .mic: Rebellion Dev. games, .mihb: assumed? */
if (!check_extensions(streamFile, "mic,mihb"))
goto fail;
if (read_32bitBE(0x00,streamFile) != 0x40000000) /* header size */
goto fail;
mib_blocks = read_32bitLE(0x14,streamFile);
loop_flag = 0;
channel_count = read_32bitLE(0x08,streamFile);
start_offset = 0x40;
/* frame_size * frame_count * channels = data_size, but last frame has less usable data */
{
/* 0x04(1): 0x20? */
frame_last = (uint16_t)read_16bitLE(0x05,streamFile);
frame_size = read_32bitLE(0x10,streamFile);
frame_count = read_32bitLE(0x14,streamFile);
data_size = frame_count * frame_size;
data_size -= frame_last ? (frame_size-frame_last) : 0;
data_size *= channel_count;
}
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(channel_count,loop_flag);
if (!vgmstream) goto fail;
/* fill in the vital statistics */
start_offset = 0x40;
vgmstream->channels = channel_count;
vgmstream->sample_rate = read_32bitLE(0x0C,streamFile);
vgmstream->coding_type = coding_PSX;
vgmstream->num_samples = ((read_32bitLE(0x10,streamFile))*mib_blocks)*28/16;
if (loop_flag) {
vgmstream->loop_start_sample = 0;
vgmstream->loop_end_sample = ((read_32bitLE(0x10,streamFile))*mib_blocks)*28/16;
}
if (vgmstream->channels > 1) {
vgmstream->layout_type = layout_interleave;
vgmstream->interleave_block_size = read_32bitLE(0x10,streamFile);
} else {
vgmstream->layout_type = layout_none;
}
vgmstream->num_samples = ps_bytes_to_samples(data_size, channel_count);
vgmstream->meta_type = meta_PS2_MIHB;
vgmstream->coding_type = coding_PSX;
vgmstream->layout_type = layout_interleave;
vgmstream->interleave_block_size = frame_size;
/* open the file for reading */
{
int i;
STREAMFILE * file;
file = streamFile->open(streamFile,filename,STREAMFILE_DEFAULT_BUFFER_SIZE);
if (!file) goto fail;
for (i=0;i<channel_count;i++) {
vgmstream->ch[i].streamfile = file;
vgmstream->ch[i].channel_start_offset=
vgmstream->ch[i].offset=start_offset+
vgmstream->interleave_block_size*i;
}
}
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
goto fail;
return vgmstream;
/* clean up anything we may have opened */
fail:
if (vgmstream) close_vgmstream(vgmstream);
close_vgmstream(vgmstream);
return NULL;
}

View File

@ -232,9 +232,9 @@ VGMSTREAM * init_vgmstream_riff(STREAMFILE *streamFile) {
int fact_sample_skip = 0;
int loop_flag = 0;
int loop_start_sample = 0, loop_end_sample = 0;
long loop_start_ms = -1, loop_end_ms = -1;
off_t loop_start_offset = -1, loop_end_offset = -1;
int32_t loop_start_wsmp = -1, loop_end_wsmp = -1;
int32_t loop_start_smpl = -1, loop_end_smpl = -1;
int FormatChunkFound = 0, DataChunkFound = 0, JunkFound = 0;
@ -248,8 +248,9 @@ VGMSTREAM * init_vgmstream_riff(STREAMFILE *streamFile) {
/* check extension */
/* .lwav: to avoid hijacking .wav, .xwav: fake for Xbox games (unneded anymore) */
/* .da: The Great Battle VI (PS), .cd: Exector (PS), .med: Psi Ops (PC), .snd: Layton Brothers (iOS/Android) */
if ( check_extensions(streamFile, "wav,lwav,xwav,da,cd,med,snd") ) {
/* .da: The Great Battle VI (PS), .cd: Exector (PS), .med: Psi Ops (PC), .snd: Layton Brothers (iOS/Android),
* .adx: Remember11 (PC) sfx */
if ( check_extensions(streamFile, "wav,lwav,xwav,da,cd,med,snd,adx") ) {
;
}
else if ( check_extensions(streamFile, "mwv") ) {
@ -347,8 +348,8 @@ VGMSTREAM * init_vgmstream_riff(STREAMFILE *streamFile) {
* 0x2c: start, 0x30: end, 0x34: fraction, 0x38: play count */
if (read_32bitLE(current_chunk+0x08+0x28, streamFile)==0) {
loop_flag = 1;
loop_start_offset = read_32bitLE(current_chunk+0x08+0x2c, streamFile);
loop_end_offset = read_32bitLE(current_chunk+0x08+0x30, streamFile);
loop_start_smpl = read_32bitLE(current_chunk+0x08+0x2c, streamFile);
loop_end_smpl = read_32bitLE(current_chunk+0x08+0x30, streamFile);
}
}
break;
@ -363,9 +364,9 @@ VGMSTREAM * init_vgmstream_riff(STREAMFILE *streamFile) {
/* 0x14: size, 0x18: loop type (0=forward, 1=release), 0x1c: loop start, 0x20: loop length */
if (read_32bitLE(current_chunk+0x08+0x18, streamFile)==0) {
loop_flag = 1;
loop_start_sample = read_32bitLE(current_chunk+0x08+0x1c, streamFile);
loop_end_sample = read_32bitLE(current_chunk+0x08+0x20, streamFile);
loop_end_sample += loop_start_sample;
loop_start_wsmp = read_32bitLE(current_chunk+0x08+0x1c, streamFile);
loop_end_wsmp = read_32bitLE(current_chunk+0x08+0x20, streamFile);
loop_end_wsmp += loop_start_wsmp;
}
}
break;
@ -528,8 +529,8 @@ VGMSTREAM * init_vgmstream_riff(STREAMFILE *streamFile) {
/* RIFF loop/sample values are absolute (with skip samples), adjust */
if (loop_flag) {
loop_start_offset -= ffmpeg_data->skipSamples;
loop_end_offset -= ffmpeg_data->skipSamples;
loop_start_smpl -= (int32_t)ffmpeg_data->skipSamples;
loop_end_smpl -= (int32_t)ffmpeg_data->skipSamples;
}
}
break;
@ -560,8 +561,8 @@ VGMSTREAM * init_vgmstream_riff(STREAMFILE *streamFile) {
vgmstream->num_samples = fact_sample_count;
/* RIFF loop/sample values are absolute (with skip samples), adjust */
if (loop_flag) {
loop_start_offset -= fact_sample_skip;
loop_end_offset -= fact_sample_skip;
loop_start_smpl -= fact_sample_skip;
loop_end_smpl -= fact_sample_skip;
}
break;
@ -603,14 +604,14 @@ VGMSTREAM * init_vgmstream_riff(STREAMFILE *streamFile) {
vgmstream->loop_end_sample = (long long)loop_end_ms*fmt.sample_rate/1000;
vgmstream->meta_type = meta_RIFF_WAVE_labl;
}
else if (loop_start_offset >= 0) {
vgmstream->loop_start_sample = loop_start_offset;
vgmstream->loop_end_sample = loop_end_offset;
else if (loop_start_smpl >= 0) {
vgmstream->loop_start_sample = loop_start_smpl;
vgmstream->loop_end_sample = loop_end_smpl;
vgmstream->meta_type = meta_RIFF_WAVE_smpl;
}
else if (loop_start_sample >= 0) {
vgmstream->loop_start_sample = loop_start_sample;
vgmstream->loop_end_sample = loop_end_sample;
else if (loop_start_wsmp >= 0) {
vgmstream->loop_start_sample = loop_start_wsmp;
vgmstream->loop_end_sample = loop_end_wsmp;
vgmstream->meta_type = meta_RIFF_WAVE_wsmp;
}
else if (mwv && mwv_ctrl_offset != -1) {

View File

@ -322,14 +322,15 @@ static size_t sead_decryption_read(STREAMFILE *streamfile, uint8_t *dest, off_t
0x83,0x26,0xF9,0x83,0x2E,0xFF,0xE3,0x16,0x7D,0xC0,0x1E,0x63,0x21,0x07,0xE3,0x01, // F0-FF
};
size_t bytes_read;
off_t encrypted_offset = data->header_size;
int i;
bytes_read = streamfile->read(streamfile, dest, offset, length);
/* decrypt data (xor) */
if (offset >= data->header_size) {
if (offset >= encrypted_offset) {
for (i = 0; i < bytes_read; i++) {
dest[i] ^= encryption_key[(data->key_start + (offset - data->header_size) + i) % 0x100];
dest[i] ^= encryption_key[(data->key_start + (offset - encrypted_offset) + i) % 0x100];
}
}

View File

@ -206,7 +206,15 @@ VGMSTREAM * init_vgmstream_txth(STREAMFILE *streamFile) {
vgmstream->layout_type = layout_none;
break;
case coding_XBOX_IMA:
if (txth.codec_mode == 1) {
if (!txth.interleave) goto fail; /* creates garbage */
coding = coding_XBOX_IMA_int;
vgmstream->layout_type = layout_interleave;
vgmstream->interleave_block_size = txth.interleave;
}
else {
vgmstream->layout_type = layout_none;
}
break;
case coding_NGC_DTK:
if (vgmstream->channels != 2) goto fail;

43
src/meta/waf.c Normal file
View File

@ -0,0 +1,43 @@
#include "meta.h"
#include "../coding/coding.h"
/* WAF - KID's earlier PC games [ever17 (PC)] (for RLE-compressed WAFs see https://github.com/dsp2003/e17p) */
VGMSTREAM * init_vgmstream_waf(STREAMFILE *streamFile) {
VGMSTREAM * vgmstream = NULL;
off_t start_offset;
int loop_flag, channel_count;
/* check extension */
if (!check_extensions(streamFile, "waf"))
goto fail;
if (read_32bitBE(0x00,streamFile) != 0x57414600) /* "WAF\0" "*/
goto fail;
if (read_32bitLE(0x34,streamFile) + 0x38 != get_streamfile_size(streamFile))
goto fail;
channel_count = read_16bitLE(0x06,streamFile);
loop_flag = 0;
start_offset = 0x38;
/* build the VGMSTREAM */
vgmstream = allocate_vgmstream(channel_count, loop_flag);
if (!vgmstream) goto fail;
vgmstream->sample_rate = read_32bitLE(0x08, streamFile);
vgmstream->meta_type = meta_WAF;
vgmstream->coding_type = coding_MSADPCM;
vgmstream->layout_type = layout_none;
vgmstream->interleave_block_size = read_16bitLE(0x10, streamFile);
vgmstream->num_samples = msadpcm_bytes_to_samples(read_32bitLE(0x34,streamFile), vgmstream->interleave_block_size, channel_count);
/* 0x04: null?, 0x0c: avg br, 0x12: bps, 0x14: s_p_f, 0x16~34: count + standard MSADPCM coefs (a modified RIFF fmt) */
if (!vgmstream_open_stream(vgmstream,streamFile,start_offset))
goto fail;
return vgmstream;
fail:
close_vgmstream(vgmstream);
return NULL;
}

View File

@ -451,7 +451,7 @@ VGMSTREAM * init_vgmstream_wwise(STREAMFILE *streamFile) {
vgmstream->num_samples = msd.num_samples;
if (!vgmstream->num_samples)
vgmstream->num_samples = ffmpeg_data->totalSamples; /* very wrong, from avg-br */
vgmstream->num_samples = (int32_t)ffmpeg_data->totalSamples; /* very wrong, from avg-br */
//num_samples seem to be found in the last "seek" table entry too, as: entry / channels / 2
}
@ -470,7 +470,7 @@ VGMSTREAM * init_vgmstream_wwise(STREAMFILE *streamFile) {
vgmstream->coding_type = coding_FFmpeg;
vgmstream->layout_type = layout_none;
vgmstream->num_samples = ffmpeg_data->totalSamples;
vgmstream->num_samples = (int32_t)ffmpeg_data->totalSamples;
break;
}

View File

@ -420,7 +420,7 @@ VGMSTREAM * init_vgmstream_xwb(STREAMFILE *streamFile) {
/* no wma_bytes_to_samples, this should be ok */
if (!vgmstream->num_samples)
vgmstream->num_samples = ffmpeg_data->totalSamples;
vgmstream->num_samples = (int32_t)ffmpeg_data->totalSamples;
break;
}

View File

@ -492,7 +492,7 @@ static void fakename_close(FAKENAME_STREAMFILE *streamfile) {
free(streamfile);
}
STREAMFILE *open_fakename_streamfile(STREAMFILE *streamfile, char * fakename, char* fakeext) {
STREAMFILE *open_fakename_streamfile(STREAMFILE *streamfile, const char * fakename, const char* fakeext) {
FAKENAME_STREAMFILE *this_sf;
if (!streamfile || (!fakename && !fakeext)) return NULL;

View File

@ -88,7 +88,7 @@ STREAMFILE *open_io_streamfile(STREAMFILE *streamfile, void* data, size_t data_s
* Can be used to trick a meta's extension check (to call from another, with a modified SF).
* When fakename isn't supplied it's read from the streamfile, and the extension swapped with fakeext.
* If the fakename is an existing file, open won't work on it as it'll reopen the fake-named streamfile. */
STREAMFILE *open_fakename_streamfile(STREAMFILE *streamfile, char * fakename, char * fakeext);
STREAMFILE *open_fakename_streamfile(STREAMFILE *streamfile, const char * fakename, const char * fakeext);
/* A streamfile formed from multiple streamfiles, their data joined during reads.
* Can be used when data is segmented in multiple separate files.

View File

@ -375,10 +375,11 @@ VGMSTREAM * (*init_vgmstream_functions[])(STREAMFILE *streamFile) = {
init_vgmstream_kma9,
init_vgmstream_fsb_encrypted,
init_vgmstream_xwc,
init_vgmstream_atsl3,
init_vgmstream_atsl,
init_vgmstream_sps_n1,
init_vgmstream_atx,
init_vgmstream_sqex_sead,
init_vgmstream_waf,
init_vgmstream_txth, /* should go at the end (lower priority) */
#ifdef VGM_USE_FFMPEG
@ -911,9 +912,9 @@ int32_t get_vgmstream_play_samples(double looptimes, double fadeseconds, double
+ (vgmstream->num_samples - vgmstream->loop_end_sample);
}
else {
return vgmstream->loop_start_sample
return (int32_t)(vgmstream->loop_start_sample
+ (vgmstream->loop_end_sample - vgmstream->loop_start_sample) * looptimes
+ (fadedelayseconds + fadeseconds) * vgmstream->sample_rate;
+ (fadedelayseconds + fadeseconds) * vgmstream->sample_rate);
}
}
else {

View File

@ -661,6 +661,7 @@ typedef enum {
meta_SQEX_SAB, /* Square-Enix newest middleware (sound) */
meta_SQEX_MAB, /* Square-Enix newest middleware (music) */
meta_OGG_L2SD, /* Ogg Vorbis with obfuscation [Lineage II Chronicle 4 (PC)] */
meta_WAF, /* KID WAF [Ever 17 (PC)] */
#ifdef VGM_USE_MP4V2
meta_MP4, /* AAC (iOS) */

View File

@ -170,11 +170,11 @@ static off_t wasf_get_offset(WINAMP_STREAMFILE *streamfile) {
}
static void wasf_get_name(WINAMP_STREAMFILE *streamfile, char *buffer, size_t length) {
return streamfile->stdiosf->get_name(streamfile->stdiosf, buffer, length);
streamfile->stdiosf->get_name(streamfile->stdiosf, buffer, length);
}
static void wasf_get_realname(WINAMP_STREAMFILE *streamfile, char *buffer, size_t length) {
return streamfile->stdiosf->get_realname(streamfile->stdiosf, buffer, length);
streamfile->stdiosf->get_realname(streamfile->stdiosf, buffer, length);
}
static STREAMFILE *wasf_open(WINAMP_STREAMFILE *streamFile, const char *const filename, size_t buffersize) {

View File

@ -52,7 +52,9 @@
<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 Label="UserMacros">
<DependenciesDir>../dependencies</DependenciesDir>
</PropertyGroup>
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
@ -68,7 +70,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../ext_includes;../dependencies/qaac/mp4v2/include;../dependencies/fdk-aac/libSYS/include;../dependencies/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_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -96,7 +98,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>../ext_includes;../dependencies/qaac/mp4v2/include;../dependencies/fdk-aac/libSYS/include;../dependencies/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_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>
@ -134,10 +136,10 @@
<ClCompile Include="in_vgmstream.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\dependencies\fdk-aac\msvc\fdk-aac.vcxproj">
<ProjectReference Include="$(DependenciesDir)/fdk-aac/msvc/fdk-aac.vcxproj">
<Project>{308e2ad5-be31-4770-9441-a8d50f56895c}</Project>
</ProjectReference>
<ProjectReference Include="..\dependencies\qaac\vcproject\mp4v2\mp4v2.vcxproj">
<ProjectReference Include="$(DependenciesDir)/qaac/vcproject/mp4v2/mp4v2.vcxproj">
<Project>{86a064e2-c81b-4eee-8be0-a39a2e7c7c76}</Project>
</ProjectReference>
<ProjectReference Include="..\ext_libs\ext_libs.vcxproj">

View File

@ -43,7 +43,9 @@
<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 Label="UserMacros">
<DependenciesDir>../dependencies</DependenciesDir>
</PropertyGroup>
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
@ -59,7 +61,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../ext_includes;../dependencies/qaac/mp4v2/include;../dependencies/fdk-aac/libSYS/include;../dependencies/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_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -84,7 +86,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>../ext_includes;../dependencies/qaac/mp4v2/include;../dependencies/fdk-aac/libSYS/include;../dependencies/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_WINNT=0x501;WIN32;VGM_USE_FFMPEG;VGM_USE_G7221;VGM_USE_MP4V2;VGM_USE_FDKAAC;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
@ -123,10 +125,10 @@
<None Include="xmpin.def" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\dependencies\fdk-aac\msvc\fdk-aac.vcxproj">
<ProjectReference Include="$(DependenciesDir)/fdk-aac/msvc/fdk-aac.vcxproj">
<Project>{308e2ad5-be31-4770-9441-a8d50f56895c}</Project>
</ProjectReference>
<ProjectReference Include="..\dependencies\qaac\vcproject\mp4v2\mp4v2.vcxproj">
<ProjectReference Include="$(DependenciesDir)/qaac/vcproject/mp4v2/mp4v2.vcxproj">
<Project>{86a064e2-c81b-4eee-8be0-a39a2e7c7c76}</Project>
</ProjectReference>
<ProjectReference Include="..\ext_libs\ext_libs.vcxproj">