This provides controls for the audio system. It's still pretty limited right now.
This provides controls for the audio system. It's still pretty limited right now.
(initial-register-audio-tracks! {:keys [:prospero.audio/audio-assets]
:as game-system})
Used by the system to intialize the sounds at startup.
Used by the system to intialize the sounds at startup.
(queue-audio-track! game-system track-name opts)
Start playing the named track.
An option ::prospero.audio/emit-signal-on-end
can be used to send a signal
when a sound completes playing. This can be used to set up loops, for
instance.
Start playing the named track. An option `::prospero.audio/emit-signal-on-end` can be used to send a signal when a sound completes playing. This can be used to set up loops, for instance.
(register-audio-track! game-system track-name track-source opts)
This registers a sound to play. This will likely always necessary for web games. Audio tracks can be registerd when the game-system is created like this:
(procore/start-game
{::procore/game-system ::iris/game-system
::proaudio/audio-assets {"track-name" ["/sounds/sound.wav" {}]
"next-track" ["/sounds/another.mp3" {}]}})
This registers a sound to play. This will likely always necessary for web games. Audio tracks can be registerd when the game-system is created like this: ``` (procore/start-game {::procore/game-system ::iris/game-system ::proaudio/audio-assets {"track-name" ["/sounds/sound.wav" {}] "next-track" ["/sounds/another.mp3" {}]}}) ```
(stop-audio-track! game-system track-name opts)
Force a playing sound to stop.
Force a playing sound to stop.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close