#audio-player #synthesizer #playback

sys soloud-sys

Rust bindings for the soloud audio engine

25 releases (8 stable)

1.1.1 May 12, 2025
1.0.5 Aug 7, 2023
1.0.3 Jul 30, 2023
1.0.2 Feb 17, 2022
0.2.2 Nov 22, 2020

#1085 in Audio

Download history 278/week @ 2025-09-16 268/week @ 2025-09-23 203/week @ 2025-09-30 146/week @ 2025-10-07 226/week @ 2025-10-14 326/week @ 2025-10-21 203/week @ 2025-10-28 199/week @ 2025-11-04 237/week @ 2025-11-11 282/week @ 2025-11-18 222/week @ 2025-11-25 201/week @ 2025-12-02 141/week @ 2025-12-09 208/week @ 2025-12-16 193/week @ 2025-12-23 178/week @ 2025-12-30

746 downloads per month
Used in 12 crates (via soloud)

MIT license

7MB
73K SLoC

C++ 45K SLoC // 0.1% comments C 22K SLoC // 0.0% comments Rust 3K SLoC // 0.0% comments Python 2K SLoC // 0.5% comments Lua 871 SLoC // 0.0% comments Ruby 102 SLoC // 0.1% comments C# 20 SLoC // 0.2% comments Batch 12 SLoC JavaScript 1 SLoC Shell 1 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));
        }
    }
}

Dependencies