mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-24 15:00:11 +01:00
Fixed seeking within loop after end of track, added svn version
git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@873 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
parent
7320d0f97d
commit
c3f6e4dbd3
@ -102,6 +102,8 @@
|
|||||||
>
|
>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCPreBuildEventTool"
|
Name="VCPreBuildEventTool"
|
||||||
|
Description=""
|
||||||
|
CommandLine=""
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCustomBuildTool"
|
Name="VCCustomBuildTool"
|
||||||
@ -118,7 +120,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
AdditionalIncludeDirectories="../ext_includes"
|
AdditionalIncludeDirectories="../ext_includes"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;"
|
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
WarningLevel="3"
|
WarningLevel="3"
|
||||||
|
@ -23,9 +23,12 @@ extern "C" {
|
|||||||
#include "../src/util.h"
|
#include "../src/util.h"
|
||||||
}
|
}
|
||||||
#include "foo_vgmstream.h"
|
#include "foo_vgmstream.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
#ifndef VERSION
|
#ifndef VERSION
|
||||||
#define VERSION
|
#define PLUGIN_VERSION __DATE__
|
||||||
|
#else
|
||||||
|
#define PLUGIN_VERSION VERSION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define APP_NAME "vgmstream plugin"
|
#define APP_NAME "vgmstream plugin"
|
||||||
@ -33,7 +36,7 @@ extern "C" {
|
|||||||
"by hcs, FastElbja, manakoAT, and bxaimc\n" \
|
"by hcs, FastElbja, manakoAT, and bxaimc\n" \
|
||||||
"foobar2000 plugin by Josh W, kode54\n\n" \
|
"foobar2000 plugin by Josh W, kode54\n\n" \
|
||||||
"http://sourceforge.net/projects/vgmstream"
|
"http://sourceforge.net/projects/vgmstream"
|
||||||
#define PLUGIN_VERSION VERSION " " __DATE__
|
|
||||||
|
|
||||||
|
|
||||||
/* format detection and VGMSTREAM setup, uses default parameters */
|
/* format detection and VGMSTREAM setup, uses default parameters */
|
||||||
@ -183,6 +186,13 @@ void input_vgmstream::decode_seek(double p_seconds,abort_callback & p_abort) {
|
|||||||
seek_pos_samples = ((int)(p_seconds * (double)vgmstream->sample_rate));
|
seek_pos_samples = ((int)(p_seconds * (double)vgmstream->sample_rate));
|
||||||
int max_buffer_samples = sizeof(sample_buffer)/sizeof(sample_buffer[0])/vgmstream->channels;
|
int max_buffer_samples = sizeof(sample_buffer)/sizeof(sample_buffer[0])/vgmstream->channels;
|
||||||
|
|
||||||
|
// adjust for correct position within loop
|
||||||
|
if(vgmstream->loop_flag) {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
// Reset of backwards seek
|
// Reset of backwards seek
|
||||||
if(seek_pos_samples < decode_pos_samples) {
|
if(seek_pos_samples < decode_pos_samples) {
|
||||||
reset_vgmstream(vgmstream);
|
reset_vgmstream(vgmstream);
|
||||||
|
1
fb2k/version.h
Executable file
1
fb2k/version.h
Executable file
@ -0,0 +1 @@
|
|||||||
|
#define VERSION "r873"
|
Loading…
Reference in New Issue
Block a user