From 06c796e0c6851ea3c56caa1fcc256bb9921d0aa1 Mon Sep 17 00:00:00 2001 From: henz Date: Sun, 10 Sep 2023 15:31:13 +0800 Subject: [PATCH] renaming play and play_concurrently to play_in_tab and play; fixing stereo_sound play --- src/bundles/sound/functions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bundles/sound/functions.ts b/src/bundles/sound/functions.ts index bd90a89ea..19ce8b4da 100644 --- a/src/bundles/sound/functions.ts +++ b/src/bundles/sound/functions.ts @@ -426,8 +426,8 @@ export function play(sound: Sound): void { throw new Error( `${play.name} is expecting sound, but encountered ${sound}`, ); - } else if (get_duration(sound) <= 0) { - // Do nothing + } else if (get_duration(sound) < 0) { + throw new Error(`${play.name}: duration of sound is negative`); } else { // Instantiate audio context if it has not been instantiated. if (!audioplayer) {