By default, information consisting of the date, the user and the program creating the file is written to the audio file header. The routine AFsetHInfo can be called before calling this routine to specify additional information to be written to the header. Any such additional header information is reset to null after being written to the header.
This routine can write AU audio files, AIFF-C files, RIFF WAVE files, and headerless audio files.
For the fixed point file data representations, input values in the following ranges will be converted without clipping.
data format allowed values 8-bit mu-law - [ -32636, +32636 ] 8-bit A-law - [ -32768, +32768 ] 8-bit integer - [ -16384, -16383 ] 16-bit integer - [ -32768, +32767 ]For AU files containing floating-point data, values are scaled by 1/32768 before being written to the file. For data values between [-32768, +32768], the file data will lie in the range [-1, +1]. For headerless files of any data format, the values are written scaled by unity.
Fformat = Dformat + 256 * FtypeFor Ftype equal to zero, the file will have the standard AU audio file header. The Ftype flag allows for other file types as described below. Note that not all data formats are allowed for all file types. Dformat: data format
FD_MULAW8 = 1, mu-law 8-bit data FD_ALAW8 = 2, A-law 8-bit data FD_UINT8 = 3, offset-binary 8-bit integer data FD_INT8 = 4, two's-complement 8-bit integer data FD_INT16 = 5, two's-complement 16-bit integer data FD_FLOAT32 = 6, 32-bit floating-point data FD_FLOAT64 = 7, 64-bit floating-point data FD_TEXT = 8, text dataFtype: file type
FTW_AU = 0, AU audio file FTW_WAVE = 1, RIFF WAVE file FTW_AIFF_C = 2, AIFF-C audio file FTW_NH_EB = 3, Headerless file (big-endian byte order) FTW_NH_EL = 4, Headerless file (little-endian byte order) FTW_NH_NATIVE = 5, Headerless file (native byte order) FTW_NH_SWAP = 6, Headerless file (byte-swapped byte order)