library for reading and resampling audio files
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Alexandros Theodotou e1003934f0
prepare for libsndfile mp3
1 year ago
.builds builds: install valgrind on fedora 2 years ago
.builds-extra move most builds to .builds-extra 3 years ago
inc use hidden symbol visibility by default and enable symbols manually 2 years ago
src prepare for libsndfile mp3 1 year ago
subprojects add subproject fallbacks for sndfile/samplerate 3 years ago
tests add link map and shared lib 2 years ago
.gitignore remove references to Lesser GPL 3 years ago bump to ver 0.2.3 3 years ago
COPYING change license to AGPL 4 years ago
COPYING.GPL3 fix invalid licensing - upgrade originally lgplv2+ text to gplv3+, then use it in combination with the AGPL 4 years ago add srht builds badge 3 years ago
VERSION read version from file 2 years ago add link map and shared lib 2 years ago prepare for libsndfile mp3 1 year ago
meson_options.txt bump to ver 0.2.3 3 years ago

libaudec status

libaudec (lib audio decoder) is a wrapper library over minimp3, sndfile and libsamplerate for reading and resampling audio files, based on Robin Gareus' audio_decoder code (

libaudec supports all formats supported by sndfile, in addition to MP3.

This library is meant to be linked in statically to larger projects.

Until version 1.0 is released, the API is subject to change.


Use #include <audec/audec.h> in your C/C++ project and add a dependency to the library using the pkg-config name audec.

Example of loading a file into an interleaved float array at 44000Hz:

AudecInfo nfo;
AudecHandle * handle =
  audec_open (filename, &nfo);
if (!handle)
    /* handle error */
float * out_frames = NULL;
ssize_t samples_read =
  audec_read (
    handle, &out_frames, 44000);
if (samples_read < 0)
    /* handle error */
audec_close (handle);

See the header file for more info.


To build only:

meson build
ninja -C build


ninja -C build install


Send email to dev at or open an issue in


libaudec is released under the GNU Affero GPLv3+. See the file COPYING for more details. Some files, where specified, are licensed under different licenses.

Copyright (C) 2019-2020 Alexandros Theodotou

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.