fixes the sound issue.
This commit is contained in:
@@ -2161,5 +2161,5 @@
|
||||
:else
|
||||
nil))))
|
||||
:on-hide
|
||||
(fn [screen entities options]
|
||||
(fn [screen entities options]
|
||||
(utils/release-resources screen)))
|
||||
|
||||
@@ -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] [])]
|
||||
|
||||
Reference in New Issue
Block a user