play-sound in Miscellaneous
(play-sound-> booleanfilenameasync?)
filename: path
async?: booleanPlays a sound file. If
async?is false, the function does not return until the sound completes. Otherwise, it returns immediately. The result is#tif the sound plays successfully,#fotherwise.Under Windows, only .wav files are supported.
Under X, the function invokes an external sound-playing program; looking for a few known programs (aplay, play, esdplay, sndfile-play, audioplay). In addition, a play command can be defined through the
'|MrEd:playcmd|preference preference (see Preferences). The preference can hold a program name, or a format string containing a single ``~a'' where the filename should be substituted -- and used as a shell command. (Don't use ``~s'', since the string that is used with the format string will be properly quoted and wrapped in double quotes.) A plain command name is usually better since execution is faster. The command's output is discarded, unless it returns an error code -- in this case the last part of the error output is shown.Under Mac OS X, Quicktime is used to play sounds; most sound formats (.wav, .aiff, .mp3) are supported in recent versions of Quicktime. In order to play .wav files, Quicktime 3.0 (compatible with OS 7.5 and up) is required.