O'Reilly logo

Linux in a Nutshell, 6th Edition by Robert Love, Stephen Figgins, Ellen Siever, Arnold Robbins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required