loading empty samples is not done anymore

This commit is contained in:
Weird Constructor 2021-05-28 05:14:56 +02:00
parent cd2bbafcb6
commit 663e88efeb
2 changed files with 19 additions and 14 deletions

View file

@ -308,18 +308,23 @@ impl NodeConfigurator {
if param.is_atom() { if param.is_atom() {
let at = let at =
if let SAtom::AudioSample((path, None)) = at.clone() { if let SAtom::AudioSample((path, None)) = at.clone() {
if path.len() > 0 {
match self.sample_lib.load(&path) { match self.sample_lib.load(&path) {
Ok(sample) => sample.clone(), Ok(sample) => sample.clone(),
Err(e) => { Err(e) => {
self.errors.push( self.errors.push(
format!( format!(
"Couldn't load sample '{}': {:?}", "Sample Loading Error\n\
Couldn't load sample '{}':\n{:?}",
path, e)); path, e));
at at
}, },
} }
} else { } else {
at at
}
} else {
at
}; };
self.atom_values.insert(param, at.clone()); self.atom_values.insert(param, at.clone());