Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package wavpack for openSUSE:Factory checked in at 2021-01-19 16:01:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/wavpack (Old) and /work/SRC/openSUSE:Factory/.wavpack.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "wavpack" Tue Jan 19 16:01:12 2021 rev:30 rq:864086 version:5.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/wavpack/wavpack.changes 2020-04-22 20:42:51.882202594 +0200 +++ /work/SRC/openSUSE:Factory/.wavpack.new.28504/wavpack.changes 2021-01-19 16:01:29.691316526 +0100 @@ -1,0 +2,10 @@ +Mon Jan 18 12:40:18 UTC 2021 - Alexandros Toptsoglou <atoptsog...@suse.com> + +- Update to version 5.4.0 + * CVE-2020-35738: Fixed an out-of-bounds write in WavpackPackSamples (bsc#1180414) + * fixed: disable A32 asm code when building for Apple silicon + * fixed: issues with Adobe-style floating-point WAV files + * added: --normalize-floats option to wvunpack for correctly + exporting un-normalized floating-point files + +------------------------------------------------------------------- Old: ---- wavpack-5.3.0.tar.bz2 New: ---- wavpack-5.4.0.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ wavpack.spec ++++++ --- /var/tmp/diff_new_pack.WR2uCd/_old 2021-01-19 16:01:30.855318285 +0100 +++ /var/tmp/diff_new_pack.WR2uCd/_new 2021-01-19 16:01:30.859318292 +0100 @@ -1,7 +1,7 @@ # # spec file for package wavpack # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %define soname 1 Name: wavpack -Version: 5.3.0 +Version: 5.4.0 Release: 0 Summary: Hybrid Lossless Audio Compression Format License: BSD-3-Clause ++++++ wavpack-5.3.0.tar.bz2 -> wavpack-5.4.0.tar.bz2 ++++++ ++++ 26336 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/COPYING new/wavpack-5.4.0/COPYING --- old/wavpack-5.3.0/COPYING 2020-04-16 23:36:52.000000000 +0200 +++ new/wavpack-5.4.0/COPYING 2021-01-12 21:48:58.000000000 +0100 @@ -1,4 +1,4 @@ - Copyright (c) 1998 - 2020 David Bryant + Copyright (c) 1998 - 2021 David Bryant All rights reserved. Redistribution and use in source and binary forms, with or without diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/ChangeLog new/wavpack-5.4.0/ChangeLog --- old/wavpack-5.3.0/ChangeLog 2020-04-15 05:57:03.000000000 +0200 +++ new/wavpack-5.4.0/ChangeLog 2021-01-10 08:01:08.000000000 +0100 @@ -1,3 +1,48 @@ +2021-01-04 David Bryant <da...@wavpack.com> + + * wavpack.sln, *.vcxproj files + update Visual Studio project files to 2019 version + +2020-12-31 David Bryant <da...@wavpack.com> + + * configure.ac + disable assembly code for ARM64 (which does not exist yet) for Apple silicon build + +2020-12-29 David Bryant <da...@wavpack.com> + + * src/pack_utils.c + - issue #91: fix integer overflows resulting in buffer overruns (CVE-2020-35738) + - sanitize configuration parameters better (improves clarity and aids debugging) + +2020-12-22 David Bryant <da...@wavpack.com> + + * cli/wavpack.c: + fix memory leaks when errors are encountered creating WavPack files + +2020-06-06 David Bryant <da...@wavpack.com> + + * src/common_utils.c: + always have WavpackGetFloatNormExp() report normalized audio when OPEN_NORMALIZE + is specified in open call (which makes more sense than reporting what's in file) + +2020-06-06 David Bryant <da...@wavpack.com> + + * cli/caff_write.c, cli/riff.c, cli/riff_write.c, cli/wave64_write.c, cli/wvunpack.c + - add --normalize-floats switch to enable writing Adobe floating-point files to + standard formats that don't support un-normalized audio + - stop ignoring errors when writing audio file headers + - stop refusing to encode files in Adobe 24.0 format + +2020-06-06 David Bryant <da...@wavpack.com> + + * cli/wvunpack.c: + add quick verify command (-vv) that relies on block checksums instead of decoding audio + +2020-05-07 David Bryant <da...@wavpack.com> + + * cli/wvunpack.c: + display "help" options on command-line errors + 2020-04-14 David Bryant <da...@wavpack.com> * cli/wvunpack.c, cli/wvtag.c: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/NEWS new/wavpack-5.4.0/NEWS --- old/wavpack-5.3.0/NEWS 2020-04-14 20:46:49.000000000 +0200 +++ new/wavpack-5.4.0/NEWS 2021-01-12 22:06:08.000000000 +0100 @@ -1,3 +1,22 @@ + -------------------------------- + Release 5.4.0 - January 10, 2021 + -------------------------------- + + WavPack Library Source Code - 5.4.0 + wavpack.exe (command-line encoder) - 5.4.0 + wvunpack.exe (command-line decoder) - 5.4.0 + wvgain.exe (command-line ReplayGain scanner) - 5.4.0 + wvtag.exe (command-line tagging utility) - 5.4.0 + ---------------------------------------------------- + fixed: potential security issue CVE-2020-35738 + fixed: disable A32 asm code when building for Apple silicon + fixed: issues with Adobe-style floating-point WAV files + added: --normalize-floats option to wvunpack for correctly + exporting un-normalized floating-point files + updated: Visual Studio 2019 for Windows builds + dropped: WinXP support in official binaries + + ------------------------------ Release 5.3.0 - April 14, 2020 ------------------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/cli/caff_write.c new/wavpack-5.4.0/cli/caff_write.c --- old/wavpack-5.3.0/cli/caff_write.c 2020-04-11 23:52:28.000000000 +0200 +++ new/wavpack-5.4.0/cli/caff_write.c 2020-12-28 06:31:14.000000000 +0100 @@ -95,7 +95,7 @@ int num_identified_chans, i; if (float_norm_exp && float_norm_exp != 127) { - error_line ("can't create valid CAFF header for non-normalized floating data!"); + error_line ("invalid float data for CAFF, use --normalize-floats and omit MD5 check!"); free (channel_identities); return FALSE; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/cli/riff.c new/wavpack-5.4.0/cli/riff.c --- old/wavpack-5.3.0/cli/riff.c 2020-02-18 20:34:55.000000000 +0100 +++ new/wavpack-5.4.0/cli/riff.c 2021-01-10 19:15:52.000000000 +0100 @@ -225,6 +225,8 @@ config->float_norm_exp = 127 + 23; else if (WaveHeader.BitsPerSample == 32) config->float_norm_exp = 127 + 15; + + config->bits_per_sample = 32; // make sure this is correct in Adobe modes } if (debug_logging_mode) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/cli/riff_write.c new/wavpack-5.4.0/cli/riff_write.c --- old/wavpack-5.3.0/cli/riff_write.c 2020-02-29 01:33:49.000000000 +0100 +++ new/wavpack-5.4.0/cli/riff_write.c 2021-01-10 19:15:52.000000000 +0100 @@ -64,7 +64,7 @@ int wavhdrsize = 16; if (format == 3 && WavpackGetFloatNormExp (wpc) != 127) { - error_line ("can't create valid RIFF wav header for non-normalized floating data!"); + error_line ("invalid float data for WAV, use --normalize-floats and omit MD5 check!"); return FALSE; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/cli/utils.h new/wavpack-5.4.0/cli/utils.h --- old/wavpack-5.3.0/cli/utils.h 2020-04-14 04:33:06.000000000 +0200 +++ new/wavpack-5.4.0/cli/utils.h 2021-01-10 05:27:51.000000000 +0100 @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////////////////////// // **** WAVPACK **** // // Hybrid Lossless Wavefile Compressor // -// Copyright (c) 1998 - 2006 Conifer Software. // +// Copyright (c) 1998 - 2020 Conifer Software. // // All Rights Reserved. // // Distributed under the BSD Software License (see license.txt) // //////////////////////////////////////////////////////////////////////////// @@ -28,7 +28,7 @@ #else #define VERSION_OS "Win32" #endif -#define PACKAGE_VERSION "5.3.0" +#define PACKAGE_VERSION "5.4.0" #endif #define FALSE 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/cli/wave64_write.c new/wavpack-5.4.0/cli/wave64_write.c --- old/wavpack-5.3.0/cli/wave64_write.c 2020-02-18 20:34:55.000000000 +0100 +++ new/wavpack-5.4.0/cli/wave64_write.c 2020-12-28 06:31:14.000000000 +0100 @@ -56,7 +56,7 @@ int wavhdrsize = 16; if (format == 3 && WavpackGetFloatNormExp (wpc) != 127) { - error_line ("can't create valid Wave64 header for non-normalized floating data!"); + error_line ("invalid float data for W64, use --normalize-floats and omit MD5 check!"); return FALSE; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/cli/wavpack.c new/wavpack-5.4.0/cli/wavpack.c --- old/wavpack-5.3.0/cli/wavpack.c 2020-04-13 00:26:26.000000000 +0200 +++ new/wavpack-5.4.0/cli/wavpack.c 2021-01-10 19:15:52.000000000 +0100 @@ -1737,6 +1737,8 @@ error_line ("can't create file %s!", use_tempfiles ? outfilename_temp : outfilename); DoCloseHandle (infile); WavpackCloseFile (wpc); + free (outfilename_temp); + free (out2filename_temp); return WAVPACK_SOFT_ERROR; } @@ -1769,6 +1771,8 @@ DoCloseHandle (wv_file.file); DoDeleteFile (use_tempfiles ? outfilename_temp : outfilename); WavpackCloseFile (wpc); + free (outfilename_temp); + free (out2filename_temp); return WAVPACK_SOFT_ERROR; } @@ -1784,6 +1788,8 @@ DoCloseHandle (wv_file.file); DoDeleteFile (use_tempfiles ? outfilename_temp : outfilename); WavpackCloseFile (wpc); + free (outfilename_temp); + free (out2filename_temp); return WAVPACK_SOFT_ERROR; } @@ -1797,6 +1803,8 @@ DoCloseHandle (wv_file.file); DoDeleteFile (use_tempfiles ? outfilename_temp : outfilename); WavpackCloseFile (wpc); + free (outfilename_temp); + free (out2filename_temp); return WAVPACK_SOFT_ERROR; } } @@ -1819,6 +1827,8 @@ DoCloseHandle (wv_file.file); DoDeleteFile (use_tempfiles ? outfilename_temp : outfilename); WavpackCloseFile (wpc); + free (outfilename_temp); + free (out2filename_temp); return WAVPACK_SOFT_ERROR; } } @@ -1850,6 +1860,8 @@ DoCloseHandle (wv_file.file); DoDeleteFile (use_tempfiles ? outfilename_temp : outfilename); WavpackCloseFile (wpc); + free (outfilename_temp); + free (out2filename_temp); return WAVPACK_SOFT_ERROR; } @@ -1885,6 +1897,8 @@ DoCloseHandle (wv_file.file); DoDeleteFile (use_tempfiles ? outfilename_temp : outfilename); WavpackCloseFile (wpc); + free (outfilename_temp); + free (out2filename_temp); return WAVPACK_SOFT_ERROR; } } @@ -2132,6 +2146,8 @@ DoDeleteFile (use_tempfiles ? out2filename_temp : out2filename); WavpackCloseFile (wpc); + free (outfilename_temp); + free (out2filename_temp); return result; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/cli/wvunpack.c new/wavpack-5.4.0/cli/wvunpack.c --- old/wavpack-5.3.0/cli/wvunpack.c 2020-04-15 22:40:11.000000000 +0200 +++ new/wavpack-5.4.0/cli/wvunpack.c 2021-01-10 03:46:55.000000000 +0100 @@ -57,6 +57,7 @@ #define fopen(f,m) fopen_utf8(f,m) #define strdup(x) _strdup(x) #define snprintf _snprintf +#define fileno _fileno #endif ///////////////////////////// local variable storage ////////////////////////// @@ -92,6 +93,7 @@ " -s = display summary information only to stdout (no audio decode)\n" " -ss = display super summary (including tags) to stdout (no decode)\n" " -v = verify source data only (no output file created)\n" +" -vv = quick verify (no output, version 5+ files only)\n" " --help = complete help\n\n" " Web: Visit www.wavpack.com for latest version and info\n"; @@ -138,6 +140,8 @@ #endif " -m calculate and display MD5 signature; verify if lossless\n" " -n no audio decoding (use with -xx to extract tags only)\n" +" --normalize-floats normalize float audio to +/-1.0 if it isn't already\n" +" (rarely the case, but alters audio and fails MD5)\n" #ifdef _WIN32 " --no-utf8-convert leave tag items in UTF-8 when extracting to files\n" " --pause pause before exiting (if console window disappears)\n" @@ -158,6 +162,8 @@ " (adding '+' makes sample/time relative to '--skip'\n" " point; adding '-' makes sample/time relative to end)\n" " -v verify source data only (no output file created)\n" +" -vv quick verify (no output, version 5+ files only)\n" +" -vvv quick verify verbose (for debugging)\n" " --version write the version to stdout\n" " -w or --wav force output to Microsoft RIFF/RF64 (extension .wav)\n" " --w64 force output to Sony Wave64 format (extension .w64)\n" @@ -200,7 +206,7 @@ int debug_logging_mode; -static int overwrite_all, delete_source, raw_decode, no_utf8_convert, no_audio_decode, file_info, +static int overwrite_all, delete_source, raw_decode, normalize_floats, no_utf8_convert, no_audio_decode, file_info, summary, ignore_wvc, quiet_mode, calc_md5, copy_time, blind_decode, decode_format, format_specified, caf_be, set_console_title; static int num_files, file_index, outbuf_k; @@ -223,6 +229,7 @@ static void add_tag_extraction_to_list (char *spec); static void parse_sample_time_index (struct sample_time_index *dst, char *src); static int unpack_file (char *infilename, char *outfilename, int add_extension); +static int quick_verify_file (char *infilename, int verbose); static void display_progress (double file_progress); #ifdef _WIN32 @@ -300,6 +307,8 @@ else if (!strcmp (long_option, "pause")) // --pause pause_mode = 1; #endif + else if (!strcmp (long_option, "normalize-floats")) // --normalize-floats + normalize_floats = 1; else if (!strcmp (long_option, "no-utf8-convert")) // --no-utf8-convert no_utf8_convert = 1; else if (!strncmp (long_option, "skip", 4)) { // --skip @@ -394,7 +403,7 @@ break; case 'V': case 'v': - verify_only = 1; + ++verify_only; break; case 'F': case 'f': @@ -553,6 +562,11 @@ ++error_count; } + if (verify_only > 1 && calc_md5) { + error_line ("can't calculate MD5s in quick verify mode!"); + ++error_count; + } + if (c_count == 1) { if (tag_extract_stdout) { error_line ("can't extract more than 1 tag item to stdout at a time!"); @@ -583,13 +597,16 @@ fflush (stderr); } - if (!num_files) { - printf ("%s", usage); + if (error_count) { + fprintf (stderr, "\ntype 'wvunpack' for short help or 'wvunpack --help' for full help\n"); + fflush (stderr); return 1; } - if (error_count) + if (!num_files) { + printf ("%s", usage); return 1; + } setup_break (); @@ -793,7 +810,17 @@ fflush (stderr); } - result = unpack_file (matches [file_index], verify_only ? NULL : outfilename, add_extension); + if (verify_only > 1) { + result = quick_verify_file (matches [file_index], verify_only > 2); + + // quick_verify_file() returns hard error to mean file cannot be quickly verified + // because it has no block checksums, so fall back to standard slow verify + + if (result == WAVPACK_HARD_ERROR) + result = unpack_file (matches [file_index], NULL, 0); + } + else + result = unpack_file (matches [file_index], verify_only ? NULL : outfilename, add_extension); if (result != WAVPACK_NO_ERROR) ++error_count; @@ -1014,6 +1041,406 @@ return retval; } +// Read from current file position until a valid 32-byte WavPack 4+ header is +// found and read into the specified pointer. The number of bytes skipped is +// returned. If no WavPack header is found within 1 meg, then a -1 is returned +// to indicate the error. No additional bytes are read past the header and it +// is returned in the processor's native endian mode. Seeking is not required. + +static uint32_t read_next_header (FILE *infile, WavpackHeader *wphdr) +{ + unsigned char buffer [sizeof (*wphdr)], *sp = buffer + sizeof (*wphdr), *ep = sp; + uint32_t bytes_skipped = 0; + int bleft; + + while (1) { + if (sp < ep) { + bleft = (int)(ep - sp); + memmove (buffer, sp, bleft); + } + else + bleft = 0; + + if (fread (buffer + bleft, 1, sizeof (*wphdr) - bleft, infile) != (int32_t) sizeof (*wphdr) - bleft) + return -1; + + sp = buffer; + + if (*sp++ == 'w' && *sp == 'v' && *++sp == 'p' && *++sp == 'k' && + !(*++sp & 1) && sp [2] < 16 && !sp [3] && (sp [2] || sp [1] || *sp >= 24) && sp [5] == 4 && + sp [4] >= (MIN_STREAM_VERS & 0xff) && sp [4] <= (MAX_STREAM_VERS & 0xff) && sp [18] < 3 && !sp [19]) { + memcpy (wphdr, buffer, sizeof (*wphdr)); + WavpackLittleEndianToNative (wphdr, WavpackHeaderFormat); + return bytes_skipped; + } + + while (sp < ep && *sp != 'w') + sp++; + + if ((bytes_skipped += (uint32_t)(sp - buffer)) > 1024 * 1024) + return -1; + } +} + +// Quickly verify specified file using only block checksums and simple continuity checks. Avoids +// decoding audio, or even opening the file with libwavpack. A return value of WAVPACK_HARD_ERROR +// indicates that the file does not contain block checksums (introduced with WavPack 5) and so can +// only be verified by actually decoding audio. A return value of WAVPACK_SOFT_ERROR indicates at +// least one error was detected. The "verbose" parameter can be used to enable extra messaging for +// debugging purposes. + +static int quick_verify_file (char *infilename, int verbose) +{ + int64_t file_size, block_index, bytes_read = 0, total_samples = 0; + int block_errors = 0, continuity_errors = 0, missing_checksums = 0, truncated = 0; + int block_errors_c = 0, continuity_errors_c = 0, missing_checksums_c = 0, truncated_c = 0; + int num_channels = 0, chan_index = 0, wvc_mode = 0, block_samples; + FILE *(*fopen_func)(const char *, const char *) = fopen; + double dtime, progress = -1.0; + WavpackHeader wphdr, wphdr_c; + unsigned char *block_buffer; + FILE *infile, *infile_c; + uint32_t bytes_skipped; + +#ifdef _WIN32 + struct __timeb64 time1, time2; +#else + struct timeval time1, time2; + struct timezone timez; +#endif + +#ifdef _WIN32 + fopen_func = fopen_utf8; +#endif + + if (*infilename == '-') { + infile = stdin; +#ifdef _WIN32 + _setmode (fileno (stdin), O_BINARY); +#endif +#ifdef __OS2__ + setmode (fileno (stdin), O_BINARY); +#endif + } + else + infile = fopen_func (infilename, "rb"); + + if (!infile) { + error_line ("quick verify: can't open file!"); + return WAVPACK_SOFT_ERROR; + } + + file_size = DoGetFileSize (infile); + bytes_skipped = read_next_header (infile, &wphdr); + + if (bytes_skipped == (uint32_t) -1) { + fclose (infile); + error_line ("quick verify: not a valid WavPack file!"); + return WAVPACK_SOFT_ERROR; + } + + bytes_read = sizeof (wphdr) + bytes_skipped; + + // Legacy files without block checksums can't really be verified quickly. If they're a + // a regular file we can retry with the regular verify, otherwise it's just a failure. + + if (!(wphdr.flags & HAS_CHECKSUM)) { + if (*infilename == '-') { + fclose (infile); + error_line ("quick verify: legacy files cannot be quickly verified!"); + return WAVPACK_SOFT_ERROR; + } + else { + fclose (infile); + if (verbose) error_line ("quick verify: legacy file, switching to regular verify!"); + return WAVPACK_HARD_ERROR; + } + } + + // check for and open any correction file + + if ((wphdr.flags & HYBRID_FLAG) && infile != stdin && !ignore_wvc) { + char *infilename_c = malloc (strlen (infilename) + 10); + + strcpy (infilename_c, infilename); + strcat (infilename_c, "c"); + infile_c = fopen_func (infilename_c, "rb"); + free (infilename_c); + + if (infile_c) { + wvc_mode = 1; + file_size += DoGetFileSize (infile_c); + bytes_skipped = read_next_header (infile_c, &wphdr_c); + + if (bytes_skipped == (uint32_t) -1) { + fclose (infile); fclose (infile_c); + error_line ("quick verify: not a valid WavPack correction file!"); + return WAVPACK_SOFT_ERROR; + } + + bytes_read += sizeof (wphdr_c) + bytes_skipped; + + if (!(wphdr_c.flags & HAS_CHECKSUM)) { + fclose (infile); fclose (infile_c); + if (verbose) error_line ("quick verify: legacy correction file, switching to regular verify!"); + return WAVPACK_HARD_ERROR; + } + + if (verbose) error_line ("quick verify: correction file found"); + } + } + + if (!quiet_mode) { + fprintf (stderr, "verifying %s%s,", *infilename == '-' ? "stdin" : + FN_FIT (infilename), wvc_mode ? " (+.wvc)" : ""); + fflush (stderr); + } + +#if defined(_WIN32) + _ftime64 (&time1); +#else + gettimeofday(&time1,&timez); +#endif + + while (1) { + + // the continuity checks only apply to blocks with audio samples + + if (wphdr.block_samples) { + + // the first block with samples (indicated by total_samples == 0) has special significance + + if (!total_samples) { + block_index = GET_BLOCK_INDEX (wphdr); + + if (block_index) { + if (verbose) error_line ("quick verify warning: file block index doesn't start at zero"); + total_samples = -1; + } + else { + total_samples = GET_TOTAL_SAMPLES (wphdr); + + if (total_samples == -1 && verbose) + error_line ("quick verify warning: file duration unknown"); + } + } + + if (block_index != GET_BLOCK_INDEX (wphdr)) { + block_index = GET_BLOCK_INDEX (wphdr); + continuity_errors++; + } + + if (wphdr.flags & INITIAL_BLOCK) { + block_samples = wphdr.block_samples; + chan_index = 0; + } + else if (wphdr.block_samples != block_samples) + continuity_errors++; + } + + // read the body of the block and use libwavpack to parse it and verify its checksum + + block_buffer = malloc (sizeof (wphdr) + wphdr.ckSize - 24); + memcpy (block_buffer, &wphdr, sizeof (wphdr)); + + if (!fread (block_buffer + sizeof (wphdr), wphdr.ckSize - 24, 1, infile)) { + if (verbose) error_line ("quick verify error:%sfile is truncated!\n", wvc_mode ? " main " : " "); + free (block_buffer); + truncated = 1; + break; + } + + bytes_read += wphdr.ckSize - 24; + + // this is the libwavpack call that actually verifies the block's checksum + + if (!WavpackVerifySingleBlock (block_buffer, 1)) + block_errors++; + + free (block_buffer); + + // more stuff that only applies to blocks with audio... + + if (wphdr.block_samples) { + + // handle checking the corresponding correction file block here + + if (wvc_mode && !truncated_c) { + unsigned char *block_buffer_c; + int got_match = 0; + + while (!got_match && GET_BLOCK_INDEX (wphdr_c) <= GET_BLOCK_INDEX (wphdr)) { + + if (GET_BLOCK_INDEX (wphdr_c) == GET_BLOCK_INDEX (wphdr)) { + if (wphdr_c.block_samples == wphdr.block_samples && + wphdr_c.flags == wphdr.flags) + got_match = 1; + else + break; + } + + block_buffer_c = malloc (sizeof (wphdr_c) + wphdr_c.ckSize - 24); + memcpy (block_buffer_c, &wphdr_c, sizeof (wphdr_c)); + + if (!fread (block_buffer_c + sizeof (wphdr_c), wphdr_c.ckSize - 24, 1, infile_c)) { + if (verbose) error_line ("quick verify error: correction file is truncated!"); + free (block_buffer_c); + truncated_c = 1; + break; + } + + bytes_read += wphdr_c.ckSize - 24; + + if (!WavpackVerifySingleBlock (block_buffer_c, 1)) + block_errors_c++; + + bytes_skipped = read_next_header (infile_c, &wphdr_c); + + if (bytes_skipped == (uint32_t) -1) + break; + + bytes_read += sizeof (wphdr_c) + bytes_skipped; + + if (!(wphdr_c.flags & HAS_CHECKSUM)) + missing_checksums_c++; + + if (bytes_skipped && verbose) + error_line ("quick verify warning: %u bytes skipped in correction file", bytes_skipped); + } + + if (!got_match) + continuity_errors_c++; + } + + chan_index += (wphdr.flags & MONO_FLAG) ? 1 : 2; + + // on the final block make sure we got all required channels, and get ready for the next sequence + + if (wphdr.flags & FINAL_BLOCK) { + if (num_channels) { + if (num_channels != chan_index) { + if (verbose) error_line ("quick verify error: channel count changed %d --> %d", num_channels, chan_index); + num_channels = chan_index; + continuity_errors++; + } + } + else { + num_channels = chan_index; + if (verbose) error_line ("quick verify: channel count = %d", num_channels); + } + + block_index += block_samples; + chan_index = 0; + } + } + + // all done with that block, so read the next header + + bytes_skipped = read_next_header (infile, &wphdr); + + if (bytes_skipped == (uint32_t) -1) + break; + + bytes_read += sizeof (wphdr) + bytes_skipped; + + // while all blocks should ideally have checksums, beta versions might not have + // appended them to non-audio blocks, so we can ignore those cases for now + + if (wphdr.block_samples && !(wphdr.flags & HAS_CHECKSUM)) + missing_checksums++; + + if (bytes_skipped && verbose) + error_line ("quick verify warning: %u bytes skipped", bytes_skipped); + + if (check_break ()) { +#if defined(_WIN32) + fprintf (stderr, "^C\n"); +#else + fprintf (stderr, "\n"); +#endif + fflush (stderr); + fclose (infile); + if (wvc_mode) fclose (infile_c); + return WAVPACK_SOFT_ERROR; + } + + if (file_size && progress != floor ((double) bytes_read / file_size * 100.0 + 0.5)) { + int nobs = progress == -1.0; + + progress = (double) bytes_read / file_size; + display_progress (progress); + progress = floor (progress * 100.0 + 0.5); + + 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); + } + } + } + + // all done, so close the files and report the results + + if (wvc_mode) fclose (infile_c); + fclose (infile); + + if (truncated || block_errors || continuity_errors || missing_checksums || + truncated_c || block_errors_c || continuity_errors_c || missing_checksums_c) { + int total_errors_c = truncated_c + block_errors_c + continuity_errors_c + missing_checksums_c; + int total_errors = truncated + block_errors + continuity_errors + missing_checksums; + + if (verbose) { + if (total_errors - truncated) + error_line ("quick verify%serrors: %d missing checksums, %d bad blocks, %d discontinuities!", + wvc_mode ? " [main] " : " ", missing_checksums, block_errors, continuity_errors); + + if (total_errors_c - truncated_c) + error_line ("quick verify [correction] errors: %d missing checksums, %d bad blocks, %d discontinuities!", + missing_checksums_c, block_errors_c, continuity_errors_c); + } + else { + if (wvc_mode && !total_errors) + error_line ("quick verify: %d errors detected in correction file, main file okay!", total_errors_c); + else if (wvc_mode) + error_line ("quick verify: %d errors detected in main and correction files!", total_errors + total_errors_c); + else + error_line ("quick verify: %d errors detected!", total_errors); + } + + return WAVPACK_SOFT_ERROR; + } + + if (total_samples != -1 && total_samples != block_index) { + if (total_samples < block_index) + error_line ("quick verify: WavPack file contains %lld extra samples!", block_samples - total_samples); + else + error_line ("quick verify: WavPack file is missing %lld samples!", total_samples - block_samples); + + return WAVPACK_SOFT_ERROR; + } + +#if defined(_WIN32) + _ftime64 (&time2); + dtime = time2.time + time2.millitm / 1000.0; + dtime -= time1.time + time1.millitm / 1000.0; +#else + gettimeofday(&time2,&timez); + dtime = time2.tv_sec + time2.tv_usec / 1000000.0; + dtime -= time1.tv_sec + time1.tv_usec / 1000000.0; +#endif + + if (!quiet_mode) { + char *file, *fext; + + file = (*infilename == '-') ? "stdin" : FN_FIT (infilename); + fext = wvc_mode ? " (+.wvc)" : ""; + + error_line ("quickly verified %s%s in %.2f secs", file, fext, dtime); + } + + return WAVPACK_NO_ERROR; +} + // Unpack the specified WavPack input file into the specified output file name. // This function uses the library routines provided in wputils.c to do all // unpacking. This function takes care of reformatting the data (which is @@ -1059,6 +1486,9 @@ open_flags |= OPEN_FILE_UTF8; #endif + if (normalize_floats) + open_flags |= OPEN_NORMALIZE; + if ((outfilename && !raw_decode && !blind_decode && !format_specified && !skip.value_is_valid && !until.value_is_valid) || summary > 1) open_flags |= OPEN_WRAPPER; @@ -1315,10 +1745,12 @@ total_unpacked_samples = until_samples_total; - if (output_qmode & QMODE_DSD_AUDIO) - result = unpack_dsd_audio (wpc, outfile, output_qmode, calc_md5 ? md5_unpacked : NULL, &total_unpacked_samples); - else - result = unpack_audio (wpc, outfile, output_qmode, calc_md5 ? md5_unpacked : NULL, &total_unpacked_samples); + if (result == WAVPACK_NO_ERROR) { + if (output_qmode & QMODE_DSD_AUDIO) + result = unpack_dsd_audio (wpc, outfile, output_qmode, calc_md5 ? md5_unpacked : NULL, &total_unpacked_samples); + else + result = unpack_audio (wpc, outfile, output_qmode, calc_md5 ? md5_unpacked : NULL, &total_unpacked_samples); + } // if the file format has chunk alignment requirements, and our data chunk does not align, write padding bytes here diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/compile new/wavpack-5.4.0/compile --- old/wavpack-5.3.0/compile 2017-07-24 03:59:22.000000000 +0200 +++ new/wavpack-5.4.0/compile 2020-12-28 06:32:10.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # Written by Tom Tromey <tro...@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -255,7 +255,8 @@ echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -339,9 +340,9 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/configure.ac new/wavpack-5.4.0/configure.ac --- old/wavpack-5.3.0/configure.ac 2020-04-14 04:34:31.000000000 +0200 +++ new/wavpack-5.4.0/configure.ac 2021-01-10 05:23:34.000000000 +0100 @@ -1,12 +1,12 @@ -# wavpack 5.3.0 configure.ac +# wavpack 5.4.0 configure.ac -AC_INIT(wavpack, 5.3.0, bry...@wavpack.com) +AC_INIT(wavpack, 5.4.0, bry...@wavpack.com) AC_CONFIG_SRCDIR([src/pack.c]) AM_INIT_AUTOMAKE AM_MAINTAINER_MODE LIBWAVPACK_MAJOR=5 -LIBWAVPACK_MINOR=3 +LIBWAVPACK_MINOR=4 LIBWAVPACK_MICRO=0 LIBWAVPACK_VERSION_STRING=$LIBWAVPACK_MAJOR.$LIBWAVPACK_MINOR.$LIBWAVPACK_MICRO @@ -21,7 +21,7 @@ # ? : +1 : ? == internal changes that doesn't break anything. # CURRENT : REVISION : AGE LT_CURRENT=3 -LT_REVISION=2 +LT_REVISION=3 LT_AGE=2 AC_SUBST(LT_CURRENT) @@ -164,6 +164,7 @@ AS_CASE([$host_cpu], [i386|i486|i586|i686|i786], [AC_DEFINE([OPT_ASM_X86]) asm_selected=x86], [x86_64], [AC_DEFINE([OPT_ASM_X64]) asm_selected=x64], + [arm64*], [AS_IF([test "x$enable_asm" = "xyes"],[AC_MSG_ERROR(no assembly code for CPU $host_cpu)])], [arm*], [AC_DEFINE([OPT_ASM_ARM]) asm_selected=arm], [AS_IF([test "x$enable_asm" = "xyes"],[AC_MSG_ERROR(no assembly code for CPU $host_cpu)])] ) Binary files old/wavpack-5.3.0/doc/WavPack5LibraryDoc.pdf and new/wavpack-5.4.0/doc/WavPack5LibraryDoc.pdf differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/doc/wavpack_doc.html new/wavpack-5.4.0/doc/wavpack_doc.html --- old/wavpack-5.3.0/doc/wavpack_doc.html 2020-04-14 04:37:12.000000000 +0200 +++ new/wavpack-5.4.0/doc/wavpack_doc.html 2021-01-10 07:54:33.000000000 +0100 @@ -108,7 +108,7 @@ <body> <div class="container"> <div class="pageTitle"> - <div class="pageHeader">Using WavPack Version 5.3.0</div> + <div class="pageHeader">Using WavPack Version 5.4.0</div> </div> <div class="pageMenu"> <a href="index.html">Home</a> - @@ -626,9 +626,10 @@ header contained in the source file (and any extra chunks). Obviously the source header is still used to determine the format and size of the file (i.e. this is not a "raw" mode). When the file is restored with WvUnpack, a generic header will be - generated appropriate for the format. Note that this option cannot be used with - certain floating-point wav files generated by CoolEdit or Audition because they - are not properly normalized. + generated appropriate for the format. Note that if this option is used with + certain floating-point WAV files generated by CoolEdit or Audition that are not + normalized, the --normalize-floats option of WvUnpack will have to be used when + converting them back to standard PCM formats. </p> <p> @@ -956,6 +957,20 @@ Use this option with the <b>-xx</b> and <b>-cc</b> options to perform the tag extraction only. </p> <p> + <b><tt>--normalize-floats = normalize floating-point audio if it isn't already</tt></b> + </p> + <p> + Floating-point audio is considered "normalized" when the fullscale range is +/-1.0 (although + peaks may exceed this range, which is one of its advantages). Most PCM file formats (WAV, CAF, etc) + require normalized floating-point audio, but it's possible to have WavPack floating-point audio + files that are normalized to a different range, specifically those created from certain Cool Edit + or Adobe Audition versions. If it is desired to export such files to a standard PCM format (or a + normalized raw file) then include this option. Note that since the audio will be scaled, the + operation will no longer be strictly lossless and so the option for verifiying the MD5 checksum + should not be used. + </p> + <p> + <p> <b><tt>--no-utf8-convert = leave tag items in UTF-8 on extract or display</tt></b> </p> <p> @@ -1051,6 +1066,26 @@ </p> <p> + <b><tt>-vv = quick verify (no output, version 5+ files only)</tt></b> + </p> + <p> + WavPack blocks have always contained a checksum for the audio data that is + used during decoding (or verifying) to make sure the block is not corrupt. + Starting with version 5 however, WavPack blocks contain an additional checksum + for the <i>encoded</i> data block which is used to increase robustness during decode + by rejecting corrupt blocks before they are even parsed. + </p> + <p> + This option allows the user to verify the blocks in a WavPack file using just these + additional checksums, and because the audio is not decoded this operation is <i>much</i> + faster than the regular verify option (-v). It is not as complete as the full verify + for detecting all possible issues, but should easily detect the case where a WavPack + file has been corrupted due to a transfer or storage problem. This operation will + automatically fall back to the regular (slow) verify mode if older files that do not + have the new checksum are encountered. + </p> + + <p> <b><tt>--version = display program version to stdout</tt></b> </p> <p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/man/wavpack.1 new/wavpack-5.4.0/man/wavpack.1 --- old/wavpack-5.3.0/man/wavpack.1 2020-04-14 04:44:33.000000000 +0200 +++ new/wavpack-5.4.0/man/wavpack.1 2021-01-10 05:12:45.000000000 +0100 @@ -1,13 +1,13 @@ '\" t .\" Title: wavpack .\" Author: Sebastian Dr??ge <sl...@debian.org> -.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> -.\" Date: 2020-04-13 +.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> +.\" Date: 2021-01-10 .\" Manual: WavPack Executable Programs -.\" Source: WavPack 5.3.0 +.\" Source: WavPack 5.4.0 .\" Language: English .\" -.TH "WAVPACK" "1" "2020\-04\-13" "WavPack 5\&.3\&.0" "WavPack Executable Programs" +.TH "WAVPACK" "1" "2021\-01\-10" "WavPack 5\&.4\&.0" "WavPack Executable Programs" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -409,5 +409,5 @@ .br Copyright \(co 2005 Sebastian Dr??ge .br -Copyright \(co 2020 David Bryant +Copyright \(co 2021 David Bryant .br diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/man/wavpack.xml new/wavpack-5.4.0/man/wavpack.xml --- old/wavpack-5.3.0/man/wavpack.xml 2020-04-14 04:41:18.000000000 +0200 +++ new/wavpack-5.4.0/man/wavpack.xml 2021-01-10 04:58:56.000000000 +0100 @@ -21,16 +21,16 @@ <holder>Sebastian Dr??ge</holder> </copyright> <copyright> - <year>2020</year> + <year>2021</year> <holder>David Bryant</holder> </copyright> - <date>2020-04-13</date> + <date>2021-01-10</date> </refentryinfo> <refmeta> <refentrytitle>wavpack</refentrytitle> <refmiscinfo class="source">WavPack</refmiscinfo> <refmiscinfo class="manual">WavPack Executable Programs</refmiscinfo> - <refmiscinfo class="version">5.3.0</refmiscinfo> + <refmiscinfo class="version">5.4.0</refmiscinfo> <manvolnum>1</manvolnum> </refmeta> <refnamediv> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/man/wvgain.1 new/wavpack-5.4.0/man/wvgain.1 --- old/wavpack-5.3.0/man/wvgain.1 2020-04-14 04:44:34.000000000 +0200 +++ new/wavpack-5.4.0/man/wvgain.1 2021-01-10 05:12:45.000000000 +0100 @@ -1,13 +1,13 @@ '\" t .\" Title: wvgain .\" Author: Sebastian Dr??ge <sl...@debian.org> -.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> -.\" Date: 2020-04-13 +.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> +.\" Date: 2021-01-10 .\" Manual: WavPack Executable Programs -.\" Source: WavPack 5.3.0 +.\" Source: WavPack 5.4.0 .\" Language: English .\" -.TH "WVGAIN" "1" "2020\-04\-13" "WavPack 5\&.3\&.0" "WavPack Executable Programs" +.TH "WVGAIN" "1" "2021\-01\-10" "WavPack 5\&.4\&.0" "WavPack Executable Programs" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -114,5 +114,5 @@ .br Copyright \(co 2005 Sebastian Dr??ge .br -Copyright \(co 2020 David Bryant +Copyright \(co 2021 David Bryant .br diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/man/wvgain.xml new/wavpack-5.4.0/man/wvgain.xml --- old/wavpack-5.3.0/man/wvgain.xml 2020-04-14 04:41:55.000000000 +0200 +++ new/wavpack-5.4.0/man/wvgain.xml 2021-01-10 04:59:28.000000000 +0100 @@ -21,16 +21,16 @@ <holder>Sebastian Dr??ge</holder> </copyright> <copyright> - <year>2020</year> + <year>2021</year> <holder>David Bryant</holder> </copyright> - <date>2020-04-13</date> + <date>2021-01-10</date> </refentryinfo> <refmeta> <refentrytitle>wvgain</refentrytitle> <refmiscinfo class="source">WavPack</refmiscinfo> <refmiscinfo class="manual">WavPack Executable Programs</refmiscinfo> - <refmiscinfo class="version">5.3.0</refmiscinfo> + <refmiscinfo class="version">5.4.0</refmiscinfo> <manvolnum>1</manvolnum> </refmeta> <refnamediv> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/man/wvtag.1 new/wavpack-5.4.0/man/wvtag.1 --- old/wavpack-5.3.0/man/wvtag.1 2020-04-14 04:44:34.000000000 +0200 +++ new/wavpack-5.4.0/man/wvtag.1 2021-01-10 05:12:46.000000000 +0100 @@ -1,13 +1,13 @@ '\" t .\" Title: wvtag .\" Author: David Bryant <da...@wavpack.com> -.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> -.\" Date: 2020-04-13 +.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> +.\" Date: 2021-01-10 .\" Manual: WavPack Executable Programs -.\" Source: WavPack 5.3.0 +.\" Source: WavPack 5.4.0 .\" Language: English .\" -.TH "WVTAG" "1" "2020\-04\-13" "WavPack 5\&.3\&.0" "WavPack Executable Programs" +.TH "WVTAG" "1" "2021\-01\-10" "WavPack 5\&.4\&.0" "WavPack Executable Programs" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -171,5 +171,5 @@ .RE .SH "COPYRIGHT" .br -Copyright \(co 2020 David Bryant +Copyright \(co 2021 David Bryant .br diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/man/wvtag.xml new/wavpack-5.4.0/man/wvtag.xml --- old/wavpack-5.3.0/man/wvtag.xml 2020-04-14 04:42:33.000000000 +0200 +++ new/wavpack-5.4.0/man/wvtag.xml 2021-01-10 04:59:53.000000000 +0100 @@ -11,16 +11,16 @@ <contrib>Author</contrib> </author> <copyright> - <year>2020</year> + <year>2021</year> <holder>David Bryant</holder> </copyright> - <date>2020-04-13</date> + <date>2021-01-10</date> </refentryinfo> <refmeta> <refentrytitle>wvtag</refentrytitle> <refmiscinfo class="source">WavPack</refmiscinfo> <refmiscinfo class="manual">WavPack Executable Programs</refmiscinfo> - <refmiscinfo class="version">5.3.0</refmiscinfo> + <refmiscinfo class="version">5.4.0</refmiscinfo> <manvolnum>1</manvolnum> </refmeta> <refnamediv> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/man/wvunpack.1 new/wavpack-5.4.0/man/wvunpack.1 --- old/wavpack-5.3.0/man/wvunpack.1 2020-04-14 04:44:34.000000000 +0200 +++ new/wavpack-5.4.0/man/wvunpack.1 2021-01-10 08:09:16.000000000 +0100 @@ -1,13 +1,13 @@ '\" t .\" Title: wvunpack .\" Author: Sebastian Dr??ge <sl...@debian.org> -.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> -.\" Date: 2020-04-13 +.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> +.\" Date: 2021-01-10 .\" Manual: WavPack Executable Programs -.\" Source: WavPack 5.3.0 +.\" Source: WavPack 5.4.0 .\" Language: English .\" -.TH "WVUNPACK" "1" "2020\-04\-13" "WavPack 5\&.3\&.0" "WavPack Executable Programs" +.TH "WVUNPACK" "1" "2021\-01\-10" "WavPack 5\&.4\&.0" "WavPack Executable Programs" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -232,6 +232,11 @@ to extract tags only) .RE .PP +\fB\-\-normalize\-floats\fR +.RS 4 +normalize float audio to +/\-1\&.0 if it isn\*(Aqt already (rarely the case, but alters audio and fails MD5) +.RE +.PP \fB\-\-no\-utf8\-convert\fR .RS 4 leave extracted text tags in UTF\-8 encoding during extraction or display @@ -299,6 +304,11 @@ verify source data only (no output file created) .RE .PP +\fB\-vv\fR +.RS 4 +quick verify (no output, version 5+ files only) +.RE +.PP \fB\-\-version\fR .RS 4 write program version to @@ -375,5 +385,5 @@ .br Copyright \(co 2005 Sebastian Dr??ge .br -Copyright \(co 2020 David Bryant +Copyright \(co 2021 David Bryant .br diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/man/wvunpack.xml new/wavpack-5.4.0/man/wvunpack.xml --- old/wavpack-5.3.0/man/wvunpack.xml 2020-04-14 04:43:13.000000000 +0200 +++ new/wavpack-5.4.0/man/wvunpack.xml 2021-01-10 08:08:50.000000000 +0100 @@ -21,16 +21,16 @@ <holder>Sebastian Dr??ge</holder> </copyright> <copyright> - <year>2020</year> + <year>2021</year> <holder>David Bryant</holder> </copyright> - <date>2020-04-13</date> + <date>2021-01-10</date> </refentryinfo> <refmeta> <refentrytitle>wvunpack</refentrytitle> <refmiscinfo class="source">WavPack</refmiscinfo> <refmiscinfo class="manual">WavPack Executable Programs</refmiscinfo> - <refmiscinfo class="version">5.3.0</refmiscinfo> + <refmiscinfo class="version">5.4.0</refmiscinfo> <manvolnum>1</manvolnum> </refmeta> <refnamediv> @@ -166,6 +166,10 @@ <listitem> <para>no audio decoding (use with <option>-xx</option> to extract tags only)</para> </listitem> </varlistentry> <varlistentry> + <term> <option>--normalize-floats</option> </term> + <listitem> <para>normalize float audio to +/-1.0 if it isn't already (rarely the case, but alters audio and fails MD5)</para> </listitem> + </varlistentry> + <varlistentry> <term> <option>--no-utf8-convert</option> </term> <listitem> <para>leave extracted text tags in UTF-8 encoding during extraction or display</para> </listitem> </varlistentry> @@ -223,6 +227,10 @@ <listitem> <para>verify source data only (no output file created)</para> </listitem> </varlistentry> <varlistentry> + <term> <option>-vv</option> </term> + <listitem> <para>quick verify (no output, version 5+ files only)</para> </listitem> + </varlistentry> + <varlistentry> <term> <option>--version</option> </term> <listitem> <para>write program version to <filename>stdout</filename></para> </listitem> </varlistentry> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/missing new/wavpack-5.4.0/missing --- old/wavpack-5.3.0/missing 2017-07-24 03:59:22.000000000 +0200 +++ new/wavpack-5.4.0/missing 2020-12-28 06:32:10.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -101,9 +101,9 @@ exit $st fi -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software program_details () { @@ -207,9 +207,9 @@ exit $st # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/src/common_utils.c new/wavpack-5.4.0/src/common_utils.c --- old/wavpack-5.3.0/src/common_utils.c 2020-02-18 20:34:55.000000000 +0100 +++ new/wavpack-5.4.0/src/common_utils.c 2020-12-28 06:31:14.000000000 +0100 @@ -475,11 +475,13 @@ // Return the normalization value for floating point data (valid only // if floating point data is present). A value of 127 indicates that // the floating point range is +/- 1.0. Higher values indicate a -// larger floating point range. +// larger floating point range. Note that if the client specified +// OPEN_NORMALIZE we return the normalized value (i.e., 127 + offset) +// rather than what's in the file (which isn't really relevant). int WavpackGetFloatNormExp (WavpackContext *wpc) { - return wpc->config.float_norm_exp; + return (wpc->open_flags & OPEN_NORMALIZE) ? 127 + wpc->norm_offset : wpc->config.float_norm_exp; } // Returns the actual number of valid bits per sample contained in the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/src/pack_utils.c new/wavpack-5.4.0/src/pack_utils.c --- old/wavpack-5.3.0/src/pack_utils.c 2020-04-05 20:33:53.000000000 +0200 +++ new/wavpack-5.4.0/src/pack_utils.c 2021-01-10 19:15:52.000000000 +0100 @@ -195,13 +195,18 @@ int num_chans = config->num_channels; int i; - if (!config->sample_rate) { - strcpy (wpc->error_message, "sample rate cannot be zero!"); + if (config->sample_rate <= 0) { + strcpy (wpc->error_message, "sample rate cannot be zero or negative!"); return FALSE; } - if (!num_chans) { - strcpy (wpc->error_message, "channel count cannot be zero!"); + if (num_chans <= 0 || num_chans > NEW_MAX_STREAMS * 2) { + strcpy (wpc->error_message, "invalid channel count!"); + return FALSE; + } + + if (config->block_samples && (config->block_samples < 16 || config->block_samples > 131072)) { + strcpy (wpc->error_message, "invalid custom block samples!"); return FALSE; } @@ -523,7 +528,7 @@ if (wpc->config.num_channels == 1) wpc->block_samples *= 2; - while (wpc->block_samples > 12000 && wpc->block_samples * wpc->config.num_channels > 300000) + while (wpc->block_samples > 12000 && (int64_t) wpc->block_samples * wpc->config.num_channels > 300000) wpc->block_samples /= 2; } else { @@ -534,10 +539,10 @@ wpc->block_samples = wpc->config.sample_rate / divisor; - while (wpc->block_samples > 12000 && wpc->block_samples * wpc->config.num_channels > 75000) + while (wpc->block_samples > 12000 && (int64_t) wpc->block_samples * wpc->config.num_channels > 75000) wpc->block_samples /= 2; - while (wpc->block_samples * wpc->config.num_channels < 20000) + while ((int64_t) wpc->block_samples * wpc->config.num_channels < 20000) wpc->block_samples *= 2; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/wavpack-5.3.0/src/wavpack_version.h new/wavpack-5.4.0/src/wavpack_version.h --- old/wavpack-5.3.0/src/wavpack_version.h 2020-04-14 04:35:04.000000000 +0200 +++ new/wavpack-5.4.0/src/wavpack_version.h 2021-01-10 05:26:40.000000000 +0100 @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////////////////////// // **** WAVPACK **** // // Hybrid Lossless Wavefile Compressor // -// Copyright (c) 1998 - 2019 David Bryant. // +// Copyright (c) 1998 - 2020 David Bryant. // // All Rights Reserved. // // Distributed under the BSD Software License (see license.txt) // //////////////////////////////////////////////////////////////////////////// @@ -12,8 +12,8 @@ #define WAVPACK_VERSION_H #define LIBWAVPACK_MAJOR 5 -#define LIBWAVPACK_MINOR 3 +#define LIBWAVPACK_MINOR 4 #define LIBWAVPACK_MICRO 0 -#define LIBWAVPACK_VERSION_STRING "5.3.0" +#define LIBWAVPACK_VERSION_STRING "5.4.0" #endif