mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-13 06:19:33 -04:00
fix: endless preview
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user