fixes the sound issue.
This commit is contained in:
@@ -2161,5 +2161,5 @@
|
|||||||
:else
|
:else
|
||||||
nil))))
|
nil))))
|
||||||
:on-hide
|
:on-hide
|
||||||
(fn [screen entities options]
|
(fn [screen entities options]
|
||||||
(utils/release-resources screen)))
|
(utils/release-resources screen)))
|
||||||
|
|||||||
@@ -741,6 +741,7 @@
|
|||||||
sound-id (if (= :once type)
|
sound-id (if (= :once type)
|
||||||
(sound! snd :play (scale-vol-from-fade entities (current-sound-volume vol)) (or pitch 1.0) pan )
|
(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 )) ]
|
(sound! snd :loop 0.0 (or pitch 1.0) pan )) ]
|
||||||
|
|
||||||
(update-in entities [:current-sounds :value]
|
(update-in entities [:current-sounds :value]
|
||||||
conj {:id sound-id
|
conj {:id sound-id
|
||||||
:sound snd
|
:sound snd
|
||||||
@@ -748,8 +749,7 @@
|
|||||||
:type type
|
:type type
|
||||||
:ends-at (if (= type :once)
|
:ends-at (if (= type :once)
|
||||||
(+ (:total-time screen) 1.0 #_(sound! snd :duration))
|
(+ (:total-time screen) 1.0 #_(sound! snd :duration))
|
||||||
nil)}))
|
nil)}))))
|
||||||
entities))
|
|
||||||
|
|
||||||
(defn stop-all-sounds! [entities]
|
(defn stop-all-sounds! [entities]
|
||||||
(doseq [snd (get-in entities [:current-sounds :value] [])]
|
(doseq [snd (get-in entities [:current-sounds :value] [])]
|
||||||
|
|||||||
Reference in New Issue
Block a user