AUpdateDataLength(3X)
NAME
AUpdateDataLength − update a file’s header
SYNOPSIS
#include <audio/Alib.h> void
AUpdateDataLength (
Audio * audio,
char * pathname,
AFileFormat file_format,
long * status_return);
DESCRIPTION
AUpdateDataLength() opens the file specified by pathname (if the specified file_format requires data length or file length information in its header), determines the relevant lengths, writes them to the appropriate fields and closes the file. If the specified file format does not require a header with a data or file length field, AUpdateDataLength returns without doing anything.
audio specifies the Audio structure associated with this connection.
pathname the pathname of the audio file.
file_format the format of the audio file at pathname.
status_return receives the returned status of the operation, unless it is set to NULL.
ERRORS
If status_return is not set to NULL, one of the following is returned in status_return:
0 AENoError
1 AESystemCall
6 AEBadFileFormat
17 AEOutOfMemory
EXAMPLE
The following example updates header of the Sun/NeXT file at /myhome/a_dir/a_file.
AFileFormat file_fmt; /* file format ∗/
Audio * audio; /∗ audio connection ∗/
long status; /* status ∗/
.
.
.
/* update file header of /myhome/a_dir/a_file with relevant lengths ∗/
file_fmt = AFFSun;
char fname[] = /myhome/a_dir/a_file ;
AUpdateDataLength(audio, fname, file_fmt, &status);
DEPENDENCIES
This function belongs to the Audio Library of functions that manage connections to an audio server. The audio server must run on a system that has audio hardware. To find out whether or not your system has audio hardware, refer to the hardware manual that accompanies your system.
AUTHOR
AUpdateDataLength() was developed by HP.
SEE ALSO
Using the Audio Application Program Interface.
Hewlett-Packard Company — HP-UX Release 9.0: August 1992