aplay is much the same, only it plays instead of recording. For supported soundfile formats, the sampling rate, bit depth, and so forth can be automatically determined from the soundfile header.
[arecord | aplay ] [flags] filename
-f cd (16 bit little endian, 44100, stereo [-f S16_LE -c2 -r44100] -f dat (16 bit little endian, 48000, stereo) [-f S16_LE -c2 -r48000]
will play the raw file "foobar" as a 22050-Hz, mono, 8-bit, Mu-Law .au file.
arecord -d 10 -f cd -t wav -D copy foobar.wav
will record foobar.wav as a 10-second, CD-quality wave file, using the PCM "copy" (which might be defined in the user's .asoundrc file as:
pcm.copy {
type plug
slave {
pcm hw
}
route_policy copy
}