AGetDataFormats(3X)
NAME
AGetDataFormats − get data formats for a specified file format
SYNOPSIS
#include <audio/Alib.h> long
AGetDataFormats (
AFileFormat file_format);
DESCRIPTION
AGetDataFormats() returns a mask of supported data formats for the file format specified in file_format. The returned mask is a long, whose bits correspond to the enum "ADataFormat’ defined in Alib.h.
The encoding is:
/* *dataFormatNames[] =
Unknown, 0
MuLaw, 1
ALaw, 2
Lin16, 3
Lin8, 4
Lin80ffset, 5
*/
file_format specifies the file format of interest.
RETURN VALUE
Upon successful completion, AGetDataFormats() returns a long integer mask of the valid data formats for the given file format. If the file format itself is invalid, AGetDataFormats returns zero.
EXAMPLE
The following example gets the data formats for a Sun/NeXT file .
long data_formats_msk; /* supported data formats ∗/
.
.
.
/* determine valid data formats for a Sun/NeXT file ∗/
data_formats_msk = AGetDataFormats (AFFSun);
/* determine if MuLaw is supported ∗/
if (data_formats_msk & ( 1 << ADFMuLaw ))
/* Mulaw is a supported data type ∗/
.
.
.
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
AGetDataFormats() was developed by HP.
SEE ALSO
Using the Audio Application Program Interface.
Hewlett-Packard Company — HP-UX Release 9.0: August 1992