Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

ABestAudioAttributes(3X)

NAME

ABestAudioAttributes − get best audio attribute setting for specified controller

SYNOPSIS

AudioAttributes ∗
ABestAudioAttributes (

Audio ∗ audio);

DESCRIPTION

ABestAudioAttributes() returns a pointer to an AudioAttributes structure containing the optimal attributes for the audio controller associated with the audio connection.  The application may use the returned attributes pointer directly in subsequent audio operation calls. 

Changes should not be made to the AudioAttributes structure ; rather, the application should copy the structure and make changes in the copy, as shown in the example below. 

audio specifies the Audio structure associated with this connection. 

RETURN VALUE

Upon successful completion, ABestAudioAttributes() returns a pointer to an AudioAttributes structure. 

ERRORS

ABestAudioAttributes() does not return an error status. 

EXAMPLES

The following example shows a call to ABestAudioAttributes() to get the pointer to the best audio attributes. 

Audio ∗ audio;  /∗ audio connection ∗/

AudioAttributes ∗ bestAttr;  /∗ best attributes ∗/
.
.
.

/∗ get best audio attributes ∗/

bestAttr = ABestAudioAttributes (audio);

The next example shows how to get a copy of the best attributes and make a change to a field in the copy. The program assigns the contents at the returned pointer (the audio attributes) to myAttr and then sets the value of the sampled_attr field in myAttr to ASAFBitPerSample. 

Audio ∗ audio;  /∗ audio connection ∗/

AudioAttributes myAttr;  /∗ my copy of best attributes ∗/
.
.
.

/∗ get copy of audio attributes; change the copy ∗/

myAttr = ∗ ABestAudioAttributes (audio);

myAttr.attr.sampled_attr.data_format = ADFALaw

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

ABestAudioAttributes() 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