23 releases (6 stable)
1.0.5 | Aug 7, 2023 |
---|---|
1.0.3 | Jul 30, 2023 |
1.0.2 | Feb 17, 2022 |
1.0.0 | Oct 17, 2021 |
0.2.2 | Nov 22, 2020 |
#1008 in Audio
483 downloads per month
Used in 11 crates
(via soloud)
7MB
73K
SLoC
soloud-sys
Raw bindings to soloud. These are generated using bindgen on the soloud C headers.
Usage
[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));
}
}
}