Liking cljdoc? Tell your friends :D

prospero.audio

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.
raw docstring

initial-register-audio-tracks!clj/s

(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.
sourceraw docstring

queue-audio-track!clj/s

(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.
sourceraw docstring

register-audio-track!clj/s

(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" {}]}})
```
sourceraw docstring

stop-audio-track!clj/s

(stop-audio-track! game-system track-name opts)

Force a playing sound to stop.

Force a playing sound to stop.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close