mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-21 10:38:37 +00:00
add catch
This commit is contained in:
parent
bf7fe2bf75
commit
321a888921
@ -65,21 +65,26 @@ export function registerSamplesFromDB(config = userSamplesDBConfig, onComplete =
|
|||||||
sounds.set(parentDirectory, soundPaths);
|
sounds.set(parentDirectory, soundPaths);
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
).then(() => {
|
)
|
||||||
sounds.forEach((soundPaths, key) => {
|
.then(() => {
|
||||||
const value = Array.from(soundPaths);
|
sounds.forEach((soundPaths, key) => {
|
||||||
registerSound(key, (t, hapValue, onended) => onTriggerSample(t, hapValue, onended, value), {
|
const value = Array.from(soundPaths);
|
||||||
type: 'sample',
|
registerSound(key, (t, hapValue, onended) => onTriggerSample(t, hapValue, onended, value), {
|
||||||
samples: value,
|
type: 'sample',
|
||||||
baseUrl: undefined,
|
samples: value,
|
||||||
prebake: false,
|
baseUrl: undefined,
|
||||||
tag: undefined,
|
prebake: false,
|
||||||
|
tag: undefined,
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
logger('imported sounds registered!', 'success');
|
logger('imported sounds registered!', 'success');
|
||||||
onComplete();
|
onComplete();
|
||||||
});
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
logger('Something went wrong while registering saved samples from the index db', 'error');
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user