Technical data
audio(7I) Ioctl Requests SunOS 5.5
NAME audio − generic audio device interface
OVERVIEW The audio interface described below is an uncommitted interface and may be replaced in
the future.
An audio device is used to play and/or record a stream of audio data. Since a specific
audio device may not support all of the functionalitydescribed below, refer to the
device-specific manual pages for a complete description of each hardware device. An
application can use theAUDIO_GETDEV ioctl(2) to determine the current audio
hardware associated with /dev/audio.
AUDIO
FORMATS
Digital audio data represents a quantizedapproximation of an analog audio signal
waveform. In the simplest case, these quantized numbers represent the amplitude of the
input waveform at particular sampling intervals. In order to achieve the best approxima-
tion of an input signal,the highest possible sampling frequency and precision should be
used. However, increased accuracy comes at a cost of increased data storage require-
ments. For instance, one minute of monaural audio recorded in µ-law format at 8 KHz
requires nearly 0.5 megabytes of storage, while the standard Compact Disc audio format
(stereo 16-bit linear PCM data sampled at 44.1 KHz) requires approximately 10 megabytes
per minute.
Audio data may be represented in several different formats. An audio device’s current
audio data format can be determined by using the AUDIO_GETINFO ioctl described
below.
An audio data format is characterized in the audio driver by four parameters: Sample
Rate, Encoding, Precision, and Channels.Refer to the device-specific manual pages for a
list of the audio formats that each device supports. In addition to the formats that the
audio device supports directly, other formats provide higher data compression. Applica-
tions may convert audio data to and from these formats when recording or playing.
Sample Rate Sample rate is a number that represents the sampling frequency (in samples per second)
of the audio data.
Encodings An encoding parameter specifies the audio data representation. µ-law encoding (pro-
nounced mew-law) corresponds to CCITT G.711, and is the standard for voice data used
by telephone companies in the United States, Canada, and Japan. A-law encoding is also
part of G.711, and is the standard encoding for telephony elsewhere in the world. A-law
and µ-law audio data are sampled at a rate of 8000 samples per second with 12-bit preci-
sion, with the data compressed to 8-bit samples. The resulting audio data quality is
equivalent to that of standard analog telephoneservice.
Linear Pulse Code Modulation (PCM) is an uncompressed audio format in which sample
values are directly proportional to audio signal voltages. Each sample is a 2’s comple-
ment number that represents a positive or negative amplitude.
7I-24 modified 21 Mar 1995










