agb/tracker/agb-tracker/examples/basic.rs

22 lines
427 B
Rust
Raw Normal View History

2023-07-13 00:38:09 +10:00
#![no_std]
#![no_main]
use agb::sound::mixer::Frequency;
use agb::Gba;
use agb_tracker::{import_xm, Track};
const AJOJ: Track = import_xm!("examples/ajoj.xm");
#[agb::entry]
fn main(mut gba: Gba) -> ! {
let vblank_provider = agb::interrupt::VBlank::get();
let mut mixer = gba.mixer.mixer(Frequency::Hz18157);
mixer.enable();
loop {
mixer.frame();
vblank_provider.wait_for_vblank();
}
}