Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ AGetDataFor(3X) — HP-UX ANSI C A.10.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ADataFormats(3X)

AGetDataFormats(3X)

NAME

AGetDataFormats − get data formats for a specified file format

SYNOPSIS

#include <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.  One of the following values:

AFFUnknown − Returned if the Audio library cannot determine the file type

AFFRiffWave − Microsoft RIFF waveform

AFFSun − Sun(NeXT) format

AFFRawMuLaw − MuLaw format

AFFRawALaw − ALaw format

AFFRawLin16 − Linear16 (16-bit signed) format

AFFRawLin8 − Linear8 (8-bit signed) format

AFFRawLin8Offset − Linear8Offset (8-bit unsigned)

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 ∗/
.
.
.

NOTE

In order to ensure that the compiler finds the Audio Library (libAlib.sl) and the Alib.h header file, you must add the following switches:

-L /opt/audio/lib
-I/opt/audio/include

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 Using the Audio Developer’s Kit or the online help for the Audio control panel.  For information about the audio capabilities of a particular system use the online example audioinfo.c. 

AUTHOR

AGetDataFormats() was developed by HP. 

SEE ALSO

ADataFormats(3X). 

 

Hewlett-Packard Company  —  Audio Library: February, 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026