NAME

towav - convert binary file to ASEL .wav format

SYNOPSIS

towav [-options:values] file.ext

DESCRIPTION

towav reads a binary file and converts it to ASEL .wav format by appending the correct header structure. Existing headers can be removed in the process if necessary, and data can be slightly reformatted (byte swapping for machines using motorola or equivalent chips that store integers in hi-lo byte order) and scaled by a constant integer divisor.

OPTIONS

-SKip:nnn
Number of bytes to skip at the start of the old file. Allows one to skip other headers. [default = -SK:0]
-WOrdsiz:m
Length of each sample from the input file in bytes. [-WO:2]
-SAmp_rate:n
Sampling rate in Hz. [-SA:20200]
-SWAP
Swap lo and hi bytes of each sample. [-NOSWAP]
-SCale_div:n
Integer scale divisor. [-SC:1]
-FOrmat:[OB|TC|PC]
Binary data format as:

NOTES

Be sure that the input file does not have the extension .WAV! This program builds the output file name by stripping the input file of its extension and appending .WAV. On a PC, this can result in attempts to overwrite the file with itself and will surely result in I/O errors and lost clusters!

The use of the old ASEL wav format is being phased out. This program should be rewritten to produce output in RIFF format.

SEE ALSO

cpywav (1)

AUTHORS

H.T.Bunnell, Shirely Peters.