An open API service indexing awesome lists of open source software.

https://github.com/rroohhh/libpulse-async

async rust libpulse bindings
https://github.com/rroohhh/libpulse-async

async libpulse pulseaudio rust

Last synced: 2 months ago
JSON representation

async rust libpulse bindings

Awesome Lists containing this project

README

        

# libpulse-async
async rust bindings for `libpulse`.

This uses the standard `libpulse` mainloop in a seperate thread to implement a API compatible with the standard async rust ecosystem.

## warning
This is very WIP and I basically have no clue about unsafe rust, so this could all be wrong and stupid :)

## basic example
```rust
#[async_std::main]
async fn main() {
let mut proplist = Proplist::new().unwrap();
proplist
.set_str(pulse::proplist::properties::APPLICATION_NAME, "FooApp")
.unwrap();

let mut mainloop = PAAsyncMainloop::new().expect("Failed to create mainloop");

let mut context = Context::new_with_proplist(mainloop, "FooAppContext", proplist)
.await
.expect("Failed to create new context");
}
```