Previous: Rendering and displaying text, Up: Working with external data


2.2.3 Loading and playing sounds

In order to be able to use the procedures documented here, one needs to (use-modules (slayer audio)). The module provides a symbol slayer-audio for cond-expand (srfi-0).

— Procedure: load-sound path

Loads a sound file indicated by path. It ought to be a wave file.

— Procedure: play-sound! sound

Plays a specified sound, which has previously been loaded using the load-sound procedure. Many sound files can be played at once.

— Procedure: load-music path

Loads a music file indicated by path. It can be mp3 or ogg file.

— Procedure: play-music! music

Plays a specified music, which has previously been loaded using load-music procedure. Only one music track can be played at once, and it can be paused using pause-music! procedure.

— Procedure: pause-music!

Pauses currently played music track (if any).

— Procedure: resume-music!

Resumes previously paused music track (if any).