📄 audio_intro.3
字号:
.\" @(#)audio_intro.3 1.1 92/07/30 SMI.ds Dc 7/30/92.TH AUDIO_INTRO 3 "\*(Dc" "" "Audio Library".SH NAMEaudio_intro, libaudio.a\- audio library functions.SH DISCLAIMER.LPThe manual pages, header files, and object library associated with.B /usr/demo/SOUND/libaudio.aare furnished on an AS IS basis as a preliminary interface to severaluseful audio data-processing capabilities. A future release of theoperating system may redefine the syntax or semantics of some of thefunctions described herein..SH SYNOPSIS.nf.B #include <multimedia/libaudio.h>.fi.SH DESCRIPTION.B libaudio.aprovides a preliminary interface to many of the common operationsnecessary to access and manipulate audio files and devices.By embodying the specifics of file formats and device.B ioctlcommands in library routines, programs may be insulated, in part, fromfuture changes to the interface and data storage formats..SH File Header.LPAudio files contain a header that has a magic number (identifyingthe file as an audio file) and fields that describethe encoding format used to store the audio data.Immediately following the header is a variable-length information fieldin which, for instance,.SM ASCIIannotation may be stored..LPThe format of the audio file header is compatible with a subset of theNeXT\(tmsound file header. Sun has adopted NeXT's sound file header ideasto facilitate the transparent sharing of audio files in a networkedenvironment.[The NeXT Nested and Indirect sound file types are not currently supported.].LPIn order that audio files may be successfully shared amongst multiplemachine architectures, the header and data fields are written using.I big-endianbyte-ordering. Though this means that byte-swapping may be necessaryto read and write some data encodings on.I little-endianmachines such as the Sun386i, this overhead is largely overwhelmedby all other signal manipulation operations. The benefits of transparentfile access far outweigh the costs..LPRoutines to support the reading and writing of audio file headersare documented in the.BR audio_filehdr (3)manual page. These routines convert between the file header format used forfile interchange and the in-core audio header format used by most audioapplications..SH Audio Header.LPAudio data is described by an.B Audio_hdrstructure that is similar, but.I notidentical, to the audio file header. The audio header structure isdescribed in the.BR audio_hdr (3)manual page.The.BR audio_misc (3)manual page describes routines that perform some simple transformationsbased on the contents of the audio header structure..SH Audio Device Control.LPThe.BR audio (4)manual page describes the direct interface to the audio i/o device(\fB/dev/audio\fP) and the audio control pseudo-device (\fB/dev/audioctl\fP).For the most part, however, programs may use the routines documented in the.BR audio_device (3)manual page to access and control the device..SH Audio Data Conversions.LPThe SPARCstation audio device operates on data that has been encodedin \(*m-law format, a quasi-logarithmic compression.Since most signal-processing algorithms perform arithmetic on linearlyencoded data, it is convenient to be able to convert to and from alinear \s-1PCM\s0 representation. The.BR audio_ulaw2linear (3)manual page describes macros that will perform these transformations..SH FUTURE DIRECTIONS.LPAlthough access to audio file headers are partly concealed in the file headerroutines, the data formats themselves are not properly hidden.Routines to demultiplex interleaved audio channels, and to transparentlyconvert between data encodings, should be provided..LPAccess to many of the audio device status and control fields has beenconcealed in the audio device routines. As audio server technology emerges,these interfaces may remain stable while the underlying implementation changes.However, access to the data streams of the audio device should be similarlyconcealed..SH SEE ALSO.BR audio_convert (3),.BR audio_filehdr (3),.BR audio_hdr (3),.BR audio_misc (3),.BR audio_ulaw2linear (3),.BR audio (4)..SH NOTESNeXT is a trademark of NeXT, Inc.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -