安卓音频audio框架系统学习必知必会的一些术语

Android 音频专用术语

在这里插入图片描述

Android 专用术语包括仅在 Android 音频框架中使用的术语,以及在 Android 中具有特殊意义的通用术语。

ALSA

高级 Linux 声音体系。Linux 的音频框架,对其他系统也有影响。如需了解通用定义,请参阅 ALSA。 在 Android 中,ALSA 指的是内核音频框架和驱动程序,而不是用户模式类。另请参阅 TinyALSA。

音频设备

以 HAL 实现为基础的音频 I/O 端点。

AudioEffect, AudioEffect

实现框架和类,用于输出(处理后)音效与输入(处理前)音效。该类在 android.media.audiofx.AudioEffect 中定义。

AudioFlinger

Android 声音服务器实现。AudioFlinger 在 mediaserver 进程中运行。如需了解通用定义,请参阅声音服务器。

音频焦点

跨多个独立应用管理音频交互的 API 集。如需了解详情,请参阅处理音频输出变化以及 android.media.AudioManager 的焦点相关方法和常量。

AudioMixer

AudioFlinger 中的模块,负责合并多个音轨以及应用衰减(音量)和音效。如需了解通用定义,请参阅混音(录制的音乐)(将混合器当做一个硬件设备或软件应用而非系统中的软件模块)。

音频政策

负责所有需要先做出政策决策的操作的服务,例如打开新的 I/O 音频流、更改后重新路由,以及音频流音量管理。

AudioRecord

用于从麦克风等音频输入设备接收数据的主要低级别客户端类。相应数据通常为 PCM 格式。该类在 android.media.AudioRecord 中定义。

AudioResampler

AudioFlinger 中的模块,负责采样率转换。
音频来源, AudioSource
一个常量枚举,用于为捕获音频输入指明目标使用情形。该类在 android.media.MediaRecorder.AudioSource 中定义。对于 21 级及以上级别的 API,建议使用音频属性。

AudioTrack

用于向音响设备等音频输出设备发送数据的主要低级别客户端类。相应数据通常为 PCM 格式。该类在 android.media.AudioTrack 中定义。

audio_utils

提供 PCM 格式转换、WAV 文件 I/O 以及非阻塞 FIFO 等功能的音频实用程序库,很大程度上独立于 Android 平台。

客户端

通常指一个应用或应用客户端。不过,AudioFlinger 客户端可以是一个在 mediaserver 系统进程中运行的线程,例如,播放由 MediaPlayer 对象解码的媒体内容时。

HAL

硬件抽象层。HAL 在 Android 中是通用术语;涉及音频时,它是介于 AudioFlinger 和内核设备驱动程序之间的一个层,具有一个 C 语言编写的 API(取代了 C++ libaudio)。

FastCapture

AudioFlinger 中的线程。经配置,它会向延迟时间较短的快速音轨发送音频数据,并驱动输入设备的运行,以缩短延迟时间。

FastMixer

AudioFlinger 中的线程。经配置,它会从延迟时间较短的快速音轨接收并混合音频数据,同时驱动主要输出设备的运行,以缩短延迟时间。

fast track

部分设备和路由中延迟时间较短但功能较少的 AudioTrack 或 AudioRecord 客户端。

MediaPlayer

比 AudioTrack 级别更高的客户端类。用于播放已编码的内容或包含多媒体音频和视频轨道的内容。 该类在 android.media.MediaPlayer 中定义。

media.log

仅在定制 build 中提供的 AudioFlinger 调试功能。用于将音频事件记录到环形缓冲区,然后根据需要,从中对这些事件进行回溯式转储。

mediaserver

Android 系统进程,包含 AudioFlinger 等与媒体相关的服务。

NBAIO

非阻塞音频输入和输出。AudioFlinger 端口的抽象表示。此术语有一定的歧义,因为部分 NBAIO API 实现用例支持阻塞。NBAIO 的主要实现用例适用于不同的管道类型。

常规混音器

AudioFlinger 中的线程,可用于大部分功能完善的 AudioTrack 客户端。它能直接驱动输出设备的运行,或使用管道将其子混音输入 FastMixer。

OpenSL ES

Khronos 集团推行的音频 API 标准。API 级别为 9 及更高级别的 Android 版本都支持原生音频 API(基于 OpenSL ES 1.0.1 的子集)。

