fixes the sound issue.

This commit is contained in:
2026-03-23 23:45:49 -07:00
parent 9a14d849c6
commit b9e3e3ba2e
2 changed files with 3 additions and 3 deletions

View File

@@ -2161,5 +2161,5 @@
:else
nil))))
:on-hide
(fn [screen entities options]
(fn [screen entities options]
(utils/release-resources screen)))

View File

@@ -741,6 +741,7 @@
sound-id (if (= :once type)
(sound! snd :play (scale-vol-from-fade entities (current-sound-volume vol)) (or pitch 1.0) pan )
(sound! snd :loop 0.0 (or pitch 1.0) pan )) ]
(update-in entities [:current-sounds :value]
conj {:id sound-id
:sound snd
@@ -748,8 +749,7 @@
:type type
:ends-at (if (= type :once)
(+ (:total-time screen) 1.0 #_(sound! snd :duration))
nil)}))
entities))
nil)}))))
(defn stop-all-sounds! [entities]
(doseq [snd (get-in entities [:current-sounds :value] [])]