[pulseaudio-discuss] "hello, world" volume control

Tanu Kaskinen tanuk at iki.fi
Fri Apr 20 21:55:37 PDT 2012


On Fri, 2012-04-20 at 17:29 -0300, Diogo F. S. Ramos wrote:
> "Dalleau, Frederic" <frederic.dalleau at intel.com> writes:
> 
> > On Fri, Apr 20, 2012 at 10:04 AM, Diogo F. S. Ramos <diogofsr at gmail.com> wrote:
> >> I'm trying to write a very simple volume control for pulseaudio but I'm
> >> having a really hard time figuring out the API. Is there some kind of
> >> "hello, world"? Something that just mute a sink and exit would be great.
> >
> > There is a sample called tests/gtk-test.c which creates a context and
> > a mainloop.
> 
> Nice, thank you.
> 
> I see it uses a glib variation.
> 
> For my application, I'm not interested in using GTK. Is it still advised
> to use glib?

There's no need to use glib just for libpulse.

> Reading some of the sources I see the usage of sockets
> (src/utils/pacmd.c) and not glib (src/utils/pactl.c).

Don't look at pacmd, it doesn't use the normal API. pactl is probably a
good example for muting a sink.

-- 
Tanu



More information about the pulseaudio-discuss mailing list