| Crates.io | soloud-sys |
| lib.rs | soloud-sys |
| version | 1.1.1 |
| created_at | 2020-08-26 16:20:37.953064+00 |
| updated_at | 2025-05-12 21:02:41.028276+00 |
| description | Rust bindings for the soloud audio engine |
| homepage | |
| repository | https://github.com/MoAlyousef/soloud-rs |
| max_upload_size | |
| id | 281016 |
| size | 16,666,030 |
Raw bindings to soloud. These are generated using bindgen on the soloud C headers.
[dependencies]
soloud-sys = { version = "1", features = ["miniaudio"] }
Example code:
use soloud_sys::soloud::*;
fn main() {
unsafe {
let sl = Soloud_create();
Soloud_init(sl);
std::thread::sleep(std::time::Duration::from_millis(100));
Soloud_setGlobalVolume(sl, 3.0);
let speech = Speech_create();
let ret = Speech_setText(speech, "Hello World\0".as_ptr() as _);
dbg!(ret);
Soloud_play(sl, speech);
while Soloud_getVoiceCount(sl) > 0 {
// calls to play are non-blocking, so we put the thread to sleep
std::thread::sleep(std::time::Duration::from_millis(100));
}
}
}