[pulseaudio-discuss] Philosophical queries

Arun Raghavan arun.raghavan at collabora.co.uk
Mon Nov 19 19:23:26 PST 2012


Hi Mike,

On Mon, 2012-11-19 at 12:09 -0800, Mike Gran wrote:
> Hello-
>  
> Are end-user applications supposed to use the PulseAudio API
> directly?
>  
> PulseAudio shows up as part of the GNOME SDK in the graphic
> on the front page of http://developer.gnome.org/
>  
> But, it isn't mentioned in the overview of the Gnome platform
> on http://developer.gnome.org/platform-overview/stable/
>  
> The API certainly appears usable for end user applications,
> but I notice a complete lack of newb questions in this list,
> which implies that it isn't being used that way (or that the
> docs are flawless. ;-)

The last is far from likely. :)
 
> For context, I'm writing a toy 8-bit chip-tune soft synth,
> just for fun.  I have some questions, but, I don't want to 
> bore the list with newb questions if I'm supposed to be going
> through GStreamer or ALSA API instead.

It really depends on a few  things. GStreamer might be useful to you if
you want to set up a pipeline (possibly for effects, or to
simultaneously play and encode the output to some arbitrary format,
etc.). This also makes sense if you plan to have your application work
across platforms.

The choice also depends a bit on your latency requirements. If you're
looking at sub-20ms latency, you should likely be looking at something
JACK-based.

If you're fine with higher latencies, then it comes down to taste. I
prefer the PulseAudio API (and I have a definitely biased view here ;)).
If you choose to write a standard ALSA client, use the "safe" ALSA
subset and it'll work mostly fine on PulseAudio-based systems. The "safe
subset" and some more details can be found at:

http://0pointer.de/blog/projects/guide-to-sound-apis

-- Arun



More information about the pulseaudio-discuss mailing list