[pulseaudio-discuss] recording from speakers

Tanu Kaskinen tanuk at iki.fi
Thu Mar 8 21:38:52 PST 2012

On Thu, 2012-03-08 at 20:09 -0800, Laxmikant Rashinkar wrote:
> Hi Tanu,
> thanks, appreciate your explanation of sinks and sources.
> 1) I'm presuming that I cannot use the Simple API for stereo mixing;
> only the Async API should be used?

If you want the application to automatically select the right source to
record from (as opposed to requiring the user to manually give the
source name), then yes, you need the async API, because the simple API
doesn't provide a mechanism to query the available sources. You can do
the recording part with the simple API if you want.

> 2) is there any app (e.g gnome-sound-recorder) that uses PA for
> recording sound? I can look at the source and learn.

I don't know about gnome-sound-recorder specifically. My guess would be
that it uses GStreamer, but that's just a guess, so you might want to
check out its source anyway. But at least the pacat, parec and paplay
utilities that come with Pulseaudio use the Pulseaudio async API
directly, so maybe they can be used as an example (those utilities are
actually the same program, and they are implemented in the same source
file: src/utils/pacat.c).

PS. Please avoid HTML messages (use plain text instead) and top posting
on mailing lists. For a more detailed explanation, see for example the
Posting Style section on this MythTV wiki page:


More information about the pulseaudio-discuss mailing list