|
Packit |
2a59cf |
////////////////////////////////////////////////////////////////////////////
|
|
Packit |
2a59cf |
// **** WAVPACK **** //
|
|
Packit |
2a59cf |
// Hybrid Lossless Wavefile Compressor //
|
|
Packit |
2a59cf |
// Copyright (c) 1998 - 2016 David Bryant. //
|
|
Packit |
2a59cf |
// All Rights Reserved. //
|
|
Packit |
2a59cf |
// Distributed under the BSD Software License (see license.txt) //
|
|
Packit |
2a59cf |
////////////////////////////////////////////////////////////////////////////
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
This package contains all the source code required to build the WavPack
|
|
Packit |
2a59cf |
library (libwavpack) and the command-line programs and it has been tested
|
|
Packit |
2a59cf |
on many platforms. Assembly language optimizations are provided for x86
|
|
Packit |
2a59cf |
and x86-64 (AMD64) processors (encoding and decoding) and ARMv7 (decoding
|
|
Packit |
2a59cf |
only). The x86 assembly code includes a runtime check for MMX capability,
|
|
Packit |
2a59cf |
so it will work on legacy i386 processors.
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
On Windows there are solution and project files for Visual Studio 2008 and
|
|
Packit |
2a59cf |
additional sourcecode to build the CoolEdit/Audition plugin and the winamp
|
|
Packit |
2a59cf |
plugin. The CoolEdit/Audition plugin provides a good example for using the
|
|
Packit |
2a59cf |
library to both read and write WavPack files and the winamp plugin makes
|
|
Packit |
2a59cf |
extensive use of APEv2 tag reading and writing. Both 32-bit and 64-bit
|
|
Packit |
2a59cf |
platforms are provided.
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
Visual Studio 2008 does not support projects with x64 assembly very well. I
|
|
Packit |
2a59cf |
have provided a copy of the edited masm.rules file that works for me, but I
|
|
Packit |
2a59cf |
can't provide support if your build does not work. Please make a copy of
|
|
Packit |
2a59cf |
your masm.rules file first. On my system it lives here:
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\VCProjectDefaults
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
To build everything on Linux, type:
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
1. ./configure [--disable-asm] [--enable-man] [--enable-rpath] [--enable-tests]
|
|
Packit |
2a59cf |
[--disable-apps] [--disable-dsd] [--enable-legacy]
|
|
Packit |
2a59cf |
2. make
|
|
Packit |
2a59cf |
3. make install (optionally, to install into /usr/local/bin)
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
If you are using the code directly from Git (rather than a distribution)
|
|
Packit |
2a59cf |
then you will need to do a ./autogen.sh instead of the configure step. If
|
|
Packit |
2a59cf |
assembly optimizations are available for your processor they will be
|
|
Packit |
2a59cf |
automatically enabled, but if there is a problem with them then use the
|
|
Packit |
2a59cf |
--disable-asm option to revert to pure C. For Clang-based build systems
|
|
Packit |
2a59cf |
(Darwin, FreeBSD, etc.) Clang version 3.5 or higher is required.
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
If you get a WARNING about unexpected libwavpack version when you run the
|
|
Packit |
2a59cf |
command-line programs, you might try using --enable-rpath to hardcode the
|
|
Packit |
2a59cf |
library location in the executables, or simply force static linking with
|
|
Packit |
2a59cf |
--disable-shared.
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
There is now a cli program to do a full suite of stress tests for libwavpack,
|
|
Packit |
2a59cf |
and this is particularly useful for packagers to make sure that the assembly
|
|
Packit |
2a59cf |
language optimizations are working correctly on various platforms. It is
|
|
Packit |
2a59cf |
built with the configure option --enable-tests and requires Pthreads (it
|
|
Packit |
2a59cf |
worked out-of-the-box on all the platforms I tried it on). There are lots of
|
|
Packit |
2a59cf |
options, but the default test suite (consisting of 192 tests) is executed
|
|
Packit |
2a59cf |
with "wvtest --default". There is also a seeking test. On Windows a third-
|
|
Packit |
2a59cf |
party Pthreads library is required, so I am not including this in the build
|
|
Packit |
2a59cf |
for now.
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
Notes:
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
1. There are four documentation files contained in the distribution:
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
doc/wavpack_doc.html: contains user-targeted documentation for the
|
|
Packit |
2a59cf |
command-line programs
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
doc/WavPack5PortingGuide.pdf: this document is targeted at developers who
|
|
Packit |
2a59cf |
are migrating to WavPack 5, and it provides a short
|
|
Packit |
2a59cf |
description of the major improvements and how to
|
|
Packit |
2a59cf |
utilize them
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
doc/WavPack5LibraryDoc.pdf: contains a detailed description of the API
|
|
Packit |
2a59cf |
provided by WavPack library appropriate for read
|
|
Packit |
2a59cf |
and writing WavPack files and manipulating APEv2 tags
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
doc/WavPack5FileFormat.pdf: contains a description of the WavPack file
|
|
Packit |
2a59cf |
format, including details needed for parsing WavPack
|
|
Packit |
2a59cf |
blocks and interpreting the block header and flags
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
There is also a description of the WavPack algorithms in the forth edition
|
|
Packit |
2a59cf |
of David Salomon's book "Data Compression: The Complete Reference". The
|
|
Packit |
2a59cf |
section on WavPack can be found here:
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
www.wavpack.com/WavPack.pdf
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
2. This code is designed to be easy to port to other platforms. It is endian-
|
|
Packit |
2a59cf |
agnostic and usually uses callbacks for I/O, although there's a convenience
|
|
Packit |
2a59cf |
function for reading files that accepts filename strings and automatically
|
|
Packit |
2a59cf |
handles correction files (and on Windows there is now an option to select
|
|
Packit |
2a59cf |
UTF-8 instead of ANSI).
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
To maintain compatibility on various platforms, the following conventions
|
|
Packit |
2a59cf |
are used: the "char" type must be 8-bits (signed or unsigned), a "short"
|
|
Packit |
2a59cf |
must be 16-bits and the "int" and "long" types must be at least 32-bits.
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
3. The code's modules are organized in such a way that if major chunks of the
|
|
Packit |
2a59cf |
functionality are not referenced (for example, creating WavPack files) then
|
|
Packit |
2a59cf |
link-time dependency resolution should provide optimum binary sizes.
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
However, some functionality could not be easily excluded in this way and so
|
|
Packit |
2a59cf |
there are additional macros that may be used to further reduce the size of
|
|
Packit |
2a59cf |
the binary. Note that these must be defined for all modules:
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
NO_SEEKING to not allow seeking to a specific sample index
|
|
Packit |
2a59cf |
(for applications that always read entire files)
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
NO_TAGS to not read specified fields from ID3v1 and APEv2 tags and
|
|
Packit |
2a59cf |
not create or edit APEv2 tags
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
ENABLE_LEGACY include support for Wavpack files from before version 4.0
|
|
Packit |
2a59cf |
(this was eliminated by default with WavPack 5)
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
ENABLE_DSD include support for DSD audio (new for WavPack 5 and the
|
|
Packit |
2a59cf |
default, but obviously not universally required)
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
4. There are alternate versions of this library available specifically designed
|
|
Packit |
2a59cf |
for "resource limited" CPUs or hardware encoding and decoding. There is the
|
|
Packit |
2a59cf |
"tiny decoder" library which works with less than 32k of code and less than
|
|
Packit |
2a59cf |
4k of data and has assembly language optimizations for the ARM and Freescale
|
|
Packit |
2a59cf |
ColdFire CPUs. The "tiny encoder" is also designed for embedded use and
|
|
Packit |
2a59cf |
handles the pure lossless, lossy, and hybrid lossless modes. Neither of the
|
|
Packit |
2a59cf |
"tiny" versions use any memory allocation functions nor do they require
|
|
Packit |
2a59cf |
floating-point arithmetic support.
|
|
Packit |
2a59cf |
|
|
Packit |
2a59cf |
5. Questions or comments should be directed to david@wavpack.com
|