Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

AAudioString(3X)

ABestAudioAttributes(3X)

ACheckEvent(3X)

ACheckMaskEvent(3X)

ACloseAudio(3X)

AConnectionNumber(3X)

AConnectRecordStream(3X)

AConvertAFile(3X)

ACreateSBucket(3X)

ADataFormats(3X)

ADestroySBucket(3X)

AEventsQueued(3X)

AGetErrorText(3X)

AGetChannelGain(3X)

AGetGain(3X)

AGetSBucketData(3X)

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

APutSBucketData(3X)

AQLength(3X)

AQueryAFile(3X)

ARecordAData(3X)

ARecordSStream(3X)

AResumeAudio(3X)

ASamplingRates(3X)

ASaveSBucket(3X)

ASelectInput(3X)

Aserver(1M)

AServerVendor(3X)

ASetChannelGain(3X)

ASetCloseDownMode(3X)

ASetErrorHandler(3X)

ASetGain(3X)

ASetIOErrorHandler(3X)

ASetSystemChannelGain(3X)

ASetSystemPlayGain(3X)

ASetSystemRecordGain(3X)

ASimplePlayer(3X)

ASimpleRecorder(3X)

ASoundBitOrder(3X)

ASoundByteOrder(3X)

AStopAudio(3X)

AUngrabServer(3X)

AVendorRelease(3X)

AtAddCallback(3X)

AtInitialize(3X)

AtRemoveCallback(3X)

AuCreatePlay(3X)

AuCreateRecord(3X)

AuInvokePlay(3X)

AuInvokeRecord(3X)

AuPlayWidget(3X)

AuRecordWidget(3X)

AuSaveFile(3X)

Audio(5)  —  Series 700 Only

NAME

Audio − audio application interface and demo program

Remarks:

Beginning with Release 8.07, the HP-UX operating system includes audio software comprised of an Audio Application Program Interface (AAPI) and some example programs. 

The audio software package contains client and server components, which can run on separate systems.  Audio data may reside on still a third system.  In all cases, however, the server must run on a Series 700 system 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

Audio Applications Programming Interface

The Audio Applications Programming Interface (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. 

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 designed to demonstrate many of the capabilities of the AAPI.  It provides a Motif-like interface to play, record, and edit functionality.  A waveform is displayed to facilitate editing and traversal of the audio selection. 

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 user privacy, 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, follow these steps:

Step 1.  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 2.  Reboot. 

Step 3.  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: (Korn, Bourne, and POSIX shells)
export AUDIO

or

setenv AUDIO node_name: (C shell)

Step 4.  Normally, the audio server starts whenever the system is booted.  Check for the existence of the Aserver processes by typing

ps -e | grep Aserver

You should see two Aserver processes.  If the server is not running, start the audio server by hand by typing

/usr/audio/bin/Aserver

Then type

ps -e | grep Aserver

and check that there are two active server processes. 

Step 5. 
Start the demonstration program by typing /usr/audio/bin/audio_demo. 

There is online help for the demonstration program.  Help is a selection on the pulldown menus, and there is a help button at the upper-right-hand 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 (NeXT)

.wav RIFF (MicroSoft RIFF Waveform)

.snd NeXT

.l16 Linear16(16-bit signed)

.l8 Linear8(8-bit signed)

.lo8 Linear8Offset(8-bit unsigned)

The sampling_rate extension requires values in the form n, nk, or nK to indicate the number of samples per second.  Typical sampling rates range from 8k to 22k.  You can add a file_type extension without including a sampling_rate extension, and you do not have to mark a sampling_rate placeholder with an extra period. 

If you have a "Mac" file, try treating it as a raw data file in Linear8Offset with a sampling rate of 22K or another sampling rate. 

Adding a Drag and Drop Zone

An audio drag and drop zone can be added.  Refer to Using the Audio Application Program Interface manual for instructions. 

Sample Sound Files

Sample sound files are installed in /usr/audio/examples. 

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.  Note that HP-UX for an 8-Mbyte HP9000 Model 705 system does not include audio software.

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), AConnectRecordStream(3X), AConvertAFile(3X), ACreateSBucket(3X), ADataFormats(3X), ADestroySBucket(3X), AEventsQueued(3X), AGetErrorText(3X), AGetChannelGain(3X), AGetGain(3X), AGetSBucketData(3X), AGetSystemChannelGain(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), APutSBucketData(3X), AQLength(3X), AQueryAFile(3X), ARecordAData(3X), ARecordSStream(3X), AResumeAudio(3X), ASamplingRates(3X), ASaveSBucket(3X), ASelectInput(3X), Aserver(1M), AServerVendor(3X), ASetChannelGain(3X), ASetCloseDownMode(3X), ASetErrorHandler(3X), ASetGain(3X), ASetIOErrorHandler(3X), ASetSystemChannelGain(3X), ASetSystemPlayGain(3X), ASetSystemRecordGain(3X), ASimplePlayer(3X), ASimpleRecorder(3X), ASoundBitOrder(3X), ASoundByteOrder(3X), AStopAudio(3X), AUngrabServer(3X), AVendorRelease(3X), AtAddCallback(3X), AtInitialize(3X), AtRemoveCallback(3X), AuCreatePlay(3X), AuCreateRecord(3X), AuInvokePlay(3X), AuInvokeRecord(3X), AuPlayWidget(3X), AuRecordWidget(3X), AuSaveFile(3X). 

Using the Audio Application Program Interface,
Audio Users Guide.

Hewlett-Packard Company  —  HP-UX Release 9.03: April 1994

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