Sun, 15 Feb 2009
Ten Years of libsndfile.
Today, February 15th 2009, is the ten year anniversary of the first release of libsndfile.
Like most FOSS projects, libsndfile started off as an urge to scratch an itch. I was interested in Digital Signal Processing (DSP) and wanted an easy way to get digital audio into and out of software I was writing to try out various DSP algorithms. Secondly, I wanted to a sound file editor and one important part of such an editor is an ability to read and write various sound file formats. I did however look at a couple of existing sound file editors and found that most of them available at the time had buggy and incorrect WAV file handling. So I started out getting that part fixed. Nowadays, most sound file editors on Linux and many on other platforms use libsndfile for file I/O.
In its 10 years of existence, libsndfile has grown from some 5000 lines of code to over 45000 lines of code (not counting the test suite and the example programs). The earliest versions could read WAV, AIFF and AU file formats while the latest version supports 25 formats and is still growing.
It was originally written to run on Linux and other UNIX-like systems but soon ended up running on windows and Mac OS9 (the old non-Unix Apple Macintosh) operating system. Fortunately Mac OS9 has been assigned to the dustbin of history leaving windows as the only operating system that was difficult or painful to support. Recently, the windows development has moved to a system where the only way I support building of libsndfile for that OS is to cross compile from Linux, with the test suite being run under Wine. This has made my life significantly easier since I also release pre-compiled windows binaries.
One surprise for me was that a Wikipedia entry as added in 2006. The page says:
"libsndfile is a widely-used  C library"
and I think that the ten year anniversary of the first release may be a good time to look at where libsndfile is actually being used. With a little research and some help from the libsndfile mailing lists, this is what I found (in no particular order):
- Major computer music programming language and environments such as ChucK, Csound, MusicKit, Nyquist, PureData, and SuperCollider. Most of these apps are cross platform and require the use of libsndfile on all the platforms they support.
- Ardour, the premier cross platform (*nix and MacOSX), Free Software Digital Audio Workstation
- Audacity, the ubiquitous, cross platform (*nix, Mac and windows) audio editor.
- The Pulse Audio sound server uses libsndfile and is part of most modern Linux systems running the Gnome environment and hence libsndfile is installed by default on all those systems.
- Linux media players like Alsaplayer, Aqualung, Audacious, MPlayer and XMMS, either by default or as an optional plugin.
- Winamp one of the more popular and certainly one of the oldest media players on the windows platform.
- The Ecasound, Ecawave and Ecamegapedal suite of Free Software programs.
- The Levelator, a tool for podcasters that automatically adjusts the levels of spoken-word recordings (Windows, Mac and Linux).
- Linux and Unix sound file editors like Sweep and MhWaveEdit.
- Overtone Analyzer, a sound visualization tool for singing teachers, speech therapists, instrument builders and overtone singers.
- Linux based software audio synthesizers and samplers such as the Amsynth software synthesizer, Freecycle, Freewheeling, the Galan synthesis environment, Horgand, the Hydrogen drum machine, Sooperlooper, and the Specimen sample player.
- Linux trackers like Aldrin and Soundtracker.
- Mixxx, the Linux DJ program.
- The FreeSWITCH open source communications platform which runs natively on Windows, Mac OSX, Linux, *BSD, and other Unix flavors.
- The Baselight (commercial product) colour grading system used worldwide for commercials, episodic television and feature film digital intermediate.
- Linux based audio/midi sequencers like GNUSound, MusE, Qtractor and Wired.
- APTDecoder, Free Software (GPL) for recording and decoding signals transmitted by NOAA POES APT enabled weather satellites.
- The One Laptop Per Child machines come with CSound and hence also include libsndfile.
- X Lossless Decoder, a Lossless audio decoder for Mac OS X.
- As part of Meyer Sound's Wild Tracks hard-drive based multitrack audio playback and recording system.
- AudioMove a GUI-based batch audio file converter/copier program (GPL).
Overall its been a fun ten years. I've learnt a lot about writing reliable and portable cross platform code and become a much better coder for it. Having libsndfile as a hobby project has definitely helped my employment prospects and my career as a professional software engineer.
The next ten years of libsndfile will mainly be maintenance, but new file formats (I'm currently working on Ogg/Speex) and features will be added as needed.