Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

AQueryAFile(3X)

NAME

AQueryAFile − get file format of specified file

SYNOPSIS

AFileFormat
AQueryAFile (

Audio ∗ audio,

char ∗ name,

long ∗ status_return);

DESCRIPTION

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

audio specifies the Audio structure associated with this connection. 

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

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

RETURN VALUE

Upon successful completion, AQueryAFile() returns the file format of the file specified in name.  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

16 AECantDetermineFormat

EXAMPLE

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

AFileFormat file_fmt;  /∗ file format ∗/

Audio ∗ audio;  /∗ audio connection ∗/

long status;  /∗ status ∗/
.
.
.

/∗ load file into new sound bucket ∗/

char  fname[] = "/myhome/a_dir/a_file";

file_fmt = AQueryAFile(audio, fname, &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

AQueryAFile() was developed by HP. 

SEE ALSO

Using the Audio Application Program Interface.

Hewlett-Packard Company  —  HP-UX Release 8.07: November 1991

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