mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-11 21:58:31 +00:00
fix: endless preview
This commit is contained in:
parent
8a22c5627a
commit
a33ce67dd4
@ -248,9 +248,10 @@ function SoundsTab() {
|
||||
const trigRef = useRef();
|
||||
// stop current sound on mouseup
|
||||
useEvent('mouseup', () => {
|
||||
trigRef.current?.then((ref) => {
|
||||
const t = trigRef.current;
|
||||
trigRef.current = undefined;
|
||||
t?.then((ref) => {
|
||||
ref?.stop(getAudioContext().currentTime + 0.01);
|
||||
trigRef.current = undefined;
|
||||
});
|
||||
});
|
||||
return (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user