Feat: crash bugfixes
All checks were successful
Deploy Website / deploy (push) Has been skipped

This commit is contained in:
2026-03-03 13:10:22 +01:00
parent cf1d2be140
commit 16d6d76422
6 changed files with 27 additions and 14 deletions

View File

@@ -158,9 +158,14 @@ pub fn init(args: InitArgs) -> Init {
let sample_rate_shared = Arc::new(AtomicU32::new(44100));
let mut initial_samples = Vec::new();
for path in &app.audio.config.sample_paths {
let index = doux::sampling::scan_samples_dir(path);
app.audio.config.sample_counts.push(index.len());
initial_samples.extend(index);
if path.is_dir() {
let index = doux::sampling::scan_samples_dir(path);
app.audio.config.sample_counts.push(index.len());
initial_samples.extend(index);
} else {
eprintln!("Sample path not found: {}", path.display());
app.audio.config.sample_counts.push(0);
}
}
let preload_entries: Vec<(String, std::path::PathBuf)> = initial_samples
.iter()