NAME

setwnr, windoc, windor, freewnr - random I/O windowing routines

SYNOPSIS

#include "wiodef.h"
int setwnr(WVFILE *wfp, float wleng, int type)
int windor(WVFILE *wfp, float *data, float time)
int windoc(WVFILE *wfp, float *data, float time)
int freewnr()

DESCRIPTION

setwnr() sets up parameters for doing windowed I/O from the waveform file associated with wfp. The window length is determined in wleng. The type of window is determined in type. The types of windows supported are:
0
rectangular window
1
Hamming window
2
Hanning window
windor() and windoc() apply a window function to data from the waveform associated with wfp and return the results in data. windor() applies the function to data starting at time, and windoc() applies the function to data centered at time. The length of the data window and the windowing function must be determined in setwnr() previous to calling this routine.
freewnr() frees the memory allocated in setwnr().

RETURNS

setwnr(), windor(), and windoc() return 0 on success and 1 on failure.

SEE ALSO

inwav(),
Libcwav library

AUTHOR

H.T.Bunnell, Shirley Peters