Next: Scripting, Previous: Graphics, Up: API Reference [Contents][Index]
A game isn’t complete without sound. Most games play some cool
background music to set the mood and have many sound effects to play
when events happen. The (chickadee audio)
module provides a
robust audio API backed by the OpenAL 3D audio system.
• Audio Files | Not audiophiles. | |
• Sources | Audio emitters. | |
• The Listener | The player’s ears. | |
• The Environment | Global sound model settings. |
The basics of playing audio are very simple. Just load an audio file in the load hook (or anywhere else once the game loop is running) and play it!
(define sample (load-audio "neat-sound-effect.wav")) (audio-play sample)
For more advanced usage, check out the full API reference in the following sections.