pro audio

功能标志 android.hardware.audio.pro 的缩写。 相关要求请参见 Android CDD 的 5.10 专业音频部分。 功能 android.hardware.audio.pro 中的“pro”是指可预测的实时性能级别,而非目标用户。
实时(名词)、实时(形容词)
实时计算系统可保证在指定的时间段内对相关事件做出响应。就满足专业音频部分中所述 android.hardware.audio.pro 功能的要求而言,设备实现方案支持实时计算是一个必要但非充分的前提条件。

除音频领域之外,实时性能还在其他领域得到了广泛应用,例如游戏、图形、相机、视频、传感器处理、虚拟实境 (VR) 和增强现实 (AR)。

静音模式

可由用户设置的功能,用于将手机振铃器和通知设为静音而不影响媒体内容播放(音乐、视频和游戏)或闹钟。

SoundPool

比 AudioTrack 级别更高的客户端类。可播放通过采样得到的音频片段。适用于触发界面反馈和游戏音效等。该类在 android.media.SoundPool 中定义。

Stagefright

媒体播放引擎。请参阅媒体。

StateQueue

AudioFlinger 中的模块,负责同步线程之间的状态。NBAIO 用于传递数据,而 StateQueue 用于传递控制信息。

策略

具有类似行为的音频流类型构成的组。用于音频政策服务。

音频流类型

表示音频输出使用情形的枚举。音频政策的实现会根据音频流类型以及其他参数来确定音量和路由决策。如需查看流类型列表,请参阅 android.media.AudioManager。

tee sink

请参阅音频调试。

TinyALSA, tinyalsa

TinyALSA 是 ALSA 内核之上采用 BSD 许可的小型用户模式 API。tinyalsa 是 TinyALSA 库中软件包的名称。建议将该库用于 HAL 实现。

ToneGenerator

比 AudioTrack 级别更高的客户端类。用于播放双音多频 (DTMF) 信号。如需了解详情,请参阅双音多频信号以及 android.media.ToneGenerator 中的类定义。

音轨

音频串流。由 AudioTrack 或 AudioRecord 类控制。

音量衰减曲线

对于给定输出,音量衰减曲线指从通用音量指数到特定衰减因数的设备专属映射。

音量指数

表示某个音频流的目标相对音量的整数(没有单位)。android.media.AudioManager 的音量相关 API 元素在运行时采用音量指数(而非绝对的衰减因数)。

对应原版英文:

Android-specific terms

Android-specific terms include terms used only in the Android audio framework and generic terms that have special meaning within Android.

ALSA

Advanced Linux Sound Architecture. An audio framework for Linux that has also influenced other systems. For a generic definition, refer to ALSA. In Android, ALSA refers to the kernel audio framework and drivers and not to the user-mode class. See also TinyALSA.

audio device

Audio I/O endpoint backed by a HAL implementation.

AudioEffect, AudioEffect

Implementation framework and class for output (postprocessing) effects and input (preprocessing) effects. The class is defined at android.media.audiofx.AudioEffect.

AudioFlinger

Android sound server implementation. AudioFlinger runs within the mediaserver process. For a generic definition, refer to Sound server.

audio focus

Set of APIs for managing audio interactions across multiple independent apps. For details, see Handling changes in audio output and the focus-related methods and constants of android.media.AudioManager.

AudioMixer

Module in AudioFlinger responsible for combining multiple tracks and applying attenuation (volume) and effects. For a generic definition, refer to Audio mixing (recorded music) (discusses a mixer as a hardware device or software app, rather than a software module within a system).
audio policy
Service responsible for all actions that require a policy decision to be made first, such as opening a new I/O stream, rerouting after a change, and stream volume management.

AudioRecord

Primary low-level client class for receiving data from an audio input device such as a microphone. The data is usually PCM format. The class is defined at android.media.AudioRecord.

AudioResampler

Module in AudioFlinger responsible for sample rate conversion.

audio source, AudioSource

An enumeration of constants that indicates the desired use case for capturing audio input. The class is defined at android.media.MediaRecorder.AudioSource. As of API level 21 and above, audio attributes are preferred.

AudioTrack

Primary low-level client class for sending data to an audio output device such as a speaker. The data is usually in PCM format. The class is defined at android.media.AudioTrack.

audio_utils

Audio utility library for features such as PCM format conversion, WAV file I/O, and nonblocking FIFO, which is largely independent of the Android platform.

client

Usually an app or app client. However, an AudioFlinger client can be a thread running within the mediaserver system process, such as when playing media decoded by a MediaPlayer object.

HAL

Hardware abstraction layer. HAL is a generic term in Android; in audio, it’s a layer between AudioFlinger and the kernel device driver with a C API (which replaces the C++ libaudio).

FastCapture

Thread within AudioFlinger that sends audio data to lower-latency fast tracks and drives the input device when configured for reduced latency.

FastMixer

Thread within AudioFlinger that receives and mixes audio data from lower latency fast tracks and drives the primary output device when configured for reduced latency.

fast track

AudioTrack or AudioRecord client with lower latency but fewer features on some devices and routes.

MediaPlayer

Higher-level client class than AudioTrack. Plays encoded content or content that includes multimedia audio and video tracks. The class is defined at android.media.MediaPlayer.

media.log

AudioFlinger debugging feature available in custom builds only. Used for logging audio events to a circular buffer where the events can then be retroactively dumped when needed.

mediaserver

Android system process that contains media-related services, including AudioFlinger.

NBAIO

Nonblocking audio input and output. Abstraction for AudioFlinger ports. The term can be misleading as some implementations of the NBAIO API support blocking. The key implementations of NBAIO are for different types of pipes.

normal mixer

Thread within AudioFlinger that services most full-featured AudioTrack clients. Directly drives an output device or feeds its sub-mix into FastMixer using a pipe.

OpenSL ES

Audio API standard by The Khronos Group. Android versions with API level 9 and higher support a native audio API that is based on a subset of OpenSL ES 1.0.1.

pro audio

Abbreviation for the feature flag android.hardware.audio.pro. The requirements are documented in section 5.10 Professional Audio of the Android CDD. The pro in feature android.hardware.audio.pro refers to the level of predictable real-time performance, not the intended user.
real time (noun), real-time (adjective)
Real-time computing systems guarantee a response to relevant events within a required time limit. Device implementation support for real-time computing is a necessary, but insufficient, prerequisite for meeting the requirements of the android.hardware.audio.pro feature described in pro audio.

Real-time performance also has benefits in other fields beyond audio, such as gaming, graphics, camera, video, sensor processing, virtual reality (VR), and augmented reality (AR).

silent mode

User-settable feature to mute the phone ringer and notifications without affecting media playback (music, videos, games) or alarms.

SoundPool

Higher-level client class than AudioTrack. Plays sampled audio clips. Useful for triggering things such as UI feedback and game sounds. The class is defined at android.media.SoundPool.

Stagefright

A media playback engine. See Media.
StateQueue
Module within AudioFlinger responsible for synchronizing state among threads. Whereas NBAIO is used to pass data, StateQueue is used to pass control information.

strategy

Group of stream types with similar behavior. Used by the audio policy service.

stream type

Enumeration that expresses a use case for audio output. The audio policy implementation uses the stream type, along with other parameters, to determine volume and routing decisions. For a list of stream types, see android.media.AudioManager.

tee sink

See Audio debugging.

TinyALSA, tinyalsa

TinyALSA is a small user-mode API above ALSA kernel with BSD license. tinyalsa is the name of a package in the TinyALSA library. The library is recommended for HAL implementations.

ToneGenerator

Higher-level client class than AudioTrack. Plays dual-tone multi-frequency (DTMF) signals. For details, refer to Dual-tone multi-frequency signaling and the class definition at android.media.ToneGenerator.

track

Audio stream. Controlled by the AudioTrack or AudioRecord class.

volume attenuation curve

Device-specific mapping from a generic volume index to a specific attenuation factor for a given output.

volume index

Unitless integer that expresses the desired relative volume of a stream. The volume-related API elements of android.media.AudioManager operate in volume indexes rather than absolute attenuation factors.

原文地址:
https://source.android.google.cn/docs/core/audio/terminology#androidSpecificTerms

更多framework实战干货,请关注下面:“千里马学框架”

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

千里马学框架

帮助你了,就请我喝杯咖啡

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值