Crates.io | rodio-xm |
lib.rs | rodio-xm |
version | 0.1.1 |
source | src |
created_at | 2021-11-27 11:52:12.826526 |
updated_at | 2021-11-27 11:53:29.608134 |
description | provides a source for playback of fasttracker 2 extended modules in rodio |
homepage | |
repository | https://tinybird.dev/max/rodio-xm |
max_upload_size | |
id | 488376 |
size | 94,329 |
provides a Source for playback of FastTracker 2 extended modules in rodio
use std::path::PathBuf;
use rodio::{OutputStream, Sink};
use rodio_xm::XMSource;
fn main() {
let source = XMSource::from_file(
PathBuf::from("path/to/file.xm"),
44100
);
let (_stream, stream_handle) = OutputStream::try_default().unwrap();
let sink = Sink::try_new(&stream_handle).unwrap();
sink.append(source);
sink.play();
loop {}
}
see more in the examples directory.
released under the MIT license.
example track "Chica-pop!" is in the public domain.