rodio-xm/examples/from_bytes.rs

18 lines
369 B
Rust
Raw Normal View History

use rodio::{OutputStream, Sink};
use rodio_xm::XMSource;
fn main() {
let source = XMSource::from_bytes(
include_bytes!("drozerix_-_chica-pop!.xm"),
44100
);
let (_stream, stream_handle) = OutputStream::try_default().unwrap();
let sink = Sink::try_new(&stream_handle).unwrap();
sink.append(source);
sink.play();
loop {}
}