This commit is contained in:
11
src/init.rs
11
src/init.rs
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user