Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ AGetAFileAt(3X) — HP-UX 9.10

Media Vault

Software Library

Restoration Projects

Artifacts Sought

AGetAFileAttributes(3X)  —  Series 700 Only

NAME

AGetAFileAttributes() − get file attributes of specified file

SYNOPSIS

#include <audio/Alib.h>

AFileFormat AGetAFileAttributes (

Audio *audio,

char *name,

long *offset,

long *data_length,

AByteOrder *file_byte_order,

AudioAttrMask *mask,

AudioAttributes *file_attr,

long *status_return
);

DESCRIPTION

AGetAFileAttributes() returns the file format of the file specified in name. 

audio specifies the Audio structure associated with this connection. 

name the pathname of the audio data file to be queried. 

offset receives the number of bytes into the file where the audio samples begin. 

data_length receives the length (in bytes) of the audio data. 

file_byte_order receives the byte order (relevant only for l16 data). 

mask receives the information indicating which attributes were determined from file header or file extension (mask bits set to 1). A mask bit set to 0 indicates that the attribute was determined by inference. 

file_attr attribute structure that receives requested attribute information. 

status_return receives the returned status of the operation, unless it is set to NULL. 

RETURN VALUE

Upon successful completion, AGetAFileAttributes() returns the file type of the file specified in name. It also returns the length, the byte order, the attributes, and a mask that indicates how the attribute values were derived. AFFUnknown is returned if the format type cannot be determined. 

ERRORS

If status_return is not set to NULL, one of the following is returned in status_return:

 0 AENoError

 2 AEBadAudio

 8 AEFileNotFound

11 AEBadFileHdr

13 AEBadAttribute

16 AECantDetermineFormat

EXAMPLES

The following example queries the file attributes of the file /myhome/a_dir/a_file. 

AFileFormat file_fmt;       /* file format */
Audio *audio;               /* audio connection */
long offset;                /* offset where data begins */
long data_length;           /* returned data length */
AByteOrder byte_order;      /* returned byte order */
AudioAttrMask attr_mask;    /* attr found in hdr or .ext */
AudioAttributes attribs;    /* returned attributes */
long status;                /* status */
.
.
.
/* get attributes of /myhome/a_dir/a_file */
charfname[] = /myhome/a_dir/a_file ;
file_fmt = AGetAFileAttributes(audio, fname, &offset, &data_len,
&byte_order, &attr_mask, &attribs, &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

AGetAFileAttributes() was developed by HP. 

SEE ALSO

Using the Audio Application Program Interface.

Hewlett-Packard Company  —  HP-UX Release 9.10: April 1995

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