Expand description

A binding for the PulseAudio ‘GLIB mainloop’ component (libpulse-mainloop-glib system library).

About

This binding enables Rust projects to make use of the ‘GLIB mainloop’ component of the PulseAudio client system library. It builds upon the separate raw FFI crate to provide a more “Rusty” interface.

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

Note that you will need components of the primary libpulse-binding crate to make use of this.

Introduction

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().

Usage

Start by adding a dependency on the crate, along with the main binding crate, in your program’s Cargo.toml file. Note that it is recommended that you rename the crates such that you can refer to them by shorter names within your code (such as pulse and pulse_glib). Such renaming can be done within your Cargo.toml file with cargo version 1.31 or newer, or otherwise with extern crate statements.

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

Structs