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