Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ Audio(5) — HP-UX 8.07

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

AAudioString(3X)

ABestAudioAttributes(3X)

ACheckEvent(3X)

ACheckMaskEvent(3X)

ACloseAudio(3X)

AConnectionNumber(3X)

AConnectRecord(3X)

ACreateSBucket(3X)

ADataFormat(3X)

ADestroySBucket(3X)

AEventsQueued(3X)

AGetErrorText(3X)

AGetGain(3X)

AGetSBucket(3X)

AGetTransStatus(3X)

AGMGainRestricted(3X)

AGrabServer(3X)

AInputChannels(3X)

AInputSources(3X)

ALoadAFile(3X)

AMaskEvent(3X)

AMaxInputGain(3X)

AMaxOutputGain(3X)

AMinInputGain(3X)

AMinOutputGain(3X)

ANextEvent(3X)

ANumDataFormats(3X)

ANumSamplingRates(3X)

AOpenAudio(3X)

AOutputChannels(3X)

AOutputDestinations(3X)

APauseAudio(3X)

APeekEvent(3X)

APlaySBucket(3X)

APlaySStream(3X)

AProtocolRevision(3X)

AProtocolVersion(3X)

APutBackEvent(3X)

APutSBucket(3X)

AQLength(3X)

AQueryAFile(3X)

ARecordAData(3X)

ARecordSStream(3X)

AResumeAudio(3X)

ASamplingRates(3X)

ASaveSBucket(3X)

ASelectInput(3X)

AServerVendor(3X)

ASetCloseDownMode(3X)

ASetErrorHandler(3X)

ASetGain(3X)

ASetIOErrorHandler(3X)

ASetSystemPlayGain(3X)

ASetSystemRecordGain(3X)

ASimplePlayer(3X)

ASimpleRecorder(3X)

ASoundBitOrder(3X)

ASoundByteOrder(3X)

AStopAudio(3X)

AtAddCallback(3X)

AtInitialize(3X)

AuCreatePlay(3X)

AuCreateRecord(3X)

AuInvokePlay(3X)

AuInvokeRecord(3X)

AUngrabServer(3X)

AVendorRelease(3X)

Audio(5)

NAME

Audio − audio application interface and demo program

Remarks:

Beginning with Release 8.07, the HP-UX operating system features an Audio Application Program Interface (AAPI) and an audio demonstration program that can be run on any HP-UX system that is equipped with the necessary audio hardware.  When an application program or the audio demonstration program uses the AAPI, the AAPI audio server component must run on a system that equipped with audio hardware.  To determine the presence of audio hardware, check the hardware manual provided with the system, or look for audio jacks on the back of the computer enclosure. 

DESCRIPTION

The AAPI

The AAPI includes a library of functions that can be called by an application program written in C language.  The functions interact with the audio server, enabling the application to record and play audio data files and also convert audio data files from one format to another. 

The AAPI also includes audio widgets for play and record, and a toolkit of functions that initialize, register, and unregister these widgets.  The toolkit and widgets enable application programs based on Motif or similar graphical user interface toolkits to integrate audio capabilities. 

The AAPI contains client and server components.  These components can all run on one system, or the client components and the application program can run on a remote system.  The audio data can reside on either the remote or the local system, or on still another system.  In every case, the server must run on a system that is equipped with audio hardware. 

For more information about programming with the AAPI, refer to the manual Using the Audio Application Program Interface. included in the HP-UX General Programming manual set. 

Audio Demonstration Program

The audio demonstration program is an example software package designed to demonstrate many of the capabilities of the AAPI. 

The demonstration opens an audio window which contains selections in the form of buttons and pulldown menus.  The window also contains a waveform display area.  Many of the controls in the audio window are similar to tape recorder controls: play, pause, stop, forward, and reverse. 

After connecting a microphone to the input jack on your system, you can use the demonstration program to create and record an audio file.  To ensure system security and privacy of conversations, be sure to turn off the microphone when it is not in use. 

To use the play features of the demonstration program, one or more audio data files must be present.  These can be created by using the program’s record feature, or obtained from another source.  Supported file formats are listed in the next section. 

You can open an audio file, play it, look at its waveform, and use the waveform to edit the file.  To send output to a speaker or headphone connected to the output jack on your system, direct the play output to the external device. 

To run the demonstration program, install the AAPI correctly, and be sure that the supporting services are running, follow these steps:

Step 1.  Install the AAPI according to the instructions in the Software Installation document that accompanies your Operating System.  Briefly:

Task 1.  Log in as superuser. 

Task 2.  Proceed to install or update the software that you want. 

Task 3.  Select Audio from the OS Features under Select/View "partitions". 

Task 4.  If reboot is not automatic, reboot. 

Step 2.  Check the audio device files.  There should be several as /dev/audioXX.  If they are not there, run /usr/audio/bin/make_audio_dev. 

Step 3.  Start the NCS Local Location Broker Daemon. 

Task 1.  If you are not already superuser, log in as superuser. 

Task 2.  Enter the command line /usr/etc/ncs/llbd&.  To make llbd start automatically at boot time, edit the file /etc/netncsrc and change the line START_LLBD=0 to START_LLBD=1. 

Step 4.  Set the AUDIO environment variable to specify the node where the audio client should look for the audio server.  If AUDIO is not set or if it is set to :0, the client connects with a server on the same node. 

To specify that the client should connect to a server on another node, set

AUDIO =: node_name

Step 5.  Start the audio server by typing /usr/audio/bin/Aserver&.

Step 6.  Start the demonstration program by typing /usr/audio/bin/audio_demo[&].

There is visual and aural online help for the demonstration program.  Help is a selection on the pulldown menus, and there is a help button at the upper-right corner of the demonstration window. 

Audio File Types

Audio data files exist in a variety of formats.  The AAPI supports optional extensions to the file name to indicate the sampling rate and the file type, using the format: filename.sampling_rate.file_type where file_type can be any of the following supported types:

.u Mulaw

.al Alaw

.au Sun

.wav RIFF   (MicroSoft RIFF Waveform)

.snd Mac *

.l16 Linear16  (16-bit signed)

.l8 Linear8  (8-bit signed)

.lo8 Linear8Offset  (8-bit unsigned)

* Note that Mac file support is for the sampled sound resource of the Macintosh Sound Manager Format 2 snd resource; files can have precisely 1 sampled sound buffer command.  If a Mac file does not meet these requirements, it may be possible to play it as a raw data file in Linear Offset with a sampling rate of 22K. 

The sampling_rate extension requires values in the form n, nk, or nK, where n is the rate in Hertz, and k or K, if present, is interpreted as n multiples of 1000 Hz.  Sampling rate ranges typically from about 8K to 22K.  However, you can add a file_type extension without including a sampling_rate extension, and you do not need to mark a sampling_rate placeholder with an extra period. 

When you use the demonstration program you can choose the file format by selecting Preferences -> Format -> [pick_from_list]. If the filename has a file_type extension and it differs from the format selection, the format selection overrides the extension. 

DEPENDENCIES

When an application program or the audio demonstration program uses the AAPI, the AAPI audio server component must run on a system that has audio hardware. 

AUTHOR

The AAPI and the audio demonstration program were developed by HP. 

SEE ALSO

AAudioString(3X), ABestAudioAttributes(3X), ACheckEvent(3X), ACheckMaskEvent(3X), ACloseAudio(3X), AConnectionNumber(3X), AConnectRecord(3X), ACreateSBucket(3X), ADataFormat(3X), ADestroySBucket(3X), AEventsQueued(3X), AGetErrorText(3X), AGetGain(3X), AGetSBucket(3X), AGetTransStatus(3X), AGMGainRestricted(3X), AGrabServer(3X), AInputChannels(3X), AInputSources(3X), ALoadAFile(3X), AMaskEvent(3X), AMaxInputGain(3X), AMaxOutputGain(3X), AMinInputGain(3X), AMinOutputGain(3X), ANextEvent(3X), ANumDataFormats(3X), ANumSamplingRates(3X), AOpenAudio(3X), AOutputChannels(3X), AOutputDestinations(3X), APauseAudio(3X), APeekEvent(3X), APlaySBucket(3X), APlaySStream(3X), AProtocolRevision(3X), AProtocolVersion(3X), APutBackEvent(3X), APutSBucket(3X), AQLength(3X), AQueryAFile(3X), ARecordAData(3X), ARecordSStream(3X), AResumeAudio(3X), ASamplingRates(3X), ASaveSBucket(3X), ASelectInput(3X), AServerVendor(3X), ASetCloseDownMode(3X), ASetErrorHandler(3X), ASetGain(3X), ASetIOErrorHandler(3X), ASetSystemPlayGain(3X), ASetSystemRecordGain(3X), ASimplePlayer(3X), ASimpleRecorder(3X), ASoundBitOrder(3X), ASoundByteOrder(3X), AStopAudio(3X), AtAddCallback(3X), AtInitialize(3X), AuCreatePlay(3X), AuCreateRecord(3X), AuInvokePlay(3X), AuInvokeRecord(3X).  AUngrabServer(3X), AVendorRelease(3X). 

Using the Audio Application Program Interface.

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

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