DvmAmap
Map Types Description
An AudioMap represents lookup tables that can be applied to audio data. An AudioMap has 3 components, the resolution of the source audio, the resolution of the destination audio, and a table of values. Resolutions is specified in bits per sample in the audio data, and can be either 8 or 16. The table of values is an array which maps each of the value in the domain audio to its value.
The interpretation of various source and destination resolution is illustrated in the following table.
source resolution number of elements in the table destination resolution types of values stored in table 8 256 (range: 0-255) 8 8-bit unsigned integer (range: 0-255) 8 256 (range: 0-255) 16 16-bit signed integer (range: -32768 to 32767) 16 65536 (range: -32768 to 32767) 8 8-bit unsigned integer (range: 0-255) 16 65536 (range: -32768 to 32767) 16 16-bit signed integer (range: -32768 to 32767) For example, an AudioMap which maps 16-bit PCM audio to 8-bit mu-law compressed audio would have source resolution 16 and destination resolution 8. When using AudioMaps, the commands must match the resolution. For example, the functions that operate on the AudioMap from the example above are named AudioMap16to8*.
Overview of Operations
- AudioMaps can be created and freed (C, Tcl).
- The lookup table can be initialized using a variety of functions. Dali provides functions to initialize AudioMaps that perform functions such as μ-law or A-law to PCM conversion (C, Tcl) big-endian/little-endian byte swapping (C, Tcl), and volume control (C, Tcl).
- An important operation is the one that applies the lookup table to an AudioBuffer (C, Tcl).
- AudioMaps can be composed (C, Tcl) or duplicated.
Tcl specification
C API specification
Needs DvmBasic
Using audio maps to converting mu-law WAV file to PCM WAV file. [ tcl | C ] Using audio maps to double the volume of one single channel [ tcl | C ]
Last Updated :
Copyright © 1997-1998 by Cornell University. See the file license.txt for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.