56 Playback Tutorial
5.7.2 File Sampling Rate
If the le stored on the computer is not at the same sampling rate as that which
will be used by the DAT machine, a sampling-rate conversion op eration must be
performed. This is done automatically in real time by the
DAT-Link
using its
built-in digital signal pro cessor. To invoke a conversion, you need only specify
the sampling rate of the le using the
-s
option. As an example, assume you have
a mono le of sp eech stored on disk that was sampled at 8,000 samples/second.
Further, assume you wish to record this le onto b oth channels of a DAT at 44,100
samples/second. The appropriate command would b e:
naplay -omono -s 8000 -S 44100 file
The
-omono
option selects monophonic playback, the
-s 8000
means the le is
sampled at 8,000 samples/second and the
-S 44100
instructs the
DAT-Link
to
generate audio data at 44,100 samples/second. To p erform this command the
DAT-
Link
will perform a digital resampling op eration which will result in some low-pass
ltering of the audio signal. See Chapter 7 for more information on the eects of
this conversion.
5.8 File Formats
In the ab ove sections wehave assumed the le b eing used contains just audio data
stored as 16 bit signed integers. By default
naplay
will attempt to deduce the le
type by using various heuristics. If these fail, a warning message will b e printed and
the
raw
format will be used. Other formats are available by using the
-f
option
followed by a format name. A full list of possible formats can be displayed by
typing:
naplay -f help
Appendix B.1 describes the enco ding of each format.
In addition, to the overall le format, the type of data enco ding can be sp ecied
using the
-e
option. The valid enco ding choices are:
Linear
:
Direct linear enco ding of the data as signed integers. The precision of the
values defaults to 16 bits/sample, but can be changed using the
-p
option
described b elow. This is the default encoding.
IEEE
:
IEEE oating point format using 4 bytes/sample.
ALaw
:
One byte per sample, A-law companded data.
uLaw
:
One byte per sample, mu-law companded data.