Chris@0: Chris@0: Chris@0: Chris@0:
Chris@0:Chris@0: Libsndfile is a C library for reading and writing files containing sampled sound Chris@0: (such as MS Windows WAV and the Apple/SGI AIFF format) through one standard Chris@0: library interface. It is released in source code format under the Chris@0: Gnu Lesser General Public License. Chris@0:
Chris@0: Chris@0:Chris@0: The library was written to compile and run on a Linux system but should compile Chris@0: and run on just about any Unix (including MacOS X). Chris@0: There are also pre-compiled binaries available for 32 and 64 bit windows. Chris@0:
Chris@0:Chris@0: It was designed to handle both little-endian (such as WAV) and big-endian Chris@0: (such as AIFF) data, and to compile and run correctly on little-endian (such as Intel Chris@0: and DEC/Compaq Alpha) processor systems as well as big-endian processor systems such Chris@0: as Motorola 68k, Power PC, MIPS and Sparc. Chris@0: Hopefully the design of the library will also make it easy to extend for reading and Chris@0: writing new sound file formats. Chris@0:
Chris@0: Chris@0:Chris@0: It has been compiled and tested (at one time or another) on the following systems: Chris@0:
Chris@0: Chris@0:Chris@0: At the moment, each new release is being tested on i386 Linux, x86_64 Linux, Chris@0: PowerPC Linux, Win32 and Win64. Chris@0:
Chris@0: Chris@0: Chris@0: Chris@0: Chris@0:Chris@0: libsndfile has the following main features : Chris@0:
Chris@0:Chris@0: libsndfile has a comprehensive test suite so that each release is as bug free Chris@0: as possible. Chris@0: When new bugs are found, new tests are added to the test suite to ensure that Chris@0: these bugs don't creep back into the code. Chris@0: When new features are added, tests are added to the test suite to make sure that Chris@0: these features continue to work correctly even when they are old features. Chris@0:
Chris@0:Chris@0: The following table lists the file formats and encodings that libsndfile can read Chris@0: and write. Chris@0: The file formats are arranged across the top and encodings along the left Chris@0: edge. Chris@0:
Chris@0:Chris@0: | Micro- soft WAV |
Chris@0: SGI / Apple AIFF / AIFC |
Chris@0: Sun / DEC / NeXT AU / SND |
Chris@0: Header- less RAW |
Chris@0: Paris Audio File PAF |
Chris@0: Commo- dore Amiga IFF / SVX |
Chris@0: Sphere Nist WAV |
Chris@0: IRCAM SF |
Chris@0: Creative VOC |
Chris@0: Sound forge W64 |
Chris@0: GNU Octave 2.0 MAT4 |
Chris@0: GNU Octave 2.1 MAT5 |
Chris@0: Portable Voice Format PVF |
Chris@0: Fasttracker 2 XI |
Chris@0: HMM Tool Kit HTK |
Chris@0: Apple CAF |
Chris@0: Sound Designer II SD2 |
Chris@0: Free Lossless Audio Codec FLAC |
Chris@0:
Unsigned 8 bit PCM | Chris@0:R/W | R/W | R/W | Chris@0:R/W | Chris@0:R/W | R/W | Chris@0: | Chris@0: | ||||||||||
Signed 8 bit PCM | Chris@0:R/W | R/W | R/W | Chris@0:R/W | R/W | R/W | Chris@0: | R/W | Chris@0:R/W | R/W | R/W | Chris@0:|||||||
Signed 16 bit PCM | Chris@0:R/W | R/W | R/W | R/W | Chris@0:R/W | R/W | R/W | R/W | Chris@0:R/W | R/W | R/W | R/W | Chris@0:R/W | R/W | R/W | Chris@0:R/W | R/W | Chris@0:|
Signed 24 bit PCM | Chris@0:R/W | R/W | R/W | R/W | Chris@0:R/W | R/W | R/W | Chris@0:R/W | Chris@0: | R/W | R/W | R/W | Chris@0:||||||
Signed 32 bit PCM | Chris@0:R/W | R/W | R/W | R/W | Chris@0:R/W | R/W | Chris@0: | R/W | R/W | R/W | R/W | Chris@0:R/W | Chris@0: | |||||
32 bit float | Chris@0:R/W | R/W | R/W | R/W | Chris@0:R/W | Chris@0: | R/W | R/W | R/W | Chris@0: | R/W | Chris@0: | ||||||
64 bit double | Chris@0:R/W | R/W | R/W | Chris@0:R/W | Chris@0: | R/W | R/W | R/W | Chris@0:R/W | Chris@0: | ||||||||
u-law encoding | Chris@0:R/W | R/W | R/W | R/W | Chris@0:R/W | R/W | R/W | Chris@0:R/W | Chris@0: | R/W | Chris@0: | |||||||
A-law encoding | Chris@0:R/W | R/W | R/W | R/W | Chris@0:R/W | R/W | R/W | Chris@0:R/W | Chris@0: | R/W | Chris@0: | |||||||
IMA ADPCM | Chris@0:R/W | Chris@0: | R/W | Chris@0:Chris@0: | Chris@0: | |||||||||||||
MS ADPCM | Chris@0:R/W | Chris@0: | R/W | Chris@0: | Chris@0: | |||||||||||||
GSM 6.10 | Chris@0:R/W | R/W | R/W | Chris@0: | R/W | Chris@0: | Chris@0: | |||||||||||
G721 ADPCM 32kbps | Chris@0:R/W | R/W | Chris@0: | Chris@0: | Chris@0: | |||||||||||||
G723 ADPCM 24kbps | Chris@0:R/W | Chris@0: | Chris@0: | Chris@0: | ||||||||||||||
G723 ADPCM 40kbps | Chris@0:R/W | Chris@0: | Chris@0: | Chris@0: | ||||||||||||||
12 bit DWVW | Chris@0:R/W | R/W | Chris@0: | Chris@0: | Chris@0: | |||||||||||||
16 bit DWVW | Chris@0:R/W | R/W | Chris@0: | Chris@0: | Chris@0: | |||||||||||||
24 bit DWVW | Chris@0:R/W | R/W | Chris@0: | Chris@0: | Chris@0: | |||||||||||||
Ok Dialogic ADPCM | Chris@0:R/W | Chris@0: | Chris@0: | Chris@0: | ||||||||||||||
8 bit DPCM | Chris@0:Chris@0: | Chris@0: | R/W | Chris@0: | ||||||||||||||
16 bit DPCM | Chris@0:Chris@0: | Chris@0: | R/W | Chris@0: |
Chris@0: From version 1.0.18, libsndfile also reads and writes Chris@0: FLAC Chris@0: and Chris@0: Ogg/Vorbis. Chris@0:
Chris@0: Chris@0: Chris@0: Chris@0:Chris@0: Some of the file formats I am also interested in adding are: Chris@0:
Chris@0:Chris@0: I have decided that I will not be adding support for MPEG Layer 3 (commonly Chris@0: known as MP3) due to the patent issues surrounding this file format. Chris@0: See Chris@0: Chris@0: the FAQ Chris@0: for more. Chris@0:
Chris@0:Chris@0: Other file formats may also be added on request. Chris@0:
Chris@0: Chris@0: Chris@0: Chris@0: Chris@0:Chris@0: My first attempt at reading and writing WAV files was in 1990 or so under Windows Chris@0: 3.1. Chris@0: I started using Linux in early 1995 and contributed some code to the Chris@0: wavplay Chris@0: program. Chris@0: That contributed code would eventually mutate into this library. Chris@0: As one of my interests is Digital Signal Processing (DSP) I decided that as well as Chris@0: reading data from an audio file in the native format (typically 16 bit short integers) Chris@0: it would also be useful to be able to have the library do the conversion to floating Chris@0: point numbers for DSP applications. Chris@0: It then dawned on me that whatever file format (anything from 8 bit unsigned chars, Chris@0: to 32 bit floating point numbers) the library should be able to convert the data to Chris@0: whatever format the library user wishes to use it in. Chris@0: For example, in a sound playback program, the library caller typically wants the sound Chris@0: data in 16 bit short integers to dump into a sound card even though the data in the Chris@0: file may be 32 bit floating point numbers (ie Microsoft's WAVE_FORMAT_IEEE_FLOAT Chris@0: format). Chris@0: Another example would be someone doing speech recognition research who has recorded Chris@0: some speech as a 16 bit WAV file but wants to process it as double precision floating Chris@0: point numbers. Chris@0:
Chris@0:Chris@0: Here is the release history for libsndfile : Chris@0:
Chris@0:Chris@0: libsndfile is released under the terms of the GNU Lesser General Public License, Chris@0: of which there are two versions; Chris@0: version 2.1 Chris@0: and Chris@0: version 3. Chris@0: To maximise the compatibility of libsndfile, the user may choose to use libsndfile Chris@0: under either of the above two licenses. Chris@0: You can also read a simple explanation of the ideas behind the GPL and the LGPL Chris@0: here. Chris@0:
Chris@0:Chris@0: You can use libsndfile with Chris@0: Free Software, Chris@0: Open Source, Chris@0: proprietary, shareware or other closed source applications as long as libsndfile Chris@0: is used as a dynamically loaded library and you abide by a small number of other Chris@0: conditions (read the LGPL for more info). Chris@0: With applications released under the GNU GPL you can also use libsndfile statically Chris@0: linked to your application. Chris@0:
Chris@0:Chris@0: I would like to see libsndfile used as widely as possible but I would prefer it Chris@0: if you released software that uses libsndfile as Chris@0: Free Software Chris@0: or Chris@0: Open Source. Chris@0: However, if you put in a great deal of effort building a significant application Chris@0: which simply uses libsndfile for file I/O, then I have no problem with you releasing Chris@0: that as closed source and charging as much money as you want for it as long as you Chris@0: abide by the license. Chris@0:
Chris@0: Chris@0: Chris@0:Chris@0: Here is the latest version. It is available in the following formats: Chris@0:
Chris@0:Chris@0: The Win32 installer was compiled for Windows XP but should also work on Windows Chris@0: 2000, Vista and Windows 7. Chris@0:
Chris@0: Chris@0:Chris@0: Pre-release versions of libsndfile are available Chris@0: here Chris@0: and are announced on the Chris@0: libsndfile-devel Chris@0: mailing list. Chris@0:
Chris@0: Chris@0: Chris@0:Chris@0: The latest version of this document can be found Chris@0: here. Chris@0:
Chris@0:Chris@0: Author : Chris@0: Chris@0: Erik de Castro Lopo Chris@0:
Chris@0: Chris@0:
Chris@0: This page has been accessed
Chris@0:
Chris@0: times.
Chris@0: