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


2.5 Audio

Chickadee has two data types for audio: samples and music. Samples are for short sound effects like explosions. Music is for, well, uh…, music.

Supported file formats include WAV and OGG.

Scheme Procedure: load-sample file

Load audio sample from file.

Scheme Procedure: set-sample-volume! volume

Set the volume that all samples are played at to volume, an integer value between 0 and 128.

Scheme Procedure: play-sample sample

Play sample. Pretty straightforward!

Scheme Procedure: load-music file

Load music from file.

Scheme Procedure: music-volume

Return the volume level for music, an integer value between 0 and 128.

Scheme Procedure: set-music-volume! volume

Set the volume that music is played at to volume, an integer value between 0 and 128.

Scheme Procedure: play-music music [loop?]

Play music. If loop?, play it over and over and over and over and…

Scheme Procedure: pause-music

Pause the current music track.

Scheme Procedure: resume-music

Resume the current music track.

Scheme Procedure: rewind-music

estart the current music track from the beginning.

Scheme Procedure: stop-music

Stop playing the current music track.

Scheme Procedure: music-playing?

Return #t if music is currently playing.

Scheme Procedure: music-paused?

Return #t if music is currently paused.