NAME

inwav - Input waveform from file

SYNOPSIS

#include "wiodef.h"
long inwav (WVFILE *wfp, long nrecs, short *wavbuf)

DESCRIPTION

inwav() reads nrecs samples starting at the current waveform file pointer location from the waveform file associated with wfp and places them in array wavbuf. On success, inwav() returns the number of samples actually read which may be less than the number requested if the number requested exceeded the number of samples available. When inwav() returns less than nrecs samples, the array wavbuf is padded with zeros out to nrecs samples. If the read fails with no samples available, inwav() returns a negative value indicating either a hard error or physical EOF (-1), or a 'soft' eof (-2) indicating the end of the requested segment.

SEE ALSO

outwav(), isam(), osam(), opnwav(), clswav(),
Libcwav library

AUTHOR

H.T.Bunnell, Shirley Peters