provides a Source for playback of FastTracker 2 Extended Modules in rodio
Go to file
Max Bradbury 4734ae81f8 populate examples; update rodio version 2021-11-27 11:41:32 +00:00
examples populate examples; update rodio version 2021-11-27 11:41:32 +00:00
src populate examples; update rodio version 2021-11-27 11:41:32 +00:00
.gitignore initial 2021-04-30 18:12:13 +01:00
Cargo.lock populate examples; update rodio version 2021-11-27 11:41:32 +00:00
Cargo.toml populate examples; update rodio version 2021-11-27 11:41:32 +00:00
LICENSE populate examples; update rodio version 2021-11-27 11:41:32 +00:00
README.md populate examples; update rodio version 2021-11-27 11:41:32 +00:00

README.md

rodio-xm

provides a source for playback of fasttracker 2 extended modules in rodio

examples

use rodio_xm::XMSource;

fn main() {
    const SAMPLE_RATE: u32 = 44100;
    let mut source = XMSource::from_bytes(include_bytes!("path/to/xm"), SAMPLE_RATE);

    let (_stream, stream_handle) = rodio::OutputStream::try_default().unwrap();
    let sink = rodio::Sink::try_new(&stream_handle).unwrap();

    sink.append(source);
    sink.sleep_until_end();
}

see more in the examples directory.

license

example track "chica-pop!" is in the public domain: https://modarchive.org/index.php?request=view_by_moduleid&query=189433