To play sound using Emacs, use the function
certain systems are supported; if you call
play-sound on a
system which cannot really do the job, it gives an error.
The sound must be stored as a file in RIFF-WAVE format (‘.wav’) or Sun Audio format (‘.au’).
This function plays a specified sound. The argument, sound, has
(sound properties...), where the properties
consist of alternating keywords (particular symbols recognized
specially) and values corresponding to them.
Here is a table of the keywords that are currently meaningful in sound, and their meanings:
This specifies the file containing the sound to play. If the file name is not absolute, it is expanded against the directory data-directory.
This specifies the sound to play without need to refer to a file. The value, data, should be a string containing the same bytes as a sound file. We recommend using a unibyte string.
This specifies how loud to play the sound. It should be a number in the range of 0 to 1. The default is to use whatever volume has been specified before.
This specifies the system device on which to play the sound, as a string. The default device is system-dependent.
Before actually playing the sound,
calls the functions in the list
Each function is called with one argument, sound.
play-sound-filefile &optional volume device
This function is an alternative interface to playing a sound file specifying an optional volume and device.
A list of functions to be called before playing a sound. Each function is called with one argument, a property list that describes the sound.