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

What is the best audio playback api for C / C ++ for Linux, preferably a free / open source? I need this for embedded Linux, so I'm looking for something as light as possible, and not for many dependencies?

+2
source share
5 answers

SDL is really nice

+1
source

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

+3
source

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

+2
source

If you are doing embedded materials, I would use ALSA directly (albeit quite difficult). I definitely will not use something like PulseAudio, because it is quite heavy and adds another layer (a whole separate server). SDL may be fine, but it is mainly for gaming.

+1
source

Depending on your use case, I would look at gstreamer or STK .

+1
source

Source: https://habr.com/ru/post/1436401/


All Articles