Name

aplay

Synopsis

aplay [options] [file]

Play sound files using the ALSA sound system. The related arecord records sound files.

Options

-c, --channels=n

Use n channels: 1 for mono, 2 for stereo.

-d, --duration=n

Set an interrupt for n seconds after playback begins.

-D, --device=devicename

Select a PCM device by name.

-f, --format=format

Specify the sample format. The sample formats available will depend on hardware. For CD and DAT output, use the cd and dat shortcuts, which set the sample rate, format, and channel numbers all at once.

-h, --help

Print help message, then exit.

-l, --list-devices

List available sound cards and digital audio devices.

-L, --list-pcms

List all PCM (pulse-coded modulation, or digital audio) devices that have been defined. PCMs may be defined in the .asoundrc file.

-q, --quiet

Run quietly. Do not display messages.

-r, --rate=n

Set the sample rate in Hertz. The default is 8000 Hertz.

-s, --sleep-min=n

Set the minimum number of ticks to sleep. The default is not to sleep.

-t, --file-type=type

Name the file type used. Files may be voc, wav, raw, or au.

--version

Print version and quit.

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.