Next: Fonts, Previous: Images, Up: API Reference [Contents][Index]
(use-modules (sdl2 mixer))
Initialize mixer library with support for formats, a list of symbols representing audio file formats. Possible formats are:
Shutdown mixer library.
Initialize the mixer API. frequency specificies the sample rate in
hertz. When stereo? is #t
, two output channels are used, otherwise
mono output is used instead. chunk-size specifies the number of bytes
used per output sample. format is a symbol that specifies the output
sample format. Possible values are:
Shut down the mixer API.
Return #t
if c is a chunk.
Load the audio data in file and return an audio chunk.
Free the memory used for chunk.
Set the loudness of chunk to volume, an integer in the range [0,128]. Return the previous chunk volume setting.
Play chunk on channel, an integer channel identifier or #f
to use the first unreserved audio channel. chunk will play loops +
1 times. Return the channel identifier that chunk is played on.
Set the loudness of channel, an integer channel identifier or #f
for all channels, to volume, an integer in the range [0,128]. Return
the previous volume of channel, or the average of all channels if
channel is #f
.
Pause playback on channel, an integer channel identifier, or #f
to
pause all channels.
Resume playback on channel, an integer channel identifier, or #f
to
resume all channels.
Halt playback on channel, an integer channel identifier, or #f
to
halt all channels.
Return #t
if channel is playing.
Return the number of channels currently playing.
Return #t
if channel is paused.
Return the number of channels that are paused.
Return #t
if m is music.
Load music from file.
Delete the memory used for music.
Play music, repeated loops times. loops may be #f
, in
which case the music loops indefinitely.
Set music loudness to volume, an integer in the range [0,128]. Return the previous volume.
Return the music volume.
Puase the music.
Resume music playback.
Start music playback from the beginning. Rewinding is only supported for MOD, OGG, MP3, and native MIDI music.
Halt music playback.
Return #t
if music is currently playing.
Return #t
if music is currently paused.
Next: Fonts, Previous: Images, Up: API Reference [Contents][Index]