Updated WavPack decoder binary to v4.80.0 (2016-03-28), compiled with ICL 15.0 and MSVC 12.0.

This commit is contained in:
LoRd_MuldeR 2016-10-03 20:41:08 +02:00
parent 2518b456bb
commit b4ed8b618a
9 changed files with 343 additions and 3 deletions

View File

@ -17,6 +17,7 @@
* Updated FhgAacEnc add-in to "Case" edition (2015-10-24)
* Updated mpg123 decoder to v1.23.4 (2016-05-11), compiled with GCC 5.3.0
* Updated ALAC decoder to refalac v1.61 (2016-10-02)
* Updated WavPack decoder to v4.80.0 (2016-03-28), compiled with ICL 15.0 and MSVC 12.0
* Updated GnuPG to v1.4.21 (2016-08-17), compiled with GCC 6.1.0
* Improved auto-update function (faster Internet connectivity check)

View File

@ -0,0 +1,337 @@
cli/wavpack.c | 57 ++++++++++++++++++++++++++++++++++++++-------------------
cli/wvunpack.c | 46 +++++++++++++++++++++++++++++++++-------------
2 files changed, 71 insertions(+), 32 deletions(-)
diff --git a/cli/wavpack.c b/cli/wavpack.c
index da60e0b..d81d092 100644
--- a/cli/wavpack.c
+++ b/cli/wavpack.c
@@ -61,6 +61,25 @@
#define stricmp strcasecmp
#endif
+#ifdef _MSC_VER
+static __forceinline void flush_stderr(void)
+{
+ static int stderr_mode = -1;
+ if (stderr_mode < 0)
+ {
+ struct _stat stat;
+ if (!_fstat(_fileno(stderr), &stat))
+ {
+ stderr_mode = stat.st_mode & _S_IFMT;
+ }
+ }
+ if (stderr_mode == _S_IFIFO)
+ {
+ fflush(stderr); /*flush iff it's a pipe*/
+ }
+}
+#endif
+
///////////////////////////// local variable storage //////////////////////////
static const char *sign_on = "\n"
@@ -777,11 +796,11 @@ int main (int argc, char **argv)
if (strcmp (WavpackGetLibraryVersionString (), PACKAGE_VERSION)) {
fprintf (stderr, version_warning, WavpackGetLibraryVersionString (), PACKAGE_VERSION);
- fflush (stderr);
+ flush_stderr();
}
else if (!quiet_mode && !error_count) {
fprintf (stderr, sign_on, VERSION_OS, WavpackGetLibraryVersionString ());
- fflush (stderr);
+ flush_stderr();
}
// Loop through any tag specification strings and check for file access, convert text
@@ -891,7 +910,7 @@ int main (int argc, char **argv)
if (error_count) {
fprintf (stderr, "\ntype 'wavpack' for short help or 'wavpack --help' for full help\n");
- fflush (stderr);
+ flush_stderr();
return 1;
}
@@ -1189,7 +1208,7 @@ int main (int argc, char **argv)
if (num_files > 1 && !quiet_mode) {
fprintf (stderr, "\n%s:\n", matches [file_index]);
- fflush (stderr);
+ flush_stderr();
}
if (filespec_ext (matches [file_index]) && !stricmp (filespec_ext (matches [file_index]), ".wv"))
@@ -1223,11 +1242,11 @@ int main (int argc, char **argv)
if (num_files > 1) {
if (error_count) {
fprintf (stderr, "\n **** warning: errors occurred in %d of %d files! ****\n", error_count, num_files);
- fflush (stderr);
+ flush_stderr();
}
else if (!quiet_mode) {
fprintf (stderr, "\n **** %d files successfully processed ****\n", num_files);
- fflush (stderr);
+ flush_stderr();
}
}
@@ -1278,7 +1297,7 @@ int main(int argc, char **argv)
if (pause_mode) {
fprintf (stderr, "\nPress any key to continue . . . ");
- fflush (stderr);
+ flush_stderr();
while (!_kbhit ());
_getch ();
fprintf (stderr, "\n");
@@ -1507,7 +1526,7 @@ static int pack_file (char *infilename, char *outfilename, char *out2filename, c
if (!overwrite_all) {
fprintf (stderr, "overwrite %s (yes/no/all)? ", FN_FIT (outfilename));
- fflush (stderr);
+ flush_stderr();
if (set_console_title)
DoSetConsoleTitle ("overwrite?");
@@ -1532,7 +1551,7 @@ static int pack_file (char *infilename, char *outfilename, char *out2filename, c
if (res == 1) {
fprintf (stderr, "overwrite %s (yes/no/all)? ", FN_FIT (out2filename));
- fflush (stderr);
+ flush_stderr();
if (set_console_title)
DoSetConsoleTitle ("overwrite?");
@@ -1643,7 +1662,7 @@ static int pack_file (char *infilename, char *outfilename, char *out2filename, c
else
fprintf (stderr, "creating %s,", FN_FIT (outfilename));
- fflush (stderr);
+ flush_stderr();
}
#if defined (_WIN32)
@@ -2396,7 +2415,7 @@ static int pack_audio (WavpackContext *wpc, FILE *infile, unsigned char *new_ord
#else
fprintf (stderr, "\n");
#endif
- fflush (stderr);
+ flush_stderr();
free (sample_buffer);
free (input_buffer);
return WAVPACK_SOFT_ERROR;
@@ -2412,7 +2431,7 @@ static int pack_audio (WavpackContext *wpc, FILE *infile, unsigned char *new_ord
if (!quiet_mode) {
fprintf (stderr, "%s%3d%% done...",
nobs ? " " : "\b\b\b\b\b\b\b\b\b\b\b\b", (int) progress);
- fflush (stderr);
+ flush_stderr();
}
}
}
@@ -2506,7 +2525,7 @@ static int repack_file (char *infilename, char *outfilename, char *out2filename,
else
fprintf (stderr, "overwrite %s with lossy transcode (yes/no/all)? ", FN_FIT (outfilename));
- fflush (stderr);
+ flush_stderr();
if (set_console_title)
DoSetConsoleTitle ("overwrite?");
@@ -2526,7 +2545,7 @@ static int repack_file (char *infilename, char *outfilename, char *out2filename,
if (out2filename && !overwrite_all && (wvc_file.file = fopen (out2filename, "rb")) != NULL) {
DoCloseHandle (wvc_file.file);
fprintf (stderr, "overwrite %s (yes/no/all)? ", FN_FIT (out2filename));
- fflush (stderr);
+ flush_stderr();
if (set_console_title)
DoSetConsoleTitle ("overwrite?");
@@ -2628,7 +2647,7 @@ static int repack_file (char *infilename, char *outfilename, char *out2filename,
else
fprintf (stderr, "creating %s,", FN_FIT (outfilename));
- fflush (stderr);
+ flush_stderr();
}
#if defined (_WIN32)
@@ -3076,7 +3095,7 @@ static int repack_audio (WavpackContext *outfile, WavpackContext *infile, unsign
#else
fprintf (stderr, "\n");
#endif
- fflush (stderr);
+ flush_stderr();
free (sample_buffer);
return WAVPACK_SOFT_ERROR;
}
@@ -3091,7 +3110,7 @@ static int repack_audio (WavpackContext *outfile, WavpackContext *infile, unsign
if (!quiet_mode) {
fprintf (stderr, "%s%3d%% done...",
nobs ? " " : "\b\b\b\b\b\b\b\b\b\b\b\b", (int) progress);
- fflush (stderr);
+ flush_stderr();
}
}
}
@@ -3194,7 +3213,7 @@ static int verify_audio (char *infilename, unsigned char *md5_digest_source)
#else
fprintf (stderr, "\n");
#endif
- fflush (stderr);
+ flush_stderr();
result = WAVPACK_SOFT_ERROR;
break;
}
@@ -3208,7 +3227,7 @@ static int verify_audio (char *infilename, unsigned char *md5_digest_source)
if (!quiet_mode) {
fprintf (stderr, "%s%3d%% done...",
"\b\b\b\b\b\b\b\b\b\b\b\b", (int) progress);
- fflush (stderr);
+ flush_stderr();
}
}
}
diff --git a/cli/wvunpack.c b/cli/wvunpack.c
index 05c9fda..07dbd99 100644
--- a/cli/wvunpack.c
+++ b/cli/wvunpack.c
@@ -58,6 +58,25 @@
#define strdup(x) _strdup(x)
#endif
+#ifdef _MSC_VER
+static __forceinline void flush_stderr(void)
+{
+ static int stderr_mode = -1;
+ if (stderr_mode < 0)
+ {
+ struct _stat stat;
+ if (!_fstat(_fileno(stderr), &stat))
+ {
+ stderr_mode = stat.st_mode & _S_IFMT;
+ }
+ }
+ if (stderr_mode == _S_IFIFO)
+ {
+ fflush(stderr); /*flush iff it's a pipe*/
+ }
+}
+#endif
+
///////////////////////////// local variable storage //////////////////////////
static const char *sign_on = "\n"
@@ -460,11 +479,11 @@ int main(int argc, char **argv)
if (strcmp (WavpackGetLibraryVersionString (), PACKAGE_VERSION)) {
fprintf (stderr, version_warning, WavpackGetLibraryVersionString (), PACKAGE_VERSION);
- fflush (stderr);
+ flush_stderr();
}
else if (!quiet_mode && !error_count) {
fprintf (stderr, sign_on, VERSION_OS, WavpackGetLibraryVersionString ());
- fflush (stderr);
+ flush_stderr();
}
if (!num_files) {
@@ -677,7 +696,7 @@ int main(int argc, char **argv)
if (num_files > 1 && !quiet_mode) {
fprintf (stderr, "\n%s:\n", matches [file_index]);
- fflush (stderr);
+ flush_stderr();
}
result = unpack_file (matches [file_index], verify_only ? NULL : outfilename);
@@ -703,11 +722,11 @@ int main(int argc, char **argv)
if (num_files > 1) {
if (error_count) {
fprintf (stderr, "\n **** warning: errors occurred in %d of %d files! ****\n", error_count, num_files);
- fflush (stderr);
+ flush_stderr();
}
else if (!quiet_mode) {
fprintf (stderr, "\n **** %d files successfully processed ****\n", num_files);
- fflush (stderr);
+ flush_stderr();
}
}
@@ -758,10 +777,11 @@ int main(int argc, char **argv)
if (pause_mode) {
fprintf (stderr, "\nPress any key to continue . . . ");
- fflush (stderr);
+ flush_stderr();
while (!_kbhit ());
_getch ();
fprintf (stderr, "\n");
+ flush_stderr();
}
return ret;
@@ -845,7 +865,7 @@ static FILE *open_output_file (char *filename, char **tempfilename)
if (!overwrite_all) {
fprintf (stderr, "overwrite %s (yes/no/all)? ", FN_FIT (filename));
- fflush (stderr);
+ flush_stderr();
if (set_console_title)
DoSetConsoleTitle ("overwrite?");
@@ -1060,12 +1080,12 @@ static int unpack_file (char *infilename, char *outfilename)
if (!quiet_mode) {
fprintf (stderr, "unpacking %s%s to stdout,", *infilename == '-' ?
"stdin" : FN_FIT (infilename), wvc_mode ? " (+.wvc)" : "");
- fflush (stderr);
+ flush_stderr();
}
}
else if (!quiet_mode) {
fprintf (stderr, "restoring %s,", FN_FIT (outfilename));
- fflush (stderr);
+ flush_stderr();
}
if (outbuf_k)
@@ -1087,7 +1107,7 @@ static int unpack_file (char *infilename, char *outfilename)
if (!quiet_mode) {
fprintf (stderr, "verifying %s%s,", *infilename == '-' ? "stdin" :
FN_FIT (infilename), wvc_mode ? " (+.wvc)" : "");
- fflush (stderr);
+ flush_stderr();
}
}
@@ -1175,7 +1195,7 @@ static int unpack_file (char *infilename, char *outfilename)
#else
fprintf (stderr, "\n");
#endif
- fflush (stderr);
+ flush_stderr();
DoTruncateFile (outfile);
result = WAVPACK_SOFT_ERROR;
break;
@@ -1192,7 +1212,7 @@ static int unpack_file (char *infilename, char *outfilename)
if (!quiet_mode) {
fprintf (stderr, "%s%3d%% done...",
nobs ? " " : "\b\b\b\b\b\b\b\b\b\b\b\b", (int) progress);
- fflush (stderr);
+ flush_stderr();
}
}
}
@@ -1474,7 +1494,7 @@ static int do_tag_extractions (WavpackContext *wpc, char *outfilename)
if (!overwrite_all && (outfile = fopen (full_filename, "r")) != NULL) {
DoCloseHandle (outfile);
fprintf (stderr, "overwrite %s (yes/no/all)? ", FN_FIT (full_filename));
- fflush (stderr);
+ flush_stderr();
if (set_console_title)
DoSetConsoleTitle ("overwrite?");

View File

@ -6,6 +6,7 @@
<file>tools/tta.exe</file>
<file>tools/valdec.exe</file>
<file>tools/wma2wav.exe</file>
<file>tools/wvunpack.exe</file>
<file>tools/wvunpack.i386.exe</file>
<file>tools/wvunpack.x64.exe</file>
</qresource>
</RCC>

Binary file not shown.

BIN
res/tools/wvunpack.i386.exe Normal file

Binary file not shown.

BIN
res/tools/wvunpack.x64.exe Normal file

Binary file not shown.

View File

@ -35,7 +35,7 @@
#define VER_LAMEXP_MINOR_LO 4
#define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 6
#define VER_LAMEXP_BUILD 1906
#define VER_LAMEXP_BUILD 1907
#define VER_LAMEXP_CONFG 1818
///////////////////////////////////////////////////////////////////////////////

View File

@ -111,7 +111,8 @@ g_lamexp_tools[] =
{"509df39fdd7033b0f1af831304d0d6c08b74d5a48e2c038857a78b9dfaa4fb83c6b5c7ea202ba2270c0384607f2316ee", CPU_TYPE_ALL_ALL, "wget.exe", 1140, ""},
{"572b9448bf4a338ecb9727951fdfcc5a219cc69896695cc96b9f6b083690e339910e41558968264a38992e45f2be152c", CPU_TYPE_ALL_ALL, "wma2wav.exe", 20111001, ""},
{"6a5703ccf5b6e42465e9f1e7642fe99d020cbb03f15883d6fcbcf58d197375225242c90486da1b4da0de1795dfbb6164", CPU_TYPE_ALL_ALL, "wupdate.exe", 20160820, ""},
{"cb83e9393e0aceb012611241eb87eca5cc5edb81935a27d902e7435c1314962558044bae8a152e718cc5a56a1280f6b7", CPU_TYPE_ALL_ALL, "wvunpack.exe", 4750, ""},
{"9c742cff64c726b6d9abafcf222c24a7e41d4fa0e44ea962917a91e09c15e52aebc859c1ea028c1c1806702850460e2c", CPU_TYPE_X86_ALL, "wvunpack.i386.exe", 4800, ""},
{"70382b0a9431ec35f419126a5561252e7d5bc05a8a7912c49c54382a3642309372374977ef9186ccd9b733c64a3428bd", CPU_TYPE_X64_ALL, "wvunpack.x64.exe", 4800, ""},
{NULL, NULL, NULL, NULL, NULL}
};