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
- Host: GitHub
- URL: https://github.com/rroohhh/libpulse-async
- Owner: rroohhh
- Created: 2020-11-11T00:52:44.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-11-11T00:53:39.000Z (over 4 years ago)
- Last Synced: 2025-01-22T19:38:27.257Z (4 months ago)
- Topics: async, libpulse, pulseaudio, rust
- Language: Rust
- Homepage:
- Size: 7.81 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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");
}
```