Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

soundtool(6)

audio(7)

gaintool(6)

NAME

gaintool − audio control panel

DISCLAIMER

This program is furnished on an AS IS basis as a demonstration of audio applications programming. 

SYNOPSIS

gaintool [ −d device ]

DESCRIPTION

GainTool is an XView demonstration program that controls various characteristics of the audio device.  By default, GainTool operates on /dev/audio, though an alternative audio device may be specified by using the −d option.  Operations performed by the GainTool control panel affect all audio programs using the specified device; for instance, adjusting the Play Volume instantly changes the output gain, regardless of which program is playing audio data.  Further, GainTool detects audio state changes made by other programs, and updates its display accordingly, so that it keeps in sync with the current device configuration. 

GainTool demonstrates an important principle involved in the integration of audio in the desktop environment: by enabling global control of important audio characteristics, it is not necessary for every application to provide an interface for these parameters.  For instance, since audio output may be paused from the control panel, it is not strictly necessary that output applications display a Pause button of their own.  However, such applications may detect that audio output has been paused, and take appropriate action. 

Control Panel

Play Volume
This slider adjusts the output volume. Volume levels between 0 and 100 may be selected, where 0 represents infinite attenuation and 100 is maximum gain.

Record Volume
This slider adjusts the recording gain level in the range 0 to 100.

Monitor Volume
This slider adjusts the monitor gain level in the range 0 to 100. Monitor gain controls the amount of audio input signal that is fed through to the output port.  For instance, if an audio source (such as a radio or CD-player) is connected directly to the input port, the input signal may be monitored through either the built-in speaker or the headphone jack by adjusting this slider. Note that there may be audible feedback (a high-pitched whine) if a microphone is connected to the workstation and the monitor volume is set greater than zero.

Output
This selector switches the audio output port between the built-in speaker and the external headphone jack.

Pause Play
This button may be used to suspend and resume audio output. If audio output is in progress when Pause is pressed, it is stopped immediately and subsequent output data remains queued.  The button then switches to a Resume button that, when pressed, resumes audio output at the point that it was suspended. 

If no process has the device open for output when Pause is pressed, GainTool holds the device open itself, thereby denying other processes output access.  Audio programs that simply open and write to the audio device will typically be suspended when they attempt to open the device.  Programs that asynchronously poll the device will discover that it is “busy” and may take appropriate action. 

Audio Device Status Panel

GainTool also includes an audio status panel that shows the current state of the audio device.  This panel is extremely useful for debugging audio applications.  Selecting “Status...” from the panel menu or pressing the PROPS (L3) key brings up the status panel.  Selecting “Done” from the panel menu (or pressing the (L7) key) removes the panel. 

When the Update Mode is set to Status Change, the audio device status is updated only when a SIGPOLL signal is delivered to GainTool (see audio(7)).  Because of this, the Active and Samples indicators are not necessarily kept up-to-date.  This mode is useful for application debugging in order to see exactly when audio device status changes are being reported.  When the Continuous mode is selected, the status is continually updated. 

SEE ALSO

soundtool(6), audio(7)

SunOS 5.1/SPARC  —  Last change: 17 Mar 1992

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