mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-18 15:54:05 +01:00
Use infile.wav as default instead of dump.wav for test.exe
This commit is contained in:
parent
944c667a17
commit
132df6845b
11
test/test.c
11
test/test.c
@ -33,7 +33,7 @@ static void usage(const char * name) {
|
|||||||
fprintf(stderr,"vgmstream test decoder " VERSION " " __DATE__ "\n"
|
fprintf(stderr,"vgmstream test decoder " VERSION " " __DATE__ "\n"
|
||||||
"Usage: %s [-o outfile.wav] [options] infile\n"
|
"Usage: %s [-o outfile.wav] [options] infile\n"
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
" -o outfile.wav: name of output .wav file, default is dump.wav\n"
|
" -o outfile.wav: name of output .wav file, default is infile.wav\n"
|
||||||
" -l loop count: loop count, default 2.0\n"
|
" -l loop count: loop count, default 2.0\n"
|
||||||
" -f fade time: fade time (seconds) after N loops, default 10.0\n"
|
" -f fade time: fade time (seconds) after N loops, default 10.0\n"
|
||||||
" -d fade delay: fade delay (seconds, default 0.0\n"
|
" -d fade delay: fade delay (seconds, default 0.0\n"
|
||||||
@ -67,6 +67,7 @@ int main(int argc, char ** argv) {
|
|||||||
char * infilename = NULL;
|
char * infilename = NULL;
|
||||||
char * outfilename = NULL;
|
char * outfilename = NULL;
|
||||||
char * outfilename_reset = NULL;
|
char * outfilename_reset = NULL;
|
||||||
|
char outfilename_internal[PATH_LIMIT];
|
||||||
int ignore_loop = 0;
|
int ignore_loop = 0;
|
||||||
int force_loop = 0;
|
int force_loop = 0;
|
||||||
int really_force_loop = 0;
|
int really_force_loop = 0;
|
||||||
@ -228,8 +229,12 @@ int main(int argc, char ** argv) {
|
|||||||
outfile = stdout;
|
outfile = stdout;
|
||||||
}
|
}
|
||||||
else if (!print_metaonly) {
|
else if (!print_metaonly) {
|
||||||
if (!outfilename)
|
if (!outfilename) {
|
||||||
outfilename = "dump.wav";
|
strcpy(outfilename_internal, infilename);
|
||||||
|
strcat(outfilename_internal, ".wav");
|
||||||
|
outfilename = outfilename_internal;
|
||||||
|
}
|
||||||
|
|
||||||
outfile = fopen(outfilename,"wb");
|
outfile = fopen(outfilename,"wb");
|
||||||
if (!outfile) {
|
if (!outfile) {
|
||||||
fprintf(stderr,"failed to open %s for output\n",outfilename);
|
fprintf(stderr,"failed to open %s for output\n",outfilename);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user