channel sample rate confirmed page size

This commit is contained in:
breel
2026-03-10 21:33:06 -06:00
parent 75460c0859
commit 85fd604b7f

View File

@@ -16,8 +16,8 @@ fn main() {
// Setup the audio output.
let params = OutputDeviceParameters {
channels_count: 2,
sample_rate: 44100,
channel_sample_count: 4410,
sample_rate: flags.sample_rate,
channel_sample_count: flags.sample_rate / flags.smallest_note,
};
// Create the synthesizer.
@@ -55,8 +55,14 @@ fn main() {
use clap::Parser;
#[derive(Parser, Debug, Clone)]
struct Flags {
#[arg(short, default_value_t = false)]
#[arg(short, long, default_value_t = false)]
debug: bool,
#[arg(long, default_value_t = 4)]
smallest_note: usize,
#[arg(long, default_value_t = 44100)]
sample_rate: usize,
}