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