5.9 Playing Multiple Files 57
For example, the command:
naplay -e ieee file
plays back a le of oating p ointnumbers. For the linear enco ding, the number of
bits/sample can also be specied using the
-p
option. To playback a le containing
20-bit samples use:
naplay -p20 file
Note that the data is assumed to be packed such that every pair of samples will
occupy 5 bytes. Valid choices of the precision are 4, 8, 12, 16, 20, 24, 28, or 32
bits/sample.
Note that not all combinations of the
-f
,
-e
, and
-p
options are valid. Certain le
formats support only particular enco dings and precisions. Attempting to playback
a le with an enco ding or precision dierent from that with whichitwas recorded
will either be rejected or result in incorrect playback. Also, if sample-rate conversion
is being used, the software currently supp orts 16 bit/sample, linear encoding only.
5.9 Playing Multiple Files
Multiple les maybeplayed without anyintervening gap by listing each le on the
command line:
naplay file1 file2 file3
The same settings (sampling rate, precision, etc. ) are used for playback of each
le. If a space is required b etween each le, then additional les containing zero es
can be created and inserted between each le. For example, for stereo playback
at 48,000 samples/second, the following commands will create a le containing one
second of silence and insert it between each le
2
:
dd if=/dev/zero bs=4 count=48000 of=gap
naplay file1 gap file2 gap file3
5.10 Using Standard Input
If no lename is given on the command line, then the audio input data is taken
from the standard input. This allows another program which generates sampled
2
/dev/zero
does not exist on all versions of
UNIX