https://github.com/zrythm/libaudec
A library for reading and resampling audio files
https://github.com/zrythm/libaudec
Last synced: about 1 year ago
JSON representation
A library for reading and resampling audio files
- Host: GitHub
- URL: https://github.com/zrythm/libaudec
- Owner: zrythm
- License: agpl-3.0
- Created: 2019-12-05T19:41:05.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-21T11:00:10.000Z (about 4 years ago)
- Last Synced: 2024-10-29T20:17:35.656Z (over 1 year ago)
- Language: C
- Homepage:
- Size: 775 KB
- Stars: 7
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: COPYING
Awesome Lists containing this project
README
libaudec
========
[](https://builds.sr.ht/~alextee/libaudec?)
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
(https://github.com/x42/silan/tree/master/audio_decoder)
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.
# Usage
Use `#include ` 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.
# Building
To build only:
meson build
ninja -C build
Installation:
ninja -C build install
# Patches/Issues
Send email to dev at zrythm.org or open an issue in
https://redmine.zrythm.org/projects/libaudec/issues
# License
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.