Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best audio playback api for C/C++ under Linux?

Tags:

c++

linux

audio

What is the best audio playback api for C/C++ for Linux, preferably free/open source? I need it for embedded Linux, so I'm looking for something as lightweight as possible with not to many dependencies?

like image 643
Rolle Avatar asked Sep 16 '26 08:09

Rolle


2 Answers

That depends on what you mean by "audio". If you just want to play back raw PCM sample data, look at using the ALSA API directly. If you want to decode and play back encoded sound, you need to look at libraries supporting the required format(s), of course.

like image 158
unwind Avatar answered Sep 17 '26 21:09

unwind


PulseAudio has been adopted by the major distributions and it looks like it is the upcoming Linux Audio standard as it is more flexible than ALSA. Here's an article about why you should care about PulseAudio (and how to start doing it).

like image 35
lothar Avatar answered Sep 17 '26 22:09

lothar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!