one mar var

This commit is contained in:
2026-03-11 09:30:49 -06:00
parent 852648f5bc
commit a66dd03cc6

View File

@@ -18,10 +18,11 @@ fn main() {
}
fn play(mut s: syn::Syn, sample_rate: usize, bpm: usize, smallest_note: usize) {
let samples_per_smallest_note = sample_rate / bpm * 60 / smallest_note;
let params = tinyaudio::prelude::OutputDeviceParameters {
channels_count: 2,
sample_rate: sample_rate,
channel_sample_count: sample_rate / bpm * 60 / smallest_note,
channel_sample_count: samples_per_smallest_note,
};
let sample_count = (params.channel_sample_count) as usize;