Updated extension list, added fading, fixed end of track bug

git-svn-id: https://vgmstream.svn.sourceforge.net/svnroot/vgmstream@745 51a99a44-fe44-0410-b1ba-c3e57ba2b86b
This commit is contained in:
josh-w 2010-02-26 07:45:06 +00:00
parent 64ea8a391f
commit cf1bf43a1f
4 changed files with 703 additions and 260 deletions

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Version="9.00"
Name="foo_input_vgmstream"
ProjectGUID="{F3739CF2-F422-4A3D-BB0A-53C5D4C5ABA0}"
Keyword="Win32Proj"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
@ -39,10 +40,10 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;C:\projects\SDK-2007-02-04\foobar2000\SDK&quot;;&quot;C:\projects\SDK-2007-02-04\foobar2000\shared&quot;;&quot;C:\projects\SDK-2007-02-04\foobar2000\helpers&quot;"
AdditionalIncludeDirectories="../ext_includes"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;"
MinimalRebuild="true"
BasicRuntimeChecks="1"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
@ -60,9 +61,11 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="shared.lib foobar2000_SDKd.lib foobar2000_component_clientd.lib pfcd.lib"
AdditionalDependencies="shared.lib foobar2000_SDKd.lib foobar2000_component_clientd.lib pfcd.lib ../ext_libs/libvorbis.lib ../ext_libs/libmpg123-0.lib"
OutputFile="$(OutDir)\$(ProjectName).dll"
LinkIncremental="2"
AdditionalLibraryDirectories="C:\projects\SDK-2007-02-04\foobar2000\lib"
AdditionalLibraryDirectories=""
DelayLoadDLLs="libvorbis.dll;libmpg123-0.dll"
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
@ -113,7 +116,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;C:\projects\SDK-2007-02-04\foobar2000\SDK&quot;;&quot;C:\projects\SDK-2007-02-04\foobar2000\shared&quot;;&quot;C:\projects\SDK-2007-02-04\foobar2000\helpers&quot;"
AdditionalIncludeDirectories="../ext_includes"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;IN_VGMSTREAM_EXPORTS;"
RuntimeLibrary="2"
UsePrecompiledHeader="0"
@ -132,9 +135,10 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="shared.lib foobar2000_SDK.lib foobar2000_component_client.lib pfc.lib"
AdditionalDependencies="shared.lib foobar2000_SDK.lib foobar2000_component_client.lib pfc.lib ../ext_libs/libvorbis.lib ../ext_libs/libmpg123-0.lib"
LinkIncremental="2"
AdditionalLibraryDirectories="C:\projects\SDK-2007-02-04\foobar2000\lib"
AdditionalLibraryDirectories=""
DelayLoadDLLs="libvorbis.dll;libmpg123-0.dll"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"

View File

@ -12,10 +12,71 @@ typedef struct _FOO_STREAMFILE {
size_t buffersize;
} FOO_STREAMFILE;
class input_vgmstream {
public:
input_vgmstream();
~input_vgmstream();
static STREAMFILE * open_foo_streamfile_buffer_by_file(service_ptr_t<file> m_file,const char * const filename, size_t buffersize, abort_callback * p_abort);
STREAMFILE * open_foo_streamfile_buffer(const char * const filename, size_t buffersize, abort_callback * p_abort);
STREAMFILE * open_foo_streamfile(const char * const filename, abort_callback * p_abort);
VGMSTREAM * init_vgmstream_foo(const char * const filename, abort_callback & p_abort);
void decode_seek(double p_seconds,abort_callback & p_abort);
bool decode_run(audio_chunk & p_chunk,abort_callback & p_abort);
void decode_initialize(unsigned p_flags,abort_callback & p_abort);
void get_info(file_info & p_info,abort_callback & p_abort);
void open(service_ptr_t<file> p_filehint,const char * p_path,t_input_open_reason p_reason,abort_callback & p_abort);
static bool g_is_our_path(const char * p_path,const char * p_extension);
static bool g_is_our_content_type(const char * p_content_type);
bool decode_can_seek();
bool decode_get_dynamic_info(file_info & p_out, double & p_timestamp_delta);
bool decode_get_dynamic_info_track(file_info & p_out, double & p_timestamp_delta);
void decode_on_idle(abort_callback & p_abort);
void retag(const file_info & p_info,abort_callback & p_abort);
t_filestats get_file_stats(abort_callback & p_abort);
public:
service_ptr_t<file> m_file;
char filename[260];
t_input_open_reason currentreason;
VGMSTREAM * vgmstream;
HANDLE decode_thread_handle;
bool decoding;
int paused;
int decode_abort;
int decode_pos_ms;
int decode_pos_samples;
int stream_length_samples;
int fade_samples;
int test_length;
double fade_seconds;
double fade_delay_seconds;
double loop_count;
int thread_priority;
bool loop_forever;
int ignore_loop;
int seek_pos_samples;
t_filestats stats;
short sample_buffer[576*2*2]; /* 576 16-bit samples, stereo, possibly doubled in size for DSP */
void getfileinfo(char *filename, char *title, int *length_in_ms, int *sample_rate, int *channels, abort_callback & p_abort);
private:
};
STREAMFILE * open_foo_streamfile_buffer_by_file(service_ptr_t<file> m_file,const char * const filename, size_t buffersize, abort_callback * p_abort);
STREAMFILE * open_foo_streamfile_buffer(const char * const filename, size_t buffersize, abort_callback * p_abort, t_filestats * stats);
STREAMFILE * open_foo_streamfile(const char * const filename, abort_callback * p_abort, t_filestats * stats);
//size_t read_the_rest_foo(uint8_t * dest, off_t offset, size_t length, FOO_STREAMFILE * streamfile);
//size_t read_foo(FOO_STREAMFILE *streamfile, uint8_t * dest, off_t offset, size_t length);
//void close_foo(FOO_STREAMFILE * streamfile);
//off_t get_offset_foo(FOO_STREAMFILE *streamFile);
//size_t get_size_foo(FOO_STREAMFILE * streamfile);
#define DECLARE_MULTIPLE_FILE_TYPE(NAME,EXTENSION) \
namespace { static input_file_type_impl g_filetype_instance_##EXTENSION(NAME,"*." #EXTENSION ,true); \

View File

@ -48,8 +48,14 @@ static size_t read_the_rest_foo(uint8_t * dest, off_t offset, size_t length, FOO
size_t length_read=0;
streamfile->validsize=0;
streamfile->m_file->seek(offset,*streamfile->p_abort);
if (streamfile->m_file->is_eof(*streamfile->p_abort)) return length_read;
try {
if(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)) return length_read;
} catch (...) {
return length_read; //fail miserably
}
streamfile->offset=offset;
@ -58,7 +64,11 @@ static size_t read_the_rest_foo(uint8_t * dest, off_t offset, size_t length, FOO
else length_to_read=length;
/* always try to fill the buffer */
length_read = streamfile->m_file->read(streamfile->buffer,streamfile->buffersize,*streamfile->p_abort);
try {
length_read = streamfile->m_file->read(streamfile->buffer,streamfile->buffersize,*streamfile->p_abort);
} catch(...) {
return length_read; //fail miserably
}
streamfile->validsize=length_read;
#ifdef PROFILE_STREAMFILE
@ -87,7 +97,7 @@ static size_t read_foo(FOO_STREAMFILE *streamfile, uint8_t * dest, off_t offset,
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;
@ -96,8 +106,8 @@ static size_t read_foo(FOO_STREAMFILE *streamfile, uint8_t * dest, off_t offset,
return read_the_rest_foo(dest,offset,length,streamfile);
}
STREAMFILE * open_foo_streamfile(const char * const filename, abort_callback * p_abort) {
return open_foo_streamfile_buffer(filename,STREAMFILE_DEFAULT_BUFFER_SIZE, p_abort);
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);
}
static STREAMFILE *open_foo(FOO_STREAMFILE *streamFile,const char * const filename,size_t buffersize) {
@ -121,7 +131,7 @@ 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);
return open_foo_streamfile_buffer(filename,buffersize,streamFile->p_abort,NULL);
}
static size_t get_size_foo(FOO_STREAMFILE * streamfile) {
@ -179,7 +189,7 @@ static STREAMFILE * open_foo_streamfile_buffer_by_file(service_ptr_t<file> m_fil
return &streamfile->sf;
}
STREAMFILE * open_foo_streamfile_buffer(const char * const filename, size_t buffersize, abort_callback * p_abort) {
STREAMFILE * open_foo_streamfile_buffer(const char * const filename, size_t buffersize, abort_callback * p_abort, t_filestats * stats) {
STREAMFILE *streamFile;
service_ptr_t<file> infile;
@ -187,6 +197,7 @@ STREAMFILE * open_foo_streamfile_buffer(const char * const filename, size_t buff
return NULL;
filesystem::g_open_read(infile,filename,*p_abort);
if(stats) *stats = infile->get_stats(*p_abort);
streamFile = open_foo_streamfile_buffer_by_file(infile,filename,buffersize,p_abort);
if (!streamFile) {

View File

@ -35,274 +35,454 @@ extern "C" {
#define DECODE_SIZE 1024
/* format detection and VGMSTREAM setup, uses default parameters */
VGMSTREAM * init_vgmstream_foo(const char * const filename, abort_callback & p_abort) {
VGMSTREAM *vgmstream = NULL;
STREAMFILE *streamFile = open_foo_streamfile(filename, &p_abort);
if (streamFile) {
vgmstream = init_vgmstream_from_STREAMFILE(streamFile);
close_streamfile(streamFile);
}
return vgmstream;
VGMSTREAM * input_vgmstream::init_vgmstream_foo(const char * const filename, abort_callback & p_abort) {
VGMSTREAM *vgmstream = NULL;
STREAMFILE *streamFile = open_foo_streamfile(filename, &p_abort, &stats);
if (streamFile) {
vgmstream = init_vgmstream_from_STREAMFILE(streamFile);
close_streamfile(streamFile);
}
return vgmstream;
}
class input_vgmstream {
public:
void open(service_ptr_t<file> p_filehint,const char * p_path,t_input_open_reason p_reason,abort_callback & p_abort) {
currentreason = p_reason;
if(p_path) strcpy(filename, p_path);
void input_vgmstream::open(service_ptr_t<file> p_filehint,const char * p_path,t_input_open_reason p_reason,abort_callback & p_abort) {
switch(p_reason) {
case input_open_decode:
vgmstream = init_vgmstream_foo(p_path, p_abort);
currentreason = p_reason;
if(p_path) strcpy(filename, p_path);
/* were we able to open it? */
if (!vgmstream) {
return;
}
switch(p_reason) {
case input_open_decode:
vgmstream = init_vgmstream_foo(p_path, p_abort);
if (ignore_loop) vgmstream->loop_flag = 0;
/* were we able to open it? */
if (!vgmstream) {
return;
}
/* will we be able to play it? */
if (ignore_loop) vgmstream->loop_flag = 0;
if (vgmstream->channels <= 0) {
close_vgmstream(vgmstream);
vgmstream=NULL;
return;
}
/* will we be able to play it? */
decode_abort = 0;
seek_needed_samples = -1;
decode_pos_ms = 0;
decode_pos_samples = 0;
paused = 0;
stream_length_samples = get_vgmstream_play_samples(loop_count,fade_seconds,fade_delay_seconds,vgmstream);
if (vgmstream->channels <= 0) {
close_vgmstream(vgmstream);
vgmstream=NULL;
return;
}
fade_samples = (int)(fade_seconds * vgmstream->sample_rate);
decode_abort = 0;
decode_pos_ms = 0;
decode_pos_samples = 0;
paused = 0;
stream_length_samples = get_vgmstream_play_samples(loop_count,fade_seconds,fade_delay_seconds,vgmstream);
break;
fade_samples = (int)(fade_seconds * vgmstream->sample_rate);
case input_open_info_read:
break;
break;
case input_open_info_write:
//cant write...ever
break;
case input_open_info_read:
break;
default:
break;
case input_open_info_write:
//cant write...ever
break;
default:
break;
}
}
void input_vgmstream::get_info(file_info & p_info,abort_callback & p_abort ) {
int length_in_ms=0, channels = 0, samplerate = 0;
char title[256];
getfileinfo(filename, title, &length_in_ms, &samplerate, &channels, p_abort);
p_info.info_set_int("samplerate", samplerate);
p_info.info_set_int("channels", channels);
p_info.info_set_int("bitspersample",16);
p_info.info_set("encoding","lossless");
p_info.info_set_bitrate(16);
p_info.set_length(((double)length_in_ms)/1000);
}
void input_vgmstream::decode_initialize(unsigned p_flags,abort_callback & p_abort) {
if(!loop_forever || !vgmstream->loop_flag)
p_flags|=input_flag_no_looping;
};
bool input_vgmstream::decode_run(audio_chunk & p_chunk,abort_callback & p_abort) {
// why is this being called while this is being called? bad foobar!
while(decoding)
Sleep(10);
decoding = true;
int l = 0, samples_to_do = DECODE_SIZE, t= 0;
if(vgmstream) {
if (decode_pos_samples+DECODE_SIZE>stream_length_samples && (!loop_forever || !vgmstream->loop_flag))
samples_to_do=stream_length_samples-decode_pos_samples;
else
samples_to_do=DECODE_SIZE;
l = (samples_to_do*vgmstream->channels*2);
if (samples_to_do /*< DECODE_SIZE*/ == 0) {
decoding = false;
return false;
}
t = ((test_length*vgmstream->sample_rate)/1000);
render_vgmstream(sample_buffer,samples_to_do,vgmstream);
/* fade! */
if (vgmstream->loop_flag && fade_samples > 0 && !loop_forever) {
int samples_into_fade = decode_pos_samples - (stream_length_samples - fade_samples);
if (samples_into_fade + samples_to_do > 0) {
int j,k;
for (j=0;j<samples_to_do;j++,samples_into_fade++) {
if (samples_into_fade > 0) {
double fadedness = (double)(fade_samples-samples_into_fade)/fade_samples;
for (k=0;k<vgmstream->channels;k++) {
sample_buffer[j*vgmstream->channels+k] =
(short)(sample_buffer[j*vgmstream->channels+k]*fadedness);
}
}
}
}
}
void get_info(file_info & p_info,abort_callback & p_abort ) {
int length_in_ms=0, channels = 0, samplerate = 0;
char title[256];
p_chunk.set_data_fixedpoint((char*)sample_buffer, l, vgmstream->sample_rate,vgmstream->channels,16,audio_chunk::g_guess_channel_config(vgmstream->channels));
getfileinfo(filename, title, &length_in_ms, &samplerate, &channels, p_abort);
decode_pos_samples+=samples_to_do;
decode_pos_ms=decode_pos_samples*1000LL/vgmstream->sample_rate;
p_info.info_set_int("samplerate", samplerate);
p_info.info_set_int("channels", channels);
p_info.info_set_int("bitspersample",16);
p_info.info_set("encoding","lossless");
p_info.info_set_bitrate(16);
decoding = false;
return samples_to_do==DECODE_SIZE;
p_info.set_length(((double)length_in_ms)/1000);
}
}
decoding = false;
return false;
}
void decode_initialize(unsigned p_flags,abort_callback & p_abort) { };
void input_vgmstream::decode_seek(double p_seconds,abort_callback & p_abort) {
seek_pos_samples = ((int)(p_seconds * (double)vgmstream->sample_rate));
bool decode_run(audio_chunk & p_chunk,abort_callback & p_abort) {
int l = 0, samples_to_do = DECODE_SIZE, t= 0;
// Reset of backwards seek
if(seek_pos_samples < decode_pos_samples) {
reset_vgmstream(vgmstream);
if (ignore_loop) vgmstream->loop_flag = 0;
decode_pos_samples = 0;
}
if(vgmstream && (seek_needed_samples == -1 )) {
// seeking overrun = bad
if(seek_pos_samples > stream_length_samples) seek_pos_samples = stream_length_samples;
if (decode_pos_samples+DECODE_SIZE>stream_length_samples && (!loop_forever || !vgmstream->loop_flag))
samples_to_do=stream_length_samples-decode_pos_samples;
else
samples_to_do=DECODE_SIZE;
while(decode_pos_samples+DECODE_SIZE<seek_pos_samples) {
int seek_samples = DECODE_SIZE;
if((decode_pos_samples+DECODE_SIZE>=stream_length_samples) && (!loop_forever || !vgmstream->loop_flag))
seek_samples=stream_length_samples-seek_pos_samples;
l = (samples_to_do*vgmstream->channels*2);
decode_pos_samples+=seek_samples;
render_vgmstream(sample_buffer,seek_samples,vgmstream);
}
if (samples_to_do /*< DECODE_SIZE*/ == 0) {
return false;
}
decode_pos_ms=decode_pos_samples*1000LL/vgmstream->sample_rate;
}
t = ((test_length*vgmstream->sample_rate)/1000);
input_vgmstream::input_vgmstream() {
vgmstream = NULL;
decode_thread_handle = INVALID_HANDLE_VALUE;
paused = 0;
decode_abort = 0;
decode_pos_ms = 0;
decode_pos_samples = 0;
stream_length_samples = 0;
fade_samples = 0;
fade_seconds = 10.0f;
fade_delay_seconds = 0.0f;
loop_count = 2.0f;
thread_priority = 3;
loop_forever = false;
ignore_loop = 0;
decoding = false;
seek_pos_samples = 0;
render_vgmstream(sample_buffer,samples_to_do,vgmstream);
}
/* fade! */
if (vgmstream->loop_flag && fade_samples > 0 && !loop_forever) {
int samples_into_fade = decode_pos_samples - (stream_length_samples - fade_samples);
if (samples_into_fade + samples_to_do > 0) {
int j,k;
for (j=0;j<samples_to_do;j++,samples_into_fade++) {
if (samples_into_fade > 0) {
double fadedness = (double)(fade_samples-samples_into_fade)/fade_samples;
for (k=0;k<vgmstream->channels;k++) {
sample_buffer[j*vgmstream->channels+k] =
(short)(sample_buffer[j*vgmstream->channels+k]*fadedness);
}
}
}
}
}
input_vgmstream::~input_vgmstream() {
}
p_chunk.set_data_fixedpoint((char*)sample_buffer, l, vgmstream->sample_rate,vgmstream->channels,16,audio_chunk::g_guess_channel_config(vgmstream->channels));
t_filestats input_vgmstream::get_file_stats(abort_callback & p_abort) {
return stats;
}
decode_pos_samples+=samples_to_do;
decode_pos_ms=decode_pos_samples*1000LL/vgmstream->sample_rate;
bool input_vgmstream::decode_can_seek() {return true;} /*not implemented yet*/
bool input_vgmstream::decode_get_dynamic_info(file_info & p_out, double & p_timestamp_delta) {
//do we need anything else 'cept the samplrate
return true;
}
bool input_vgmstream::decode_get_dynamic_info_track(file_info & p_out, double & p_timestamp_delta) {return false;}
void input_vgmstream::decode_on_idle(abort_callback & p_abort) {/*m_file->on_idle(p_abort);*/}
return true;
void input_vgmstream::retag(const file_info & p_info,abort_callback & p_abort) {};
}
bool input_vgmstream::g_is_our_content_type(const char * p_content_type) {return false;}
bool input_vgmstream::g_is_our_path(const char * p_path,const char * p_extension) {
#if 0
if(!stricmp_utf8(p_extension,"pdt")) return 1;
#endif
if(!stricmp_utf8(p_extension,"pdt")) return 1;
return false;
}
if(!stricmp_utf8(p_extension,"2dx")) return 1;
void decode_seek(double p_seconds,abort_callback & p_abort) {
}
if(!stricmp_utf8(p_extension,"aax")) return 1;
if(!stricmp_utf8(p_extension,"acm")) return 1;
if(!stricmp_utf8(p_extension,"adpcm")) return 1;
if(!stricmp_utf8(p_extension,"adp")) return 1;
if(!stricmp_utf8(p_extension,"ads")) return 1;
if(!stricmp_utf8(p_extension,"adx")) return 1;
if(!stricmp_utf8(p_extension,"afc")) return 1;
if(!stricmp_utf8(p_extension,"agsc")) return 1;
if(!stricmp_utf8(p_extension,"ahx")) return 1;
if(!stricmp_utf8(p_extension,"a c")) return 1;
if(!stricmp_utf8(p_extension,"aix")) return 1;
if(!stricmp_utf8(p_extension,"amts")) return 1;
if(!stricmp_utf8(p_extension,"as4")) return 1;
if(!stricmp_utf8(p_extension,"asd")) return 1;
if(!stricmp_utf8(p_extension,"asf")) return 1;
if(!stricmp_utf8(p_extension,"ast")) return 1;
if(!stricmp_utf8(p_extension,"asr")) return 1;
if(!stricmp_utf8(p_extension,"ass")) return 1;
if(!stricmp_utf8(p_extension,"aud")) return 1;
if(!stricmp_utf8(p_extension,"aus")) return 1;
input_vgmstream() {
vgmstream = NULL;
decode_thread_handle = INVALID_HANDLE_VALUE;
paused = 0;
decode_abort = 0;
seek_needed_samples = -1;
decode_pos_ms = 0;
decode_pos_samples = 0;
stream_length_samples = 0;
fade_samples = 0;
if(!stricmp_utf8(p_extension,"baka")) return 1;
if(!stricmp_utf8(p_extension,"bg00")) return 1;
if(!stricmp_utf8(p_extension,"bgw")) return 1;
if(!stricmp_utf8(p_extension,"bh2pcm")) return 1;
if(!stricmp_utf8(p_extension,"bmdx")) return 1;
if(!stricmp_utf8(p_extension,"bns")) return 1;
if(!stricmp_utf8(p_extension,"brstmspm")) return 1;
if(!stricmp_utf8(p_extension,"brstm")) return 1;
fade_seconds = 10.0f;
fade_delay_seconds = 0.0f;
loop_count = 2.0f;
thread_priority = 3;
loop_forever = 0;
ignore_loop = 0;
if(!stricmp_utf8(p_extension,"caf")) return 1;
if(!stricmp_utf8(p_extension,"capdsp")) return 1;
if(!stricmp_utf8(p_extension,"ccc")) return 1;
if(!stricmp_utf8(p_extension,"cfn")) return 1;
if(!stricmp_utf8(p_extension,"cnk")) return 1;
}
if(!stricmp_utf8(p_extension,"dcs")) return 1;
if(!stricmp_utf8(p_extension,"de2")) return 1;
if(!stricmp_utf8(p_extension,"dmsg")) return 1;
if(!stricmp_utf8(p_extension,"dsp")) return 1;
if(!stricmp_utf8(p_extension,"dtk")) return 1;
if(!stricmp_utf8(p_extension,"dvi")) return 1;
if(!stricmp_utf8(p_extension,"dxh")) return 1;
~input_vgmstream() {
}
if(!stricmp_utf8(p_extension,"eam")) return 1;
if(!stricmp_utf8(p_extension,"emff")) return 1;
if(!stricmp_utf8(p_extension,"enth")) return 1;
t_filestats get_file_stats(abort_callback & p_abort) {
t_filestats t;
return t;
}
if(!stricmp_utf8(p_extension,"fag")) return 1;
if(!stricmp_utf8(p_extension,"filp")) return 1;
if(!stricmp_utf8(p_extension,"fsb")) return 1;
bool decode_can_seek() {return false;} /*not implemented yet*/
bool decode_get_dynamic_info(file_info & p_out, double & p_timestamp_delta) {
//do we need anything else 'cept the samplrate
return true;
}
bool decode_get_dynamic_info_track(file_info & p_out, double & p_timestamp_delta) {return false;}
void decode_on_idle(abort_callback & p_abort) {/*m_file->on_idle(p_abort);*/}
if(!stricmp_utf8(p_extension,"gbts")) return 1;
if(!stricmp_utf8(p_extension,"gca")) return 1;
if(!stricmp_utf8(p_extension,"gcm")) return 1;
if(!stricmp_utf8(p_extension,"gcub")) return 1;
if(!stricmp_utf8(p_extension,"gcw")) return 1;
if(!stricmp_utf8(p_extension,"genh")) return 1;
if(!stricmp_utf8(p_extension,"gms")) return 1;
if(!stricmp_utf8(p_extension,"gsb")) return 1;
void retag(const file_info & p_info,abort_callback & p_abort) {};
if(!stricmp_utf8(p_extension,"hgc1")) return 1;
if(!stricmp_utf8(p_extension,"his")) return 1;
if(!stricmp_utf8(p_extension,"hlwav")) return 1;
if(!stricmp_utf8(p_extension,"hps")) return 1;
if(!stricmp_utf8(p_extension,"hwas")) return 1;
static bool g_is_our_content_type(const char * p_content_type) {return false;}
static bool g_is_our_path(const char * p_path,const char * p_extension) {
if(!stricmp_utf8(p_extension,"adx")) return 1;
if(!stricmp_utf8(p_extension,"afc")) return 1;
if(!stricmp_utf8(p_extension,"agsc")) return 1;
if(!stricmp_utf8(p_extension,"ast")) return 1;
if(!stricmp_utf8(p_extension,"brstm")) return 1;
if(!stricmp_utf8(p_extension,"brstmspm")) return 1;
if(!stricmp_utf8(p_extension,"hps")) return 1;
if(!stricmp_utf8(p_extension,"strm")) return 1;
if(!stricmp_utf8(p_extension,"adp")) return 1;
if(!stricmp_utf8(p_extension,"rsf")) return 1;
if(!stricmp_utf8(p_extension,"dsp")) return 1;
if(!stricmp_utf8(p_extension,"gcw")) return 1;
if(!stricmp_utf8(p_extension,"ads")) return 1;
if(!stricmp_utf8(p_extension,"ss2")) return 1;
if(!stricmp_utf8(p_extension,"npsf")) return 1;
if(!stricmp_utf8(p_extension,"rwsd")) return 1;
if(!stricmp_utf8(p_extension,"xa")) return 1;
if(!stricmp_utf8(p_extension,"rxw")) return 1;
if(!stricmp_utf8(p_extension,"int")) return 1;
if(!stricmp_utf8(p_extension,"sts")) return 1;
if(!stricmp_utf8(p_extension,"svag")) return 1;
if(!stricmp_utf8(p_extension,"mib")) return 1;
if(!stricmp_utf8(p_extension,"mi4")) return 1;
if(!stricmp_utf8(p_extension,"mpdsp")) return 1;
if(!stricmp_utf8(p_extension,"mic")) return 1;
if(!stricmp_utf8(p_extension,"gcm")) return 1;
if(!stricmp_utf8(p_extension,"mss")) return 1;
if(!stricmp_utf8(p_extension,"raw")) return 1;
if(!stricmp_utf8(p_extension,"vag")) return 1;
if(!stricmp_utf8(p_extension,"gms")) return 1;
if(!stricmp_utf8(p_extension,"str")) return 1;
if(!stricmp_utf8(p_extension,"ild")) return 1;
if(!stricmp_utf8(p_extension,"pnb")) return 1;
if(!stricmp_utf8(p_extension,"wavm")) return 1;
if(!stricmp_utf8(p_extension,"xwav")) return 1;
if(!stricmp_utf8(p_extension,"wp2")) return 1;
if(!stricmp_utf8(p_extension,"pnb")) return 1;
if(!stricmp_utf8(p_extension,"str")) return 1;
if(!stricmp_utf8(p_extension,"sng")) return 1;
if(!stricmp_utf8(p_extension,"asf")) return 1;
if(!stricmp_utf8(p_extension,"eam")) return 1;
if(!stricmp_utf8(p_extension,"cfn")) return 1;
if(!stricmp_utf8(p_extension,"vpk")) return 1;
if(!stricmp_utf8(p_extension,"genh")) return 1;
return 0;
}
if(!stricmp_utf8(p_extension,"idsp")) return 1;
if(!stricmp_utf8(p_extension,"idvi")) return 1;
if(!stricmp_utf8(p_extension,"ikm")) return 1;
if(!stricmp_utf8(p_extension,"ild")) return 1;
if(!stricmp_utf8(p_extension,"int")) return 1;
if(!stricmp_utf8(p_extension,"isd")) return 1;
if(!stricmp_utf8(p_extension,"isws")) return 1;
if(!stricmp_utf8(p_extension,"ivaud")) return 1;
if(!stricmp_utf8(p_extension,"ivb")) return 1;
public:
service_ptr_t<file> m_file;
char filename[260];
t_input_open_reason currentreason;
VGMSTREAM * vgmstream;
HANDLE decode_thread_handle;
int paused;
int decode_abort;
int seek_needed_samples;
int decode_pos_ms;
int decode_pos_samples;
int stream_length_samples;
int fade_samples;
int test_length;
if(!stricmp_utf8(p_extension,"joe")) return 1;
double fade_seconds;
double fade_delay_seconds;
double loop_count;
int thread_priority;
int loop_forever;
int ignore_loop;
if(!stricmp_utf8(p_extension,"kces")) return 1;
if(!stricmp_utf8(p_extension,"kcey")) return 1;
if(!stricmp_utf8(p_extension,"kraw")) return 1;
if(!stricmp_utf8(p_extension,"leg")) return 1;
if(!stricmp_utf8(p_extension,"logg")) return 1;
if(!stricmp_utf8(p_extension,"lps")) return 1;
if(!stricmp_utf8(p_extension,"lwav")) return 1;
if(!stricmp_utf8(p_extension,"matx")) return 1;
if(!stricmp_utf8(p_extension,"mcg")) return 1;
if(!stricmp_utf8(p_extension,"mi4")) return 1;
if(!stricmp_utf8(p_extension,"mib")) return 1;
if(!stricmp_utf8(p_extension,"mic")) return 1;
if(!stricmp_utf8(p_extension,"mihb")) return 1;
if(!stricmp_utf8(p_extension,"mpdsp")) return 1;
if(!stricmp_utf8(p_extension,"mss")) return 1;
if(!stricmp_utf8(p_extension,"msvp")) return 1;
if(!stricmp_utf8(p_extension,"mus")) return 1;
if(!stricmp_utf8(p_extension,"musc")) return 1;
if(!stricmp_utf8(p_extension,"musx")) return 1;
if(!stricmp_utf8(p_extension,"mwv")) return 1;
if(!stricmp_utf8(p_extension,"mxst")) return 1;
if(!stricmp_utf8(p_extension,"myspd")) return 1;
if(!stricmp_utf8(p_extension,"ndp")) return 1;
if(!stricmp_utf8(p_extension,"npsf")) return 1;
if(!stricmp_utf8(p_extension,"nwa")) return 1;
if(!stricmp_utf8(p_extension,"omu")) return 1;
if(!stricmp_utf8(p_extension,"p2bt")) return 1;
if(!stricmp_utf8(p_extension,"pcm")) return 1;
if(!stricmp_utf8(p_extension,"pdt")) return 1;
if(!stricmp_utf8(p_extension,"pnb")) return 1;
if(!stricmp_utf8(p_extension,"pona")) return 1;
if(!stricmp_utf8(p_extension,"pos")) return 1;
if(!stricmp_utf8(p_extension,"ps2stm")) return 1;
if(!stricmp_utf8(p_extension,"psh")) return 1;
if(!stricmp_utf8(p_extension,"psw")) return 1;
if(!stricmp_utf8(p_extension,"raw")) return 1;
if(!stricmp_utf8(p_extension,"rkv")) return 1;
if(!stricmp_utf8(p_extension,"rnd")) return 1;
if(!stricmp_utf8(p_extension,"rrds")) return 1;
if(!stricmp_utf8(p_extension,"rsd")) return 1;
if(!stricmp_utf8(p_extension,"rsf")) return 1;
if(!stricmp_utf8(p_extension,"rstm")) return 1;
if(!stricmp_utf8(p_extension,"rwar")) return 1;
if(!stricmp_utf8(p_extension,"rwav")) return 1;
if(!stricmp_utf8(p_extension,"rws")) return 1;
if(!stricmp_utf8(p_extension,"rwsd")) return 1;
if(!stricmp_utf8(p_extension,"rwx")) return 1;
if(!stricmp_utf8(p_extension,"rxw")) return 1;
if(!stricmp_utf8(p_extension,"sab")) return 1;
if(!stricmp_utf8(p_extension,"sad")) return 1;
if(!stricmp_utf8(p_extension,"sap")) return 1;
if(!stricmp_utf8(p_extension,"sc")) return 1;
if(!stricmp_utf8(p_extension,"sck")) return 1;
if(!stricmp_utf8(p_extension,"sd9")) return 1;
if(!stricmp_utf8(p_extension,"sdt")) return 1;
if(!stricmp_utf8(p_extension,"seg")) return 1;
if(!stricmp_utf8(p_extension,"sfl")) return 1;
if(!stricmp_utf8(p_extension,"sfs")) return 1;
if(!stricmp_utf8(p_extension,"sl3")) return 1;
if(!stricmp_utf8(p_extension,"sli")) return 1;
if(!stricmp_utf8(p_extension,"smp")) return 1;
if(!stricmp_utf8(p_extension,"snd")) return 1;
if(!stricmp_utf8(p_extension,"sng")) return 1;
if(!stricmp_utf8(p_extension,"spd")) return 1;
if(!stricmp_utf8(p_extension,"sps")) return 1;
if(!stricmp_utf8(p_extension,"spsd")) return 1;
if(!stricmp_utf8(p_extension,"spw")) return 1;
if(!stricmp_utf8(p_extension,"ss2")) return 1;
if(!stricmp_utf8(p_extension,"ss3")) return 1;
if(!stricmp_utf8(p_extension,"ss7")) return 1;
if(!stricmp_utf8(p_extension,"ssm")) return 1;
if(!stricmp_utf8(p_extension,"stma")) return 1;
if(!stricmp_utf8(p_extension,"str")) return 1;
if(!stricmp_utf8(p_extension,"strm")) return 1;
if(!stricmp_utf8(p_extension,"sts")) return 1;
if(!stricmp_utf8(p_extension,"stx")) return 1;
if(!stricmp_utf8(p_extension,"svag")) return 1;
if(!stricmp_utf8(p_extension,"svs")) return 1;
if(!stricmp_utf8(p_extension,"swav")) return 1;
if(!stricmp_utf8(p_extension,"swd")) return 1;
if(!stricmp_utf8(p_extension,"tec")) return 1;
if(!stricmp_utf8(p_extension,"thp")) return 1;
if(!stricmp_utf8(p_extension,"tk5")) return 1;
if(!stricmp_utf8(p_extension,"tydsp")) return 1;
if(!stricmp_utf8(p_extension,"um3")) return 1;
if(!stricmp_utf8(p_extension,"vag")) return 1;
if(!stricmp_utf8(p_extension,"vas")) return 1;
if(!stricmp_utf8(p_extension,"vb")) return 1;
if(!stricmp_utf8(p_extension,"vgs")) return 1;
if(!stricmp_utf8(p_extension,"vig")) return 1;
if(!stricmp_utf8(p_extension,"vpk")) return 1;
if(!stricmp_utf8(p_extension,"vs")) return 1;
if(!stricmp_utf8(p_extension,"vsf")) return 1;
if(!stricmp_utf8(p_extension,"vgv")) return 1;
if(!stricmp_utf8(p_extension,"waa")) return 1;
if(!stricmp_utf8(p_extension,"wac")) return 1;
if(!stricmp_utf8(p_extension,"wad")) return 1;
if(!stricmp_utf8(p_extension,"wam")) return 1;
if(!stricmp_utf8(p_extension,"wavm")) return 1;
if(!stricmp_utf8(p_extension,"was")) return 1;
if(!stricmp_utf8(p_extension,"wii")) return 1;
if(!stricmp_utf8(p_extension,"wp2")) return 1;
if(!stricmp_utf8(p_extension,"wsd")) return 1;
if(!stricmp_utf8(p_extension,"wsi")) return 1;
if(!stricmp_utf8(p_extension,"wvs")) return 1;
if(!stricmp_utf8(p_extension,"xa")) return 1;
if(!stricmp_utf8(p_extension,"xa2")) return 1;
if(!stricmp_utf8(p_extension,"xa30")) return 1;
if(!stricmp_utf8(p_extension,"xmu")) return 1;
if(!stricmp_utf8(p_extension,"xsf")) return 1;
if(!stricmp_utf8(p_extension,"xss")) return 1;
if(!stricmp_utf8(p_extension,"xvas")) return 1;
if(!stricmp_utf8(p_extension,"xwav")) return 1;
if(!stricmp_utf8(p_extension,"xwb")) return 1;
if(!stricmp_utf8(p_extension,"ydsp")) return 1;
if(!stricmp_utf8(p_extension,"ymf")) return 1;
if(!stricmp_utf8(p_extension,"zsd")) return 1;
if(!stricmp_utf8(p_extension,"zwdsp")) return 1;
return 0;
}
short sample_buffer[576*2*2]; /* 576 16-bit samples, stereo, possibly doubled in size for DSP */
void getfileinfo(char *filename, char *title, int *length_in_ms, int *sample_rate, int *channels, abort_callback & p_abort);
};
/* retrieve information on this or possibly another file */
void input_vgmstream::getfileinfo(char *filename, char *title, int *length_in_ms, int *sample_rate, int *channels, abort_callback & p_abort) {
VGMSTREAM * infostream;
if (length_in_ms)
{
*length_in_ms=-1000;
if ((infostream=init_vgmstream_foo(filename, p_abort)))
{
*length_in_ms = get_vgmstream_play_samples(loop_count,fade_seconds,fade_delay_seconds,infostream)*1000LL/infostream->sample_rate;
test_length = *length_in_ms;
*sample_rate = infostream->sample_rate;
*channels = infostream->channels;
VGMSTREAM * infostream;
if (length_in_ms)
{
*length_in_ms=-1000;
if ((infostream=init_vgmstream_foo(filename, p_abort)))
{
*length_in_ms = get_vgmstream_play_samples(loop_count,fade_seconds,fade_delay_seconds,infostream)*1000LL/infostream->sample_rate;
test_length = *length_in_ms;
*sample_rate = infostream->sample_rate;
*channels = infostream->channels;
close_vgmstream(infostream);
infostream=NULL;
}
}
if (title)
{
char *p=filename+strlen(filename);
while (*p != '\\' && p >= filename) p--;
strcpy(title,++p);
}
close_vgmstream(infostream);
infostream=NULL;
}
}
if (title)
{
char *p=filename+strlen(filename);
while (*p != '\\' && p >= filename) p--;
strcpy(title,++p);
}
}
@ -311,35 +491,222 @@ static input_singletrack_factory_t<input_vgmstream> g_input_vgmstream_factory;
DECLARE_COMPONENT_VERSION(APP_NAME,PLUGIN_VERSION,PLUGIN_DESCRIPTION);
// File types go down here (and in the large chunk of IFs above
// these are declared statically, and if anyone has a better idea i'd like to hear it - josh.
#if 0
DECLARE_MULTIPLE_FILE_TYPE("PDT Audio File (*.PDT)", pdt);
#endif
DECLARE_MULTIPLE_FILE_TYPE("2DX Audio File (*.2DX)", 2dx);
DECLARE_MULTIPLE_FILE_TYPE("AAX Audio File (*.AAX)", aax);
DECLARE_MULTIPLE_FILE_TYPE("ACM Audio File (*.ACM)", acm);
DECLARE_MULTIPLE_FILE_TYPE("ADPCM Audio File (*.ADPCM)", adpcm);
DECLARE_MULTIPLE_FILE_TYPE("ADP Audio File (*.ADP)", adp);
DECLARE_MULTIPLE_FILE_TYPE("PS2 ADS Audio File (*.ADS)", ads);
DECLARE_MULTIPLE_FILE_TYPE("ADX Audio File (*.ADX)", adx);
DECLARE_MULTIPLE_FILE_TYPE("AFC Audio File (*.AFC)", afc);
DECLARE_MULTIPLE_FILE_TYPE("AGSC Audio File (*.AGSC)", agsc);
DECLARE_MULTIPLE_FILE_TYPE("AHX Audio File (*.AHX)", ahx);
DECLARE_MULTIPLE_FILE_TYPE("AIFC Audio File (*.AIFC)", aifc);
DECLARE_MULTIPLE_FILE_TYPE("AIX Audio File (*.AIX)", aix);
DECLARE_MULTIPLE_FILE_TYPE("AMTS Audio File (*.AMTS)", amts);
DECLARE_MULTIPLE_FILE_TYPE("AS4 Audio File (*.AS4)", as4);
DECLARE_MULTIPLE_FILE_TYPE("ASD Audio File (*.ASD)", asd);
DECLARE_MULTIPLE_FILE_TYPE("ASF Audio File (*.ASF)", asf);
DECLARE_MULTIPLE_FILE_TYPE("AST Audio File (*.AST)", ast);
DECLARE_MULTIPLE_FILE_TYPE("BRSTM Audio File (*.BRSTM)", brstm);
DECLARE_MULTIPLE_FILE_TYPE("BRSTM Audio File (*.BRSTMSPM)", brstmspm);
DECLARE_MULTIPLE_FILE_TYPE("HALPST Audio File (*.HPS)", hps);
DECLARE_MULTIPLE_FILE_TYPE("STRM Audio File (*.STRM)", strm);
DECLARE_MULTIPLE_FILE_TYPE("ADP Audio File (*.ADP)", adp);
DECLARE_MULTIPLE_FILE_TYPE("RSF Audio File (*.RSF)", rsf);
DECLARE_MULTIPLE_FILE_TYPE("DSP Audio File (*.DSP)", dsp);
DECLARE_MULTIPLE_FILE_TYPE("GCW Audio File (*.GCW)", gcw);
DECLARE_MULTIPLE_FILE_TYPE("PS2 ADS Audio File (*.ADS)", ads);
DECLARE_MULTIPLE_FILE_TYPE("PS2 SS2 Audio File (*.SS2)", ss2);
DECLARE_MULTIPLE_FILE_TYPE("PS2 NPSF Audio File (*.NPSF)", npsf);
DECLARE_MULTIPLE_FILE_TYPE("RWSD Audio File (*.RWSD)", rwsd);
DECLARE_MULTIPLE_FILE_TYPE("PSX CD-XA File (*.XA)", xa);
DECLARE_MULTIPLE_FILE_TYPE("PS2 RXWS File (*.RXW)", rxw);
DECLARE_MULTIPLE_FILE_TYPE("PS2 RAW Interleaved PCM (*.INT)", int);
DECLARE_MULTIPLE_FILE_TYPE("PS2 EXST Audio File (*.STS)", sts);
DECLARE_MULTIPLE_FILE_TYPE("PS2 SVAG Audio File (*.SVAG)", svag);
DECLARE_MULTIPLE_FILE_TYPE("PS2 MIB Audio File (*.MIB)", mib);
DECLARE_MULTIPLE_FILE_TYPE("PS2 MI4 Audio File (*.MI4)", mi4);
DECLARE_MULTIPLE_FILE_TYPE("MPDSP Audio File (*.MPDSP)", mpdsp);
DECLARE_MULTIPLE_FILE_TYPE("PS2 MIC Audio File (*.MIC)", mic);
DECLARE_MULTIPLE_FILE_TYPE("GCM Audio File (*.GCM)", gcm);
DECLARE_MULTIPLE_FILE_TYPE("MSS Audio File (*.MSS)", mss);
DECLARE_MULTIPLE_FILE_TYPE("RAW Audio File (*.RAW)", raw);
DECLARE_MULTIPLE_FILE_TYPE("VAG Audio File (*.VAG)", vag);
DECLARE_MULTIPLE_FILE_TYPE("GMS Audio File (*.GMS)", gms);
DECLARE_MULTIPLE_FILE_TYPE("STR Audio File (*.STR)", str);
DECLARE_MULTIPLE_FILE_TYPE("ASR Audio File (*.ASR)", asr);
DECLARE_MULTIPLE_FILE_TYPE("ASS Audio File (*.ASS)", ass);
DECLARE_MULTIPLE_FILE_TYPE("AUD Audio File (*.AUD)", aud);
DECLARE_MULTIPLE_FILE_TYPE("AUS Audio File (*.AUS)", aus);
DECLARE_MULTIPLE_FILE_TYPE("BAKA Audio File (*.BAKA)", baka);
DECLARE_MULTIPLE_FILE_TYPE("BG00 Audio File (*.BG00)", bg00);
DECLARE_MULTIPLE_FILE_TYPE("BGW Audio File (*.BGW)", bgw);
DECLARE_MULTIPLE_FILE_TYPE("BH2PCM Audio File (*.BH2PCM)", bh2pcm);
DECLARE_MULTIPLE_FILE_TYPE("BMDX Audio File (*.BMDX)", bmdx);
DECLARE_MULTIPLE_FILE_TYPE("BNS Audio File (*.BNS)", bns);
DECLARE_MULTIPLE_FILE_TYPE("BRSTM Audio File (*.BRSTM)", brstm);
DECLARE_MULTIPLE_FILE_TYPE("BRSTM Audio File [2] (*.BRSTM)", brstmspm);
DECLARE_MULTIPLE_FILE_TYPE("CAF Audio File (*.CAF)", caf);
DECLARE_MULTIPLE_FILE_TYPE("CAPDSP Audio File (*.CAPDSP)", capdsp);
DECLARE_MULTIPLE_FILE_TYPE("CCC Audio File (*.CCC)", ccc);
DECLARE_MULTIPLE_FILE_TYPE("CFN Audio File (*.CFN)", cfn);
DECLARE_MULTIPLE_FILE_TYPE("CNK Audio File (*.CNK)", cnk);
DECLARE_MULTIPLE_FILE_TYPE("DCS Audio File (*.DCS)", dcs);
DECLARE_MULTIPLE_FILE_TYPE("DE2 Audio File (*.DE2)", de2);
DECLARE_MULTIPLE_FILE_TYPE("DMSG Audio File (*.DMSG)", dmsg);
DECLARE_MULTIPLE_FILE_TYPE("DSP Audio File (*.DSP)", dsp);
DECLARE_MULTIPLE_FILE_TYPE("DTK Audio File (*.DTK)", dtk);
DECLARE_MULTIPLE_FILE_TYPE("DVI Audio File (*.DVI)", dvi);
DECLARE_MULTIPLE_FILE_TYPE("DXH Audio File (*.DXH)", dxh);
DECLARE_MULTIPLE_FILE_TYPE("EAM Audio File (*.EAM)", eam);
DECLARE_MULTIPLE_FILE_TYPE("EMFF Audio File (*.EMFF)", emff);
DECLARE_MULTIPLE_FILE_TYPE("ENTH Audio File (*.ENTH)", enth);
DECLARE_MULTIPLE_FILE_TYPE("FAG Audio File (*.FAG)", fag);
DECLARE_MULTIPLE_FILE_TYPE("FILP Audio File (*.FILP)", filp);
DECLARE_MULTIPLE_FILE_TYPE("FSB Audio File (*.FSB)", fsb);
DECLARE_MULTIPLE_FILE_TYPE("GBTS Audio File (*.GBTS)", gbts);
DECLARE_MULTIPLE_FILE_TYPE("GCA Audio File (*.GCA)", gca);
DECLARE_MULTIPLE_FILE_TYPE("GCM Audio File (*.GCM)", gcm);
DECLARE_MULTIPLE_FILE_TYPE("GCUB Audio File (*.GCUB)", gcub);
DECLARE_MULTIPLE_FILE_TYPE("GCW Audio File (*.GCW)", gcw);
DECLARE_MULTIPLE_FILE_TYPE("GENH Audio File (*.GENH)", genh);
DECLARE_MULTIPLE_FILE_TYPE("GMS Audio File (*.GMS)", gms);
DECLARE_MULTIPLE_FILE_TYPE("GSB Audio File (*.GSB)", gsb);
DECLARE_MULTIPLE_FILE_TYPE("HGC1 Audio File (*.HGC1)", hgc1);
DECLARE_MULTIPLE_FILE_TYPE("HIS Audio File (*.HIS)", his);
DECLARE_MULTIPLE_FILE_TYPE("HLWAV Audio File (*.HLWAV)", hlwav);
DECLARE_MULTIPLE_FILE_TYPE("HALPST Audio File (*.HPS)", hps);
DECLARE_MULTIPLE_FILE_TYPE("HWAS Audio File (*.HWAS)", hwas);
DECLARE_MULTIPLE_FILE_TYPE("IDSP Audio File (*.IDSP)", idsp);
DECLARE_MULTIPLE_FILE_TYPE("IDVI Audio File (*.IDVI)", idvi);
DECLARE_MULTIPLE_FILE_TYPE("IKM Audio File (*.IKM)", ikm);
DECLARE_MULTIPLE_FILE_TYPE("ILD Audio File (*.ILD)", ild);
DECLARE_MULTIPLE_FILE_TYPE("PS2 RAW Interleaved PCM (*.INT)", int);
DECLARE_MULTIPLE_FILE_TYPE("ISD Audio File (*.ISD)", isd);
DECLARE_MULTIPLE_FILE_TYPE("ISWS Audio File (*.ISWS)", isws);
DECLARE_MULTIPLE_FILE_TYPE("IVAUD Audio File (*.IVAUD)", ivaud);
DECLARE_MULTIPLE_FILE_TYPE("IVB Audio File (*.IVB)", ivb);
DECLARE_MULTIPLE_FILE_TYPE("JOE Audio File (*.JOE)", joe);
DECLARE_MULTIPLE_FILE_TYPE("KCES Audio File (*.KCES)", kces);
DECLARE_MULTIPLE_FILE_TYPE("KCEY Audio File (*.KCEY)", kcey);
DECLARE_MULTIPLE_FILE_TYPE("KRAW Audio File (*.KRAW)", kraw);
DECLARE_MULTIPLE_FILE_TYPE("LEG Audio File (*.LEG)", leg);
DECLARE_MULTIPLE_FILE_TYPE("LOGG Audio File (*.LOGG)", logg);
DECLARE_MULTIPLE_FILE_TYPE("LPS Audio File (*.LPS)", lps);
DECLARE_MULTIPLE_FILE_TYPE("LWAV Audio File (*.LWAV)", lwav);
DECLARE_MULTIPLE_FILE_TYPE("MATX Audio File (*.MATX)", matx);
DECLARE_MULTIPLE_FILE_TYPE("MCG Audio File (*.MCG)", mcg);
DECLARE_MULTIPLE_FILE_TYPE("PS2 MI4 Audio File (*.MI4)", mi4);
DECLARE_MULTIPLE_FILE_TYPE("PS2 MIB Audio File (*.MIB)", mib);
DECLARE_MULTIPLE_FILE_TYPE("PS2 MIC Audio File (*.MIC)", mic);
DECLARE_MULTIPLE_FILE_TYPE("MIHB Audio File (*.MIHB)", mihb);
DECLARE_MULTIPLE_FILE_TYPE("MPDSP Audio File (*.MPDSP)", mpdsp);
DECLARE_MULTIPLE_FILE_TYPE("MSS Audio File (*.MSS)", mss);
DECLARE_MULTIPLE_FILE_TYPE("MSVP Audio File (*.MSVP)", msvp);
DECLARE_MULTIPLE_FILE_TYPE("MUS Playlist File (*.MUS)", mus);
DECLARE_MULTIPLE_FILE_TYPE("MUSC Audio File (*.MUSC)", musc);
DECLARE_MULTIPLE_FILE_TYPE("MUSX Audio File (*.MUSX)", musx);
DECLARE_MULTIPLE_FILE_TYPE("MWV Audio File (*.MWV)", mwv);
DECLARE_MULTIPLE_FILE_TYPE("MxSt Audio File (*.MxSt)", mxst);
DECLARE_MULTIPLE_FILE_TYPE("MYSPD Audio File (*.MYSPD)", myspd);
DECLARE_MULTIPLE_FILE_TYPE("NDP Audio File (*.NDP)", ndp);
DECLARE_MULTIPLE_FILE_TYPE("PS2 NPSF Audio File (*.NPSF)", npsf);
DECLARE_MULTIPLE_FILE_TYPE("NWA Audio File (*.NWA)", nwa);
DECLARE_MULTIPLE_FILE_TYPE("OMU Audio File (*.OMU)", omu);
DECLARE_MULTIPLE_FILE_TYPE("P2BT Audio File (*.P2BT)", p2bt);
DECLARE_MULTIPLE_FILE_TYPE("PCM Audio File (*.PCM)", pcm);
DECLARE_MULTIPLE_FILE_TYPE("PDT Audio File (*.PDT)", pdt);
DECLARE_MULTIPLE_FILE_TYPE("PNB Audio File (*.PNB)", pnb);
DECLARE_MULTIPLE_FILE_TYPE("PONA Audio File (*.PONA)", pona);
DECLARE_MULTIPLE_FILE_TYPE("POS Audio File (*.POS)", pos);
DECLARE_MULTIPLE_FILE_TYPE("PS2STM Audio File (*.PS2STM)", ps2stm);
DECLARE_MULTIPLE_FILE_TYPE("PSH Audio File (*.PSH)", psh);
DECLARE_MULTIPLE_FILE_TYPE("PSW Audio File (*.PSW)", psw);
DECLARE_MULTIPLE_FILE_TYPE("RAW Audio File (*.RAW)", raw);
DECLARE_MULTIPLE_FILE_TYPE("RKV Audio File (*.RKV)", rkv);
DECLARE_MULTIPLE_FILE_TYPE("RND Audio File (*.RND)", rnd);
DECLARE_MULTIPLE_FILE_TYPE("RRDS Audio File (*.RRDS)", rrds);
DECLARE_MULTIPLE_FILE_TYPE("RSD Audio File (*.RSD)", rsd);
DECLARE_MULTIPLE_FILE_TYPE("RSF Audio File (*.RSF)", rsf);
DECLARE_MULTIPLE_FILE_TYPE("RSTM Audio File (*.RSTM)", rstm);
DECLARE_MULTIPLE_FILE_TYPE("RWAR Audio File (*.RWSD)", rwar);
DECLARE_MULTIPLE_FILE_TYPE("RWAV Audio File (*.RWAV)", rwav);
DECLARE_MULTIPLE_FILE_TYPE("RWS Audio File (*.RWS)", rws);
DECLARE_MULTIPLE_FILE_TYPE("RWSD Audio File (*.RWSD)", rwsd);
DECLARE_MULTIPLE_FILE_TYPE("RWX Audio File (*.RWX)", rwx);
DECLARE_MULTIPLE_FILE_TYPE("PS2 RXWS File (*.RXW)", rxw);
DECLARE_MULTIPLE_FILE_TYPE("SAB Audio File (*.SAB)", sab);
DECLARE_MULTIPLE_FILE_TYPE("SAD Audio File (*.SAD)", sad);
DECLARE_MULTIPLE_FILE_TYPE("SAP Audio File (*.SAP)", sap);
DECLARE_MULTIPLE_FILE_TYPE("SC Audio File (*.SC)", sc);
DECLARE_MULTIPLE_FILE_TYPE("SCK Audio File (*.SCK)", sck);
DECLARE_MULTIPLE_FILE_TYPE("SD9 Audio File (*.SD9)", sd9);
DECLARE_MULTIPLE_FILE_TYPE("SDT Audio File (*.SDT)", sdt);
DECLARE_MULTIPLE_FILE_TYPE("SEG Audio File (*.SEG)", seg);
DECLARE_MULTIPLE_FILE_TYPE("SFL Audio File (*.SFL)", sfl);
DECLARE_MULTIPLE_FILE_TYPE("SFS Audio File (*.SFS)", sfs);
DECLARE_MULTIPLE_FILE_TYPE("SL3 Audio File (*.SL3)", sl3);
DECLARE_MULTIPLE_FILE_TYPE("SLI Audio File (*.SLI)", sli);
DECLARE_MULTIPLE_FILE_TYPE("SMP Audio File (*.SMP)", smp);
DECLARE_MULTIPLE_FILE_TYPE("SND Audio File (*.SND)", snd);
DECLARE_MULTIPLE_FILE_TYPE("SNG Audio File (*.SNG)", sng);
DECLARE_MULTIPLE_FILE_TYPE("SPD Audio File (*.SPD)", spd);
DECLARE_MULTIPLE_FILE_TYPE("SPS Audio File (*.SPS)", sps);
DECLARE_MULTIPLE_FILE_TYPE("SPSD Audio File (*.SPSD)", spsd);
DECLARE_MULTIPLE_FILE_TYPE("SPW Audio File (*.SPW)", spw);
DECLARE_MULTIPLE_FILE_TYPE("PS2 SS2 Audio File (*.SS2)", ss2);
DECLARE_MULTIPLE_FILE_TYPE("SS3 Audio File (*.SS3)", ss3);
DECLARE_MULTIPLE_FILE_TYPE("SS7 Audio File (*.SS7)", ss7);
DECLARE_MULTIPLE_FILE_TYPE("SSM Audio File (*.SSM)", ssm);
DECLARE_MULTIPLE_FILE_TYPE("STMA Audio File (*.STMA)", stma);
DECLARE_MULTIPLE_FILE_TYPE("STR Audio File (*.STR)", str);
DECLARE_MULTIPLE_FILE_TYPE("STRM Audio File (*.STRM)", strm);
DECLARE_MULTIPLE_FILE_TYPE("PS2 EXST Audio File (*.STS)", sts);
DECLARE_MULTIPLE_FILE_TYPE("STX Audio File (*.STX)", stx);
DECLARE_MULTIPLE_FILE_TYPE("PS2 SVAG Audio File (*.SVAG)", svag);
DECLARE_MULTIPLE_FILE_TYPE("SVS Audio File (*.SVS)", svs);
DECLARE_MULTIPLE_FILE_TYPE("SWAV Audio File (*.SWAV)", swav);
DECLARE_MULTIPLE_FILE_TYPE("SWD Audio File (*.SWD)", swd);
DECLARE_MULTIPLE_FILE_TYPE("TEC Audio File (*.TEC)", tec);
DECLARE_MULTIPLE_FILE_TYPE("THP Audio File (*.THP)", thp);
DECLARE_MULTIPLE_FILE_TYPE("TK5 Audio File (*.TK5)", tk5);
DECLARE_MULTIPLE_FILE_TYPE("TYDSP Audio File (*.TYDSP)", tydsp);
DECLARE_MULTIPLE_FILE_TYPE("UM3 Audio File (*.UM3)", um3);
DECLARE_MULTIPLE_FILE_TYPE("VAG Audio File (*.VAG)", vag);
DECLARE_MULTIPLE_FILE_TYPE("VAS Audio File (*.VAS)", vas);
DECLARE_MULTIPLE_FILE_TYPE("VB Audio File (*.VB)", vb);
DECLARE_MULTIPLE_FILE_TYPE("VGS Audio File (*.VGS)", vgs);
DECLARE_MULTIPLE_FILE_TYPE("VIG Audio File (*.VIG)", vig);
DECLARE_MULTIPLE_FILE_TYPE("VPK Audio File (*.VPK)", vpk);
DECLARE_MULTIPLE_FILE_TYPE("VS Audio File (*.VS)", vs);
DECLARE_MULTIPLE_FILE_TYPE("VSF Audio File (*.VSF)", vsf);
DECLARE_MULTIPLE_FILE_TYPE("VGV Audio File (*.VGV)", vgv);
DECLARE_MULTIPLE_FILE_TYPE("WAA Audio File (*.WAA)", waa);
DECLARE_MULTIPLE_FILE_TYPE("WAC Audio File (*.WAC)", wac);
DECLARE_MULTIPLE_FILE_TYPE("WAD Audio File (*.WAD)", wad);
DECLARE_MULTIPLE_FILE_TYPE("WAM Audio File (*.WAM)", wam);
DECLARE_MULTIPLE_FILE_TYPE("WAVM Audio File (*.WAVM)", wavm);
DECLARE_MULTIPLE_FILE_TYPE("WAS Audio File (*.WAS)", was);
DECLARE_MULTIPLE_FILE_TYPE("WII Audio File (*.WII)", wii);
DECLARE_MULTIPLE_FILE_TYPE("WP2 Audio File (*.WP2)", wp2);
DECLARE_MULTIPLE_FILE_TYPE("WSD Audio File (*.WSD)", wsd);
DECLARE_MULTIPLE_FILE_TYPE("WSI Audio File (*.WSI)", wsi);
DECLARE_MULTIPLE_FILE_TYPE("WVS Audio File (*.WVS)", wvs);
DECLARE_MULTIPLE_FILE_TYPE("PSX CD-XA File (*.XA)", xa);
DECLARE_MULTIPLE_FILE_TYPE("XA2 Audio File (*.XA2)", xa2);
DECLARE_MULTIPLE_FILE_TYPE("XA30 Audio File (*.XA30)", xa30);
DECLARE_MULTIPLE_FILE_TYPE("XMU Audio File (*.XMU)", xmu);
DECLARE_MULTIPLE_FILE_TYPE("XSF Audio File (*.XSF)", xsf);
DECLARE_MULTIPLE_FILE_TYPE("XSS Audio File (*.XSS)", xss);
DECLARE_MULTIPLE_FILE_TYPE("XVAS Audio File (*.XVAS)", xvas);
DECLARE_MULTIPLE_FILE_TYPE("XWAV Audio File (*.XWAV)", xwav);
DECLARE_MULTIPLE_FILE_TYPE("XWB Audio File (*.XWB)", xwb);
DECLARE_MULTIPLE_FILE_TYPE("YDSP Audio File (*.YDSP)", ydsp);
DECLARE_MULTIPLE_FILE_TYPE("YMF Audio File (*.YMF)", ymf);
DECLARE_MULTIPLE_FILE_TYPE("ZSD Audio File (*.ZSD)", zsd);
DECLARE_MULTIPLE_FILE_TYPE("ZWDSP Audio File (*.ZWDSP)", zwdsp);