AChooseAFileAttributes(3X)
NAME
AChooseAFileAttributes − select attributes to use when creating a new file
SYNOPSIS
#include <audio/Alib.h>
void
AChooseAFileAttributes (
Audio *audio,
AudioAttributes *src_attributes,
AFileFormat file_format,
AudioAttrMask user_mask,
AudioAttributes *attributes,
AByteOrder *byte_order,
long *status_return
);
DESCRIPTION
AChooseAFileAttributes() selects attributes to use when creating a new file.
audio specifies the Audio structure associated with this connection.
src_attributes specifies the audio attributes of the source stream.
file_format specifes the target file format.
user_mask specifies which of the audio attributes in the attributes structure have been supplied by the user (mask bit set to 1). These attributes are checked for validity, but are not changed.
attributes contains user-supplied attributes (if any) as indicated by user_mask. AChooseAFileAttributes() writes appropriate values to those attributes not supplied by the user.
byte_order receives byte ordering for the audio file.
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
6 AEBadDataFormat
7 AEBadFileFormat
EXAMPLES
The following example chooses attributes for use when creating a new Sun/NeXT file.
Audio * audio; /∗ audio connection ∗/
AudioAttributes * src_attribs; /∗ source stream attributes ∗/
AFileFormat dest_file_format; /* file format ∗/
AudioAttrMask dest_mask; /* attributes set by user ∗/
AudioAttributes dest_attribs; /* returned attributes ∗/
AByteOrder dest_byte_order; /* returned byte order ∗/
long status; /* status ∗/
dest_file_format = AFFSun;
.
.
.
/* Get the attribute structure for the target file. ∗/
/* Specify MuLaw data format and 8k samples/second ∗/
dest_attribs.type = ATSampled;
dest_attribs.attr.sampled_attr.data_format = ADFMuLaw;
dest_attribs.attr.sampled_attr.sampling_rate = 8000;
dest_mask = ASDataFormatMask | ASSampling Rate Mask;
AChooseAFileAttributes(audio, src_attribs, dest_file_format,
dest_mask, &dest_attribs, &dest_byte_order, &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 shipped with your system.
AUTHOR
AChooseAFileAttributes() was developed by HP.
SEE ALSO
Using the Audio Application Program Interface.
Hewlett-Packard Company — HP-UX Release 9.0: August 1992