[][src]Crate libpulse_glib_binding

PulseAudio Rust language binding library for the ‘GLIB mainloop’ component.

This component provides a wrapper around the GLIB main loop. Use this to embed PulseAudio into your GLIB/GTK+/GNOME programs.


This library is a binding that allows Rust code to connect to the PulseAudio sound server via PulseAudio’s existing C API. This binding provides a safe(r) Rust interface which might be preferred over the raw C API provided by the underlying sys linking crate.

This crate provides an interface to PulseAudio’s ‘GLIB mainloop’ component, and should be used in addition to the general libpulse_binding crate.


The GLIB main loop bindings are extremely easy to use. All that is required is to create a Mainloop object using Mainloop::new. When the main loop abstraction is needed, it is provided by Mainloop::get_api.


Firstly, add a dependency on the crate in your program’s Cargo.toml file. Secondly, import the crate along with the general libpulse_binding crate to the root of your program:

This example is not tested
extern crate libpulse_binding as pulse;
extern crate libpulse_glib_binding as pglib;

See the documentation in libpulse_binding for further information regarding actual usage of libpulse mainloops.



According to Glib headers, this is an opaque type!


This acts as a safe interface to the internal PA Mainloop.


An opaque GLIB main loop object.