|
libsndfile
Programming Interface -+- Bug Reporting -+- Download -+- News FAQ -+- Mailing Lists -+- Change Log -+- Licensing Information Libsndfile is a C library for reading and writing files containing sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format) through one standard library interface. It is released in source code format under the Gnu Lesser General Public License. The library was written to compile and run on a Linux system but should compile and run on just about any Unix (including MacOSX). It can also be compiled and run on Win32 systems using the Microsoft compiler and MacOS using the Metrowerks compiler. There are directions for compiling libsndfile on these platforms in the Win32 and MacOS directories of the source code distribution. It was designed to handle both little-endian (such as WAV) and big-endian (such as AIFF) data, and to compile and run correctly on little-endian (such as Intel and DEC/Compaq Alpha) processor systems as well as big-endian processor systems such as Motorola 68k, Power PC, MIPS and Sparc. Hopefully the design of the library will also make it easy to extend for reading and writing new sound file formats. It has been compiled and tested (at one time or another) on the following systems:
At the moment, each new release is being tested on i386 Linux, PowerPC Linux, MacOSX on PowerPC and Win32. Featureslibsndfile has the following main features :
libsndfile has a comprehensive test suite so that each release is as bug free as possible. When new bugs are found, new tests are added to the test suite to ensure that these bugs don't creep back into the code. When new features are added, tests are added to the test suite to make sure that these features continue to work correctly even when they are old features. The following table lists the file formats and encodings that libsndfile can read and write. The file formats formats are arranged across the top and encodings along the left edge.
Some of the file formats I am also interested in adding are:
I have decided that I will not be adding support for MPEG Layer 3 due to the patent issues surrounding this file format. Other file formats may also be added on request. HistoryMy first attempt at reading and writing WAV files was in 1990 or so under Windows 3.1. I started using Linux in early 1995 and contributed some code to the wavplay program. That contributed code would eventually mutate into this library. As one of my interests is Digital Signal Processing (DSP) I decided that as well as reading data from an audio file in the native format (typically 16 bit short integers) it would also be useful to be able to have the library do the conversion to floating point numbers for DSP applications. It then dawned on me that whatever file format (anything from 8 bit unsigned chars, to 32 bit floating point numbers) the library should be able to convert the data to whatever format the library user wishes to use it in. For example, in a sound playback program, the library caller typically wants the sound data in 16 bit short integers to dump into a sound card even though the data in the file may be 32 bit floating point numbers (ie Microsoft's WAVE_FORMAT_IEEE_FLOAT format). Another example would be someone doing speech recognition research who has recorded some speech as a 16 bit WAV file but wants to process it as double precision floating point numbers. Here is the release history for libsndfile :
This document details the changes in the API between libsndfile version 0 and version 1. Similar or Related Projects
Licensinglibsndfile is released under the terms of the GNU Lesser General Public License. You may read the license here or read a simple explanation of the ideas behind the GPL and the LGPL here. The bottom line is that you can use libsndfile with Free Software, Open Source, proprietary, shareware or other closed source applications as long as libsndfile is used as a dynamically loaded library. With applications released under the GNU GPL you can also use libsndfile staticlly linked to your application. If you would like to use libsndfile but the GNU LGPL does not meet your needs you may contact the author for other licensing arrangements. DownloadHere is the latest version. It is available in the following formats (I am no longer distributing RPMs).
Compiling libsndfile is relatively easy. The INSTALL file in the top level directory gives instructions on compiling and installing libsndfile on Unix-like systems (including MacOSX). For Win32 there are instructions in the doc/ directory of the tarball. These instructions are mirrored here. The latest version of this document can be found here. Author : Erik de Castro Lopo This page has been accessed times. |