diff --git a/fb2k/foo_input_vgmstream.vcproj b/fb2k/foo_input_vgmstream.vcproj index a70ef416..e9074ce9 100644 --- a/fb2k/foo_input_vgmstream.vcproj +++ b/fb2k/foo_input_vgmstream.vcproj @@ -42,7 +42,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../ext_includes" - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;" + PreprocessorDefinitions="WIN32;VGM_USE_G7221;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -120,7 +120,7 @@ p_filehint,const char * p_path,t_ currentreason = p_reason; if(p_path) strcpy(filename, p_path); + /* KLUDGE */ + if ( !pfc::stricmp_ascii( pfc::string_extension( p_path ), "MUS" ) ) + { + unsigned char buffer[ 4 ]; + if ( p_filehint.is_empty() ) input_open_file_helper( p_filehint, p_path, p_reason, p_abort ); + p_filehint->read_object_t( buffer, p_abort ); + if ( !memcmp( buffer, "MUS\x1A", 4 ) ) throw exception_io_unsupported_format(); + } + switch(p_reason) { case input_open_decode: vgmstream = init_vgmstream_foo(p_path, p_abort); @@ -187,7 +196,7 @@ 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; // adjust for correct position within loop - if(vgmstream->loop_flag) { + if(vgmstream->loop_flag && seek_pos_samples >= vgmstream->loop_end_sample) { seek_pos_samples -= vgmstream->loop_start_sample; seek_pos_samples %= (vgmstream->loop_end_sample - vgmstream->loop_start_sample); seek_pos_samples += vgmstream->loop_start_sample; diff --git a/fb2k/version.h b/fb2k/version.h index 36467656..7fd7a52d 100755 --- a/fb2k/version.h +++ b/fb2k/version.h @@ -1 +1 @@ -#define VERSION "r911" +#define VERSION "r921" diff --git a/src/libvgmstream.vcproj b/src/libvgmstream.vcproj index 0f39fdcf..a9adb107 100644 --- a/src/libvgmstream.vcproj +++ b/src/libvgmstream.vcproj @@ -41,7 +41,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories="../ext_includes" - PreprocessorDefinitions="WIN32;_DEBUG;_LIB;" + PreprocessorDefinitions="WIN32;VGM_USE_G7221;_DEBUG;_LIB;" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" @@ -103,7 +103,7 @@