blob: 23592d438f5fcd75a6eaad163dd2053987617c0e [file] [log] [blame]
Glenn Kasten963fd952013-04-18 17:26:23 -07001page.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>
13This document provides a glossary of audio-related terminology, including
14a list of widely used, generic terms and a list of terms that are specific
15to Android.
16</p>
17
18<h2 id="genericTerm">Generic Terms</h2>
19
20<p>
21These are audio terms that are widely used, with their conventional meanings.
22</p>
23
24<dl>
25
Glenn Kasten298f3822013-06-12 17:17:36 -070026<dt>acoustics</dt>
27<dd>
28The study of the mechanical properties of sound, for example how the
29physical placement of transducers such as speakers and microphones on
30a device affects perceived audio quality.
31</dd>
32
Glenn Kasten963fd952013-04-18 17:26:23 -070033<dt>bits per sample or bit depth</dt>
34<dd>
35Number of bits of information per sample.
36</dd>
37
38<dt>channel</dt>
39<dd>
40A single stream of audio information, usually corresponding to one
41location of recording or playback.
42</dd>
43
44<dt>frame</dt>
45<dd>
46A set of samples, one per channel, at a point in time.
47</dd>
48
49<dt>frames per buffer</dt>
50<dd>
51The number of frames handed from one module to the next at once;
52for example the audio HAL interface uses this concept.
53</dd>
54
Glenn Kasten298f3822013-06-12 17:17:36 -070055<dt>Hz</dt>
56<dd>
57The units for sample rate or frame rate.
58</dd>
59
60<dt>latency</dt>
61<dd>
62Time delay as a signal passes through a system.
63</dd>
64
Glenn Kasten963fd952013-04-18 17:26:23 -070065<dt>mono</dt>
66<dd>
67One channel.
68</dd>
69
70<dt>sample</dt>
71<dd>
72A number representing the audio value for a single channel at a point in time.
73</dd>
74
75<dt>sample rate or frame rate</dt>
76<dd>
77Number of frames per second;
78note that "frame rate" is thus more accurate,
Clay Murphyc28f2372013-09-25 16:13:40 -070079but "sample rate" is conventionally used to mean "frame rate."
Glenn Kasten963fd952013-04-18 17:26:23 -070080</dd>
81
82<dt>stereo</dt>
83<dd>
84Two channels.
85</dd>
86
87</dl>
88
89<h2 id="androidSpecificTerms">Android-Specific Terms</h2>
90
91<p>
Clay Murphyc28f2372013-09-25 16:13:40 -070092These are terms specific to the Android audio framework, or that
Glenn Kasten963fd952013-04-18 17:26:23 -070093may have a special meaning within Android beyond their general meaning.
94</p>
95
96<dl>
97
98<dt>ALSA</dt>
99<dd>
100Advanced Linux Sound Architecture. As the name suggests, it is an audio
101framework primarily for Linux, but it has influenced other systems.
102See Wikipedia article
103<a class="external-link" href="http://en.wikipedia.org/wiki/Advanced_Linux_Sound_Architecture" target="_android">ALSA</a>
104for the general definition. As used within Android, it refers primarily
105to the kernel audio framework and drivers, not to the user-mode API. See
106tinyalsa.
107</dd>
108
Glenn Kasten298f3822013-06-12 17:17:36 -0700109<dt>AudioEffect</dt>
110<dd>
111An API and implementation framework for output (post-processing) effects
112and input (pre-processing) effects. The API is defined at
113<a class="external-link" href="http://developer.android.com/reference/android/media/audiofx/AudioEffect.html" target="_android">android.media.audiofx.AudioEffect</a>
114</dd>
115
Glenn Kasten963fd952013-04-18 17:26:23 -0700116<dt>AudioFlinger</dt>
117<dd>
118The sound server implementation for Android. AudioFlinger
119runs within the mediaserver process. See Wikipedia article
120<a class="external-link" href="http://en.wikipedia.org/wiki/Sound_server" target="_android">Sound server</a>
121for the generic definition.
122</dd>
123
124<dt>AudioMixer</dt>
125<dd>
126The module within AudioFlinger responsible for
127combining multiple tracks and applying attenuation
128(volume) and certain effects. The Wikipedia article
129<a class="external-link" href="http://en.wikipedia.org/wiki/Audio_mixing_(recorded_music)" target="_android">Audio mixing (recorded music)</a>
130may be useful for understanding the generic
131concept. But that article describes a mixer more as a hardware device
132or a software application, rather than a software module within a system.
133</dd>
134
135<dt>AudioRecord</dt>
136<dd>
137The primary low-level client API for receiving data from an audio
Clay Murphyc28f2372013-09-25 16:13:40 -0700138input device such as microphone. The data is usually in pulse-code modulation
139(PCM) format.
Glenn Kasten963fd952013-04-18 17:26:23 -0700140</dd>
141
142<dt>AudioResampler</dt>
143<dd>
144The module within AudioFlinger responsible for sample-rate conversion. See Wikipedia article
145<a class="external-link" href="http://en.wikipedia.org/wiki/Resampling_(audio)" target="_android">Resampling (audio)</a>
146for the generic definition.
147</dd>
148
149<dt>audio policy</dt>
150<dd>
151Service responsible for all actions that require a policy decision
152to be made first, such as opening a new I/O stream, re-routing after a
153change and stream volume management.
154</dd>
155
156<dt>AudioTrack</dt>
157<dd>
158The primary low-level client API for sending data to an audio output
159device such as a speaker. The data is usually in PCM format.
160</dd>
161
162<dt>client</dt>
163<dd>
164Usually same as application or app, but sometimes the "client" of
165AudioFlinger is actually a thread running within the mediaserver system
166process. An example of that is when playing media that is decoded by a
167MediaPlayer object.
168</dd>
169
170<dt>HAL</dt>
171<dd>
172Hardware Abstraction Layer. HAL is a generic term in Android. With
173respect to audio, it is a layer between AudioFlinger and the kernel
174device driver with a C API, which replaces the earlier C++ libaudio.
175</dd>
176
177<dt>FastMixer</dt>
178<dd>
179A thread within AudioFlinger that services lower latency "fast tracks"
180and drives the primary output device.
181</dd>
182
183<dt>fast track</dt>
184<dd>
185An AudioTrack client with lower latency but fewer features, on some devices.
186</dd>
187
188<dt>MediaPlayer</dt>
189<dd>
190A higher-level client API than AudioTrack, for playing either encoded
Clay Murphyc28f2372013-09-25 16:13:40 -0700191content, or content which includes multimedia audio and video tracks.
Glenn Kasten963fd952013-04-18 17:26:23 -0700192</dd>
193
Glenn Kasten298f3822013-06-12 17:17:36 -0700194<dt>media.log</dt>
195<dd>
196An AudioFlinger debugging feature, available in custom builds only,
197for logging audio events to a circular buffer where they can then be
198dumped retroactively when needed.
199</dd>
200
Glenn Kasten963fd952013-04-18 17:26:23 -0700201<dt>mediaserver</dt>
202<dd>
203An Android system process that contains a number of media-related
204services, including AudioFlinger.
205</dd>
206
207<dt>NBAIO</dt>
208<dd>
209An abstraction for "non-blocking" audio input/output ports used within
210AudioFlinger. The name can be misleading, as some implementations of
211the NBAIO API actually do support blocking. The key implementations of
212NBAIO are for pipes of various kinds.
213</dd>
214
215<dt>normal mixer</dt>
216<dd>
217A thread within AudioFlinger that services most full-featured
218AudioTrack clients, and either directly drives an output device or feeds
Clay Murphyc28f2372013-09-25 16:13:40 -0700219its sub-mix into FastMixer via a pipe.
Glenn Kasten963fd952013-04-18 17:26:23 -0700220</dd>
221
222<dt>OpenSL ES</dt>
223<dd>
224An audio API standard by The Khronos Group. Android versions since
225API level 9 support a native audio API which is based on a subset of
226OpenSL ES 1.0.1.
227</dd>
228
229<dt>StateQueue</dt>
230<dd>
231A module within AudioFlinger responsible for synchronizing state
232among threads. Whereas NBAIO is used to pass data, StateQueue is used
233to pass control information.
234</dd>
235
Glenn Kasten298f3822013-06-12 17:17:36 -0700236<dt>tee sink</dt>
237<dd>
238An AudioFlinger debugging feature, available in custom builds only,
239for retaining a short fragment of recent audio for later analysis.
240This permits comparison between what was actually played or recorded
241vs. what was expected.
242</dd>
243
Glenn Kasten963fd952013-04-18 17:26:23 -0700244<dt>tinyalsa</dt>
245<dd>
246A small user-mode API above ALSA kernel with BSD license, recommended
Clay Murphyc28f2372013-09-25 16:13:40 -0700247for use in HAL implementations.
Glenn Kasten963fd952013-04-18 17:26:23 -0700248</dd>
249
250<dt>track</dt>
251<dd>
252An audio stream, controlled by the AudioTrack API.
253</dd>
254
255</dl>
256
257</p>
258