un. believable. iphone 4s can play the whole game.
This commit is contained in:
@@ -431,12 +431,10 @@
|
||||
(doto (music (str r ".mp3")) (music! :set-looping true)))))
|
||||
|
||||
(defn load-sound [f]
|
||||
nil
|
||||
#_(try
|
||||
(try
|
||||
(iosify
|
||||
(sound (str f ".mp3"))
|
||||
(sound f)
|
||||
)
|
||||
(sound f))
|
||||
(catch Exception e
|
||||
(log/info e)
|
||||
(sound (str f ".mp3")))))
|
||||
@@ -679,29 +677,24 @@
|
||||
(play-sound! screen entities snd volume-fn pan type 1.0))
|
||||
|
||||
([screen entities snd volume-fn pan type pitch]
|
||||
(if (if (keyword? snd)
|
||||
(or (-> entities :room :sounds snd)
|
||||
(-> entities :sounds snd))
|
||||
snd)
|
||||
(let [vol (volume-fn entities)
|
||||
snd (if (keyword? snd)
|
||||
(or (-> entities :room :sounds snd)
|
||||
(-> entities :sounds snd))
|
||||
snd)
|
||||
|
||||
(let [vol (volume-fn entities)
|
||||
snd (if (keyword? snd)
|
||||
(or (-> entities :room :sounds snd)
|
||||
(-> entities :sounds snd))
|
||||
snd)
|
||||
|
||||
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
|
||||
:volume-fn volume-fn
|
||||
:type type
|
||||
:ends-at (if (= type :once)
|
||||
(+ (:total-time screen) 1.0 #_(sound! snd :duration))
|
||||
nil)}))
|
||||
entities)))
|
||||
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
|
||||
:volume-fn volume-fn
|
||||
:type type
|
||||
:ends-at (if (= type :once)
|
||||
(+ (:total-time screen) 1.0 #_(sound! snd :duration))
|
||||
nil)}))
|
||||
entities))
|
||||
|
||||
(defn stop-all-sounds! [entities]
|
||||
(doseq [snd (get-in entities [:current-sounds :value] [])]
|
||||
|
||||
Reference in New Issue
Block a user