Next: , Previous: , Up: API Reference   [Contents][Index]

5.4 Audio

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.

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.