Glenn Kasten | 963fd95 | 2013-04-18 17:26:23 -0700 | [diff] [blame^] | 1 | page.title=Audio Terminology |
| 2 | @jd:body |
| 3 | |
| 4 | <div id="qv-wrapper"> |
| 5 | <div id="qv"> |
| 6 | <h2>In this document</h2> |
| 7 | <ol id="auto-toc"> |
| 8 | </ol> |
| 9 | </div> |
| 10 | </div> |
| 11 | |
| 12 | <p> |
| 13 | This document provides a glossary of audio-related terminology, including |
| 14 | a list of widely used, generic terms and a list of terms that are specific |
| 15 | to Android. |
| 16 | </p> |
| 17 | |
| 18 | <h2 id="genericTerm">Generic Terms</h2> |
| 19 | |
| 20 | <p> |
| 21 | These are audio terms that are widely used, with their conventional meanings. |
| 22 | </p> |
| 23 | |
| 24 | <dl> |
| 25 | |
| 26 | <dt>bits per sample or bit depth</dt> |
| 27 | <dd> |
| 28 | Number of bits of information per sample. |
| 29 | </dd> |
| 30 | |
| 31 | <dt>channel</dt> |
| 32 | <dd> |
| 33 | A single stream of audio information, usually corresponding to one |
| 34 | location of recording or playback. |
| 35 | </dd> |
| 36 | |
| 37 | <dt>frame</dt> |
| 38 | <dd> |
| 39 | A set of samples, one per channel, at a point in time. |
| 40 | </dd> |
| 41 | |
| 42 | <dt>frames per buffer</dt> |
| 43 | <dd> |
| 44 | The number of frames handed from one module to the next at once; |
| 45 | for example the audio HAL interface uses this concept. |
| 46 | </dd> |
| 47 | |
| 48 | <dt>mono</dt> |
| 49 | <dd> |
| 50 | One channel. |
| 51 | </dd> |
| 52 | |
| 53 | <dt>sample</dt> |
| 54 | <dd> |
| 55 | A number representing the audio value for a single channel at a point in time. |
| 56 | </dd> |
| 57 | |
| 58 | <dt>sample rate or frame rate</dt> |
| 59 | <dd> |
| 60 | Number of frames per second; |
| 61 | note that "frame rate" is thus more accurate, |
| 62 | but "sample rate" is conventionally used to mean "frame rate". |
| 63 | </dd> |
| 64 | |
| 65 | <dt>stereo</dt> |
| 66 | <dd> |
| 67 | Two channels. |
| 68 | </dd> |
| 69 | |
| 70 | </dl> |
| 71 | |
| 72 | <h2 id="androidSpecificTerms">Android-Specific Terms</h2> |
| 73 | |
| 74 | <p> |
| 75 | These are terms that are specific to Android audio framework, or that |
| 76 | may have a special meaning within Android beyond their general meaning. |
| 77 | </p> |
| 78 | |
| 79 | <dl> |
| 80 | |
| 81 | <dt>ALSA</dt> |
| 82 | <dd> |
| 83 | Advanced Linux Sound Architecture. As the name suggests, it is an audio |
| 84 | framework primarily for Linux, but it has influenced other systems. |
| 85 | See Wikipedia article |
| 86 | <a class="external-link" href="http://en.wikipedia.org/wiki/Advanced_Linux_Sound_Architecture" target="_android">ALSA</a> |
| 87 | for the general definition. As used within Android, it refers primarily |
| 88 | to the kernel audio framework and drivers, not to the user-mode API. See |
| 89 | tinyalsa. |
| 90 | </dd> |
| 91 | |
| 92 | <dt>AudioFlinger</dt> |
| 93 | <dd> |
| 94 | The sound server implementation for Android. AudioFlinger |
| 95 | runs within the mediaserver process. See Wikipedia article |
| 96 | <a class="external-link" href="http://en.wikipedia.org/wiki/Sound_server" target="_android">Sound server</a> |
| 97 | for the generic definition. |
| 98 | </dd> |
| 99 | |
| 100 | <dt>AudioMixer</dt> |
| 101 | <dd> |
| 102 | The module within AudioFlinger responsible for |
| 103 | combining multiple tracks and applying attenuation |
| 104 | (volume) and certain effects. The Wikipedia article |
| 105 | <a class="external-link" href="http://en.wikipedia.org/wiki/Audio_mixing_(recorded_music)" target="_android">Audio mixing (recorded music)</a> |
| 106 | may be useful for understanding the generic |
| 107 | concept. But that article describes a mixer more as a hardware device |
| 108 | or a software application, rather than a software module within a system. |
| 109 | </dd> |
| 110 | |
| 111 | <dt>AudioRecord</dt> |
| 112 | <dd> |
| 113 | The primary low-level client API for receiving data from an audio |
| 114 | input device such as microphone. The data is usually in PCM format. |
| 115 | </dd> |
| 116 | |
| 117 | <dt>AudioResampler</dt> |
| 118 | <dd> |
| 119 | The module within AudioFlinger responsible for sample-rate conversion. See Wikipedia article |
| 120 | <a class="external-link" href="http://en.wikipedia.org/wiki/Resampling_(audio)" target="_android">Resampling (audio)</a> |
| 121 | for the generic definition. |
| 122 | </dd> |
| 123 | |
| 124 | <dt>audio policy</dt> |
| 125 | <dd> |
| 126 | Service responsible for all actions that require a policy decision |
| 127 | to be made first, such as opening a new I/O stream, re-routing after a |
| 128 | change and stream volume management. |
| 129 | </dd> |
| 130 | |
| 131 | <dt>AudioTrack</dt> |
| 132 | <dd> |
| 133 | The primary low-level client API for sending data to an audio output |
| 134 | device such as a speaker. The data is usually in PCM format. |
| 135 | </dd> |
| 136 | |
| 137 | <dt>client</dt> |
| 138 | <dd> |
| 139 | Usually same as application or app, but sometimes the "client" of |
| 140 | AudioFlinger is actually a thread running within the mediaserver system |
| 141 | process. An example of that is when playing media that is decoded by a |
| 142 | MediaPlayer object. |
| 143 | </dd> |
| 144 | |
| 145 | <dt>HAL</dt> |
| 146 | <dd> |
| 147 | Hardware Abstraction Layer. HAL is a generic term in Android. With |
| 148 | respect to audio, it is a layer between AudioFlinger and the kernel |
| 149 | device driver with a C API, which replaces the earlier C++ libaudio. |
| 150 | </dd> |
| 151 | |
| 152 | <dt>FastMixer</dt> |
| 153 | <dd> |
| 154 | A thread within AudioFlinger that services lower latency "fast tracks" |
| 155 | and drives the primary output device. |
| 156 | </dd> |
| 157 | |
| 158 | <dt>fast track</dt> |
| 159 | <dd> |
| 160 | An AudioTrack client with lower latency but fewer features, on some devices. |
| 161 | </dd> |
| 162 | |
| 163 | <dt>MediaPlayer</dt> |
| 164 | <dd> |
| 165 | A higher-level client API than AudioTrack, for playing either encoded |
| 166 | content, or content which includes multi-media audio and video tracks. |
| 167 | </dd> |
| 168 | |
| 169 | <dt>mediaserver</dt> |
| 170 | <dd> |
| 171 | An Android system process that contains a number of media-related |
| 172 | services, including AudioFlinger. |
| 173 | </dd> |
| 174 | |
| 175 | <dt>NBAIO</dt> |
| 176 | <dd> |
| 177 | An abstraction for "non-blocking" audio input/output ports used within |
| 178 | AudioFlinger. The name can be misleading, as some implementations of |
| 179 | the NBAIO API actually do support blocking. The key implementations of |
| 180 | NBAIO are for pipes of various kinds. |
| 181 | </dd> |
| 182 | |
| 183 | <dt>normal mixer</dt> |
| 184 | <dd> |
| 185 | A thread within AudioFlinger that services most full-featured |
| 186 | AudioTrack clients, and either directly drives an output device or feeds |
| 187 | it's sub-mix into FastMixer via a pipe. |
| 188 | </dd> |
| 189 | |
| 190 | <dt>OpenSL ES</dt> |
| 191 | <dd> |
| 192 | An audio API standard by The Khronos Group. Android versions since |
| 193 | API level 9 support a native audio API which is based on a subset of |
| 194 | OpenSL ES 1.0.1. |
| 195 | </dd> |
| 196 | |
| 197 | <dt>StateQueue</dt> |
| 198 | <dd> |
| 199 | A module within AudioFlinger responsible for synchronizing state |
| 200 | among threads. Whereas NBAIO is used to pass data, StateQueue is used |
| 201 | to pass control information. |
| 202 | </dd> |
| 203 | |
| 204 | <dt>tinyalsa</dt> |
| 205 | <dd> |
| 206 | A small user-mode API above ALSA kernel with BSD license, recommended |
| 207 | for use by HAL implementations. |
| 208 | </dd> |
| 209 | |
| 210 | <dt>track</dt> |
| 211 | <dd> |
| 212 | An audio stream, controlled by the AudioTrack API. |
| 213 | </dd> |
| 214 | |
| 215 | </dl> |
| 216 | |
| 217 | </p> |
| 218 | |