VPLAY(1) BSD Reference Manual VPLAY(1)NAMEvplay - play / record sound files
SYNOPSISvplay [-SMvd] [-f audio_dev] [-s speed] [-b bits] [-t secs] [-w secs]
[file ...]
vrec [-SMvd] [-T format] [-f audio_dev] [-s speed] [-b bits] [-t secs]
[-w secs] [file ...]
DESCRIPTION
The vplay program is used to play audio data via the standard audio driv-
er interface. The vrec program is used to record sound data. The fol-
lowing options are available:
-f audio_dev
Audio device, defaults to /dev/dsp.
-T rec_fmt Recording format, may be raw, wav, or voc. If not supplied
the filename suffix is used to determine the filetype to
record to. If all else fails recording is done in raw format.
-s speed Speed to record or play at. For playback if the speed isn't
given the speed determined from the file header is used. For
playback of raw files and recording a default speed (8Khz) is
used if the speed isn't given. The units for speed are Hz.
-b bits Specifies the sample size. May be 8 or 16. If the file header
shows a file is 16 bit but -b 8 is specified the audio data
will converted to 8 bits per sample on the fly. If not speci-
fied the size from the file header is used. For recording and
raw files a default of 8 is used.
-S Specify stereo recording. Has no meaning for playback. The
default for recording is mono.
-M Specify mono recording or playback. If the file being played
back is stereo it will be converted to mono on the fly. This
is the default for recording.
-t secs Time limit for playback or recording. If not specified entire
file is played or recording continues until process is inter-
rupted.
-w secs Number of seconds to wait for audio device to become avail-
able. If set and the audio device is busy it is polled every
500ms up to secs seconds waiting for access. The default is
not to wait (an error is returned immediately if the audio
device is busy). This option is can be used to queue back-
ground processes (like mail delivery daemons) for audio out-
put.
-v Enable verbose mode, messages are printed regarding playback
format.
-d Enable debugging mode, detailed messages of use debugging
problems are printed.
The speed option can be used to override the DSP output rate for files
with headers specifying their recorded speed. This does not do sample
rate conversion, the audio sample will simply be played back at the over-
ridden speed.
Vplay can, however, convert from 16 bit to 8 bit and from stereo to mono
during playback. The 2 channels are mixed equally when converting from
stereo to mono.
The -t parameter applies to each file. For example:
vrec -t 1 a.wav b.wav c.wav
records one second of audio data to each of the files a, b, and c and
vplay-t 1 a.wav b.wav c.wav
plays the first second of each of the files a, b and c.
If no filenames are given, stdout (vrec) or stdin (vplay) is used.
This program supports:
o the full Creative Labs voice structure: Silence, Repeat loops (on
seekable input), Stereo, ASCII blocks, blocks with different sampling
rates
o on non-16-bit cards, 16 bit WAVE files will be played as 8 bit
Soundfile features that are currently unsupported:
o packed VOC files
o multi block WAVE files
o Wave files that are not PCM encoded.
o More than 2 channel .wav files.
BUGS
The -t option is not effective for voc file playback (it is ignored).
Voc files with repeat sections will not work if this program is compiled
with the 2.0 C library (due to a bug in the C library).
It is not possible to record block type 9 (new format) voc files (these
support 16 bit data), it is possible to play these back however. Only 8
bit voc files may be created.
When a recording time is not given and an interrupt is used to stop
recording some data at the end is lost due to buffering in the program.
The output file (if it is voc or wav) will have an incorrect count in its
header as well, although vplay will not complain when playing back such a
file.
SEE ALSOsox(1), mixer(1)HISTORY
The vplay and vrec commands were written for BSD/OS 2.1.
BSDI BSD/OS October 18, 1995 2