2012-01-15 09:34:46 +00:00
|
|
|
# libsndfile
|
|
|
|
|
2016-02-02 17:45:08 +00:00
|
|
|
[![Build Status](https://secure.travis-ci.org/erikd/libsndfile.svg?branch=master)](http://travis-ci.org/erikd/libsndfile)
|
2015-08-07 09:48:51 +00:00
|
|
|
|
2012-01-15 09:34:46 +00:00
|
|
|
libsndfile is a C library for reading and writing files containing sampled audio
|
|
|
|
data.
|
|
|
|
|
|
|
|
## Hacking
|
|
|
|
|
2012-01-15 10:23:56 +00:00
|
|
|
The canonical source code repository for libsndfile is at
|
|
|
|
[https://github.com/erikd/libsndfile/][github].
|
2012-01-15 09:34:46 +00:00
|
|
|
|
2012-01-15 10:23:56 +00:00
|
|
|
You can grab the source code using:
|
2012-01-15 09:34:46 +00:00
|
|
|
|
2012-01-15 10:23:56 +00:00
|
|
|
$ git clone git://github.com/erikd/libsndfile.git
|
|
|
|
|
|
|
|
Building on Linux, OSX and Windows (Using GNU GCC) will require a number of GNU
|
|
|
|
and other Free and Open Source Software tools including:
|
|
|
|
|
|
|
|
* [Autoconf][autoconf]
|
|
|
|
* [Autogen][autogen]
|
|
|
|
* [Automake][automake]
|
2012-01-15 11:13:33 +00:00
|
|
|
* [Libtool][libtool]
|
2012-01-15 10:23:56 +00:00
|
|
|
* [Pkgconfig][pkgconfig]
|
|
|
|
* [Python][python]
|
|
|
|
|
|
|
|
If you are on Linux, its probably best to install these via your Linux
|
|
|
|
distribution's package manager.
|
|
|
|
|
|
|
|
If you want to compile libsndfile with support for formats like FLAC and
|
|
|
|
Ogg/Vorbis you will also need to install the following optional libraries:
|
|
|
|
|
|
|
|
* [FLAC][flac]
|
|
|
|
* [libogg][libogg]
|
|
|
|
* [libvorbis][libvorbis]
|
|
|
|
|
|
|
|
Support for these extra libraries is an all or nothing affair. Unless all of
|
|
|
|
them are installed none of them will be supported.
|
|
|
|
|
|
|
|
$ ./autogen.sh
|
|
|
|
|
|
|
|
Running `autogen.sh` also installs a git pre-commit hook. The pre-commit hook
|
|
|
|
is run each time a user tries to commit and checks code about to be committed
|
|
|
|
against coding guidelines.
|
|
|
|
|
|
|
|
Nest step is to run configure, with the following configure options being
|
|
|
|
recommended for anyone contemplating sending libsndfile patches:
|
|
|
|
|
|
|
|
$ ./configure --enable-gcc-werror
|
|
|
|
|
|
|
|
Finally libsndfile can be built and tested:
|
|
|
|
|
|
|
|
$ make
|
|
|
|
$ make check
|
|
|
|
|
|
|
|
## Submitting Patches.
|
|
|
|
|
2012-01-20 08:39:16 +00:00
|
|
|
* Patches should pass all pre-commit hook tests.
|
|
|
|
* Patches should always be submitted via a either Github "pull request" or a
|
|
|
|
via emailed patches created using "git format-patch".
|
2012-01-15 11:13:33 +00:00
|
|
|
* Patches for new features should include tests and documentation.
|
|
|
|
* Patches to fix bugs should either pass all tests, or modify the tests in some
|
|
|
|
sane way.
|
2012-01-20 08:39:16 +00:00
|
|
|
* When a new feature is added for a particular file format and that feature
|
|
|
|
makes sense for other formats, then it should also be implemented for one
|
|
|
|
or two of the other formats.
|
2012-01-15 11:13:33 +00:00
|
|
|
|
|
|
|
|
2012-01-15 10:23:56 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[autoconf]: http://www.gnu.org/s/autoconf/
|
|
|
|
[autogen]: http://www.gnu.org/s/autogen/
|
|
|
|
[automake]: http://www.gnu.org/software/automake/
|
|
|
|
[flac]: http://flac.sourceforge.net/
|
2012-01-15 09:34:46 +00:00
|
|
|
[github]: https://github.com/erikd/libsndfile/
|
2012-01-15 10:23:56 +00:00
|
|
|
[libogg]: http://xiph.org/ogg/
|
|
|
|
[libtool]: http://www.gnu.org/software/libtool/
|
|
|
|
[libvorbis]: http://www.vorbis.com/
|
|
|
|
[pkgconfig]: http://www.freedesktop.org/wiki/Software/pkg-config
|
|
|
|
[python]: http://www.python.org/
|