PLAY(6)

NAME
play - play audio files

SYNOPSIS
play [ -i ] [ -V ] [ -d dev ] [ -v vol ] [ filename... ]

AVAILABILITY

This command is only available with the Demos software installation option. Refer to for information on how to install optional software.

DESCRIPTION

play copies the named audio files to the audio device. Audio files named on the command line are played sequentially. If no filenames are present, the standard input stream is played. The special filename `-' may be used to read the standard input stream instead of a file.

The input files (including the standard input) must contain a valid audio file header. The encoding information in this header is matched against the capabilities of the audio device and, if the data formats are incompatible, an error message is printed and the file is skipped.

Minor deviations in sampling frequency (those less than 1%) are ordinarily ignored. This allows, for instance, data sampled at 8012 Hz to be played on an audio device that only supports 8000 Hz. If the -V option is specified, such deviations are flagged with warning messages.

OPTIONS

-i  Print an error message and exit immediately if the audio device is unavailable (that is, another process currently has write access). play will ordinarily wait until it can obtain access to the device.

-V  Verbose. Print messages to the standard error while waiting for access to the audio device or when sample rate deviations are detected.

-d dev
    Specify an alternate audio device to which output should be directed. If the -d option is not specified, /dev/audio is the default audio device.

-v vol
    Set the output volume to vol before playing begins. vol is an integer value between 0 and 100, inclusive. If this argument is not specified, the output volume remains at the level most recently set by any process.

-?  Help. Print a command line usage message.

SEE ALSO
record(6)

WARNINGS

This program is furnished on an as is basis as a demonstration of audio applications programming.