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() {
let at =
if let SAtom::AudioSample((path, None)) = at.clone() {
if path.len() > 0 {
match self.sample_lib.load(&path) {
Ok(sample) => sample.clone(),
Err(e) => {
self.errors.push(
format!(
"Couldn't load sample '{}': {:?}",
"Sample Loading Error\n\
Couldn't load sample '{}':\n{:?}",
path, e));
at
},
}
} else {
at
}
} else {
at
};
self.atom_values.insert(param, at.clone());