22 releases

Uses old Rust 2015

0.10.2 Jul 12, 2021
0.10.1 Apr 24, 2018
0.9.24 Jan 14, 2018
0.9.22 Feb 1, 2016
0.9.5 Nov 26, 2014

#163 in Audio

Download history 9/week @ 2022-11-24 16/week @ 2022-12-01 35/week @ 2022-12-08 29/week @ 2022-12-15 13/week @ 2022-12-22 13/week @ 2022-12-29 7/week @ 2023-01-05 8/week @ 2023-01-12 21/week @ 2023-01-19 19/week @ 2023-01-26 30/week @ 2023-02-02 66/week @ 2023-02-09 133/week @ 2023-02-16 5/week @ 2023-02-23 18/week @ 2023-03-02 20/week @ 2023-03-09

179 downloads per month

Custom license

435KB
6.5K SLoC

rust-fmod Build Status

This is a rust binding for FMOD, the library developped by FIRELIGHT TECHNOLOGIES.

FMOD website : www.fmod.org

You can also find it on crates.io !

Installation

You must install on your computer the FMOD library which is used for the binding.

Since this project supports cargo, you can build it this way:

> cargo build

This isn't a binding to the lastest version. You can find the bound version here.

Documentation

You can access the rfmod documentation locally, just build it:

> cargo doc --open

You can also access the latest build of the documentation directly on docs.rs.

Short example

Here is a short example on how to create a file and to play it :

extern crate rfmod;

fn main() {
    let fmod = match rfmod::Sys::new() {
        Ok(f) => f,
        Err(e) => {
            panic!("Error code : {:?}", e);
        }
    };

    match fmod.init() {
        rfmod::Result::Ok => {}
        e => {
            panic!("FmodSys.init failed : {:?}", e);
        }
    };

    let sound = match fmod.create_sound("music.mp3", None, None) {
        Ok(s) => s,
        Err(err) => {
            panic!("Error code : {:?}", err);
        }
    };

    match sound.play_to_the_end() {
        rfmod::Result::Ok => {
            println!("Ok !");
        }
        err => {
            panic!("Error code : {:?}", err);
        }
    };
}

For a more complete example : https://github.com/GuillaumeGomez/rust-music-player

License

Please refer to the LICENSE.txt file for more details.
If you want more information, here is the FMOD website : http://www.fmod.org/

Dependencies