# libsndfile

> C library for reading and writing files containing sampled sound

**Wikidata**: [Q1344172](https://www.wikidata.org/wiki/Q1344172)  
**Wikipedia**: [English](https://en.wikipedia.org/wiki/Libsndfile)  
**Source**: https://4ort.xyz/entity/libsndfile

## Summary
libsndfile is a C library designed for reading and writing files containing sampled audio data. It is distributed as free software under the GNU Lesser General Public License and is compatible with Microsoft Windows and Unix-like operating systems. The library provides a standard interface for handling multiple audio file formats.

## Key Facts
- **Description:** A C library for reading and writing files containing sampled sound.
- **License:** GNU Lesser General Public License (LGPL).
- **Programming Language:** Written in C.
- **Operating Systems:** Runs on Microsoft Windows and Unix-like operating systems.
- **Website:** https://libsndfile.github.io/libsndfile/
- **Source Repository:** https://github.com/erikd/libsndfile
- **Latest Major Version:** 1.2.0 (released December 25, 2022).
- **Software Classification:** Instance of a software library and free software.
- **Package Availability:** Available via major package managers including AUR (`libsndfile-git`), Fedora (`libsndfile`), Ubuntu (`libsndfile1`), Homebrew (`libsndfile`), and MacPorts.

## FAQs
### Q: What is libsndfile used for?
A: libsndfile is used by software developers to read and write audio sample data to and from disk. It abstracts the complexity of different audio file formats, allowing programs to handle sound files via a single C API.

### Q: Is libsndfile free to use?
A: Yes, libsndfile is classified as free software. It is distributed under the GNU Lesser General Public License, allowing users to run, study, and modify the code.

### Q: What audio file formats does libsndfile support?
A: The library supports reading and writing numerous formats, including Waveform Audio File Format (WAV), Audio Interchange File Format (AIFF), Sun Microsystems audio (AU), Core Audio Format (CAF), Free Lossless Audio Codec (FLAC), and Sony Wave64.

### Q: Which operating systems are compatible with libsndfile?
A: libsndfile is designed to run on Microsoft Windows and Unix-like operating systems. It is also ported to FreeBSD, OpenBSD, and NetBSD.

## Why It Matters
libsndfile serves as a fundamental building block in the open-source audio ecosystem. By providing a robust, standardized C API for handling sampled sound data, it solves the fragmentation problem where developers might otherwise need to implement distinct parsers for every audio format (e.g., WAV, AIFF, FLAC). Its licensing under the GNU LGPL allows it to be utilized in a wide variety of commercial and open-source projects without imposing the stricter copyleft requirements of the full GPL.

The library's ubiquity is evidenced by its presence in nearly every major Linux distribution repository (such as Arch, Debian/Fedora, and Ubuntu) and its availability through macOS package managers like Homebrew and MacPorts. This widespread availability ensures that audio applications relying on libsndfile are easily portable across different computing environments.

## Notable For
-   **Cross-Platform Compatibility:** Functions across both Microsoft Windows and Unix-like architectures.
-   **Broad Format Support:** Capable of reading and writing major audio formats including WAV, AIFF, FLAC, and CAF.
-   **Ubiquity in Open Source:** Available in standard repositories for Arch, Debian, Fedora, Gentoo, Ubuntu, FreeBSD, NetBSD, and OpenBSD.
-   **Active Maintenance:** Version history spans over a decade, with releases recorded from 2011 (v1.0.24) through 2022 (v1.2.0).

## Body
### Functionality and Purpose
libsndfile is a software library written in the C programming language. Its primary function is to facilitate the reading and writing of files containing sampled sound. It acts as an intermediary layer, handling the specific data structures and headers of various audio containers so the developer can focus on the audio signal itself.

### Supported File Formats
The library supports a wide array of readable and writable file formats. According to the source data, these include:
*   **Waveform Audio File Format** (WAV)
*   **Audio Interchange File Format Family** (AIFF)
*   **Audio Interchange File Format, compressed**
*   **Sun Microsystems audio file** (AU)
*   **Sony Wave64**
*   **Core Audio Format** (CAF)
*   **Free Lossless Audio Codec** (FLAC)
*   **FastTracker module**
*   **Q188199** (Referenced in source data)

### Version History
The development of libsndfile is documented through a series of version releases, showing active maintenance over the last decade. Key release dates include:
*   **1.0.24:** Released March 23, 2011
*   **1.0.26:** Released November 22, 2015
*   **1.0.29:** Released August 15, 2020
*   **1.1.0:** Released March 27, 2022
*   **1.2.0:** Released December 25, 2022

### Distribution and Installation
libsndfile is widely distributed across various operating system package managers, ensuring easy installation for end-users and developers.
*   **Linux:** Known as `libsndfile` (Fedora, Arch, Gentoo), `libsndfile1` (Debian/Ubuntu).
*   **macOS:** Available via Homebrew (`libsndfile`) and MacPorts.
*   **BSD:** Available in ports for FreeBSD (`audio/libsndfile`), OpenBSD, and NetBSD.
*   **Source Code:** Hosted on GitHub at `github.com/erikd/libsndfile`.

## References

1. [Source](http://www.mega-nerd.com/libsndfile/)
2. [The p_d_12033 Open Source Project on Open Hub: Languages Page. Open Hub](https://www.openhub.net/p/p_d_12033/analyses/latest/languages_summary)
3. [Release 1.0.26. 2017](https://github.com/erikd/libsndfile/releases/tag/1.0.26)
4. [Release 1.0.26. 2017](https://github.com/libsndfile/libsndfile/releases/tag/1.0.26)
5. [Release 1.0.27. 2017](https://github.com/erikd/libsndfile/releases/tag/1.0.27)
6. [Release 1.0.27. 2017](https://github.com/libsndfile/libsndfile/releases/tag/1.0.27)
7. [Release 1.0.28. 2017](https://github.com/erikd/libsndfile/releases/tag/1.0.28)
8. [Release 1.0.28. 2017](https://github.com/libsndfile/libsndfile/releases/tag/1.0.28)
9. [Release 1.0.29. 2020](https://github.com/erikd/libsndfile/releases/tag/v1.0.29)
10. [Release 1.0.29. 2020](https://github.com/libsndfile/libsndfile/releases/tag/v1.0.29)
11. [Release 1.0.30. 2020](https://github.com/libsndfile/libsndfile/releases/tag/v1.0.30)
12. [Release v1.0.31](https://github.com/libsndfile/libsndfile/releases/tag/1.0.31)
13. [Release 1.1.0](https://github.com/libsndfile/libsndfile/releases/tag/1.1.0)
14. [Source](https://github.com/libsndfile/libsndfile/releases/tag/1.2.0)
15. [Source](https://github.com/libsndfile/libsndfile/releases/tag/1.2.2)
16. [Release 1.2.1. 2023](https://github.com/libsndfile/libsndfile/releases/tag/1.2.1)
17. [Source](https://github.com/libsndfile/libsndfile)
18. [Source](https://svnweb.freebsd.org/ports?view=revision&revision=521645)