#binding #pulse #pulseaudio #audio #pulse-mainloop-glib

libpulse-glib-binding

A Rust language binding for the PulseAudio libpulse-mainloop-glib library

15 stable releases

2.5.0 Dec 22, 2018
2.4.0 Nov 28, 2018
2.2.5 Oct 11, 2018
2.0.1 Jun 26, 2018
1.0.2 Feb 9, 2018

#31 in Audio

Download history 2/week @ 2018-10-30 84/week @ 2018-11-06 34/week @ 2018-11-13 28/week @ 2018-11-20 32/week @ 2018-11-27 101/week @ 2018-12-04 11/week @ 2018-12-11 27/week @ 2018-12-18 148/week @ 2018-12-25 4/week @ 2019-01-01 24/week @ 2019-01-08 7/week @ 2019-01-15 27/week @ 2019-01-22

174 downloads per month

LGPL-2.1+

547KB
6K SLoC

libpulse_glib_binding

A Rust language binding for the PulseAudio libpulse-mainloop-glib library.

Usage

Add this to your Cargo.toml:

[dependencies]
libpulse_binding = "2.0"
libpulse_glib_binding = "2.0"

and this to your crate root:

extern crate libpulse_binding as pulse;
extern crate libpulse_glib_binding as pulse_glib;

lib.rs:

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.

About

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.

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

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:

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.

Dependencies