Windows 音频体系结构

  • A+

本主题提供了 Windows 10/11 音频体系结构的简短摘要。

Windows 10/11 音频堆栈图

此图汇总了 Windows 10/11 音频堆栈的主要元素。

Windows 音频体系结构

API

顶层 API

顶层 API 用于应用程序开发。 这些 API 目前正在使用且受支持。

这些旧 API 将被弃用。

低级别 API

对于音频流式处理,建议使用这些较低级别的 API。

建议使用此较低级别的 API 进行枚举。

对于 Windows 应用程序,不建议使用这些 API。

音频引擎

音频引擎包含两个相关组件,即音频设备图 (audiodg.exe),用于加载音频引擎 (audioeng.dll)。

音频引擎:

  • 混合和处理音频流。 有关音频引擎如何使用缓冲区传输音频的详细信息,请参阅了解 WaveRT 端口驱动程序
  • 加载音频处理对象 (APO),这是处理音频信号的 H/W 特定插件。 有关 APO 的详细信息,请参阅 Windows 音频处理对象

音频服务 (audiosrv.dll)

音频服务:

  • 用于设置和控制音频流。
  • 为后台音频播放、闪避等实现 Windows 策略。

音频终结点生成器 (audioendpointbuilder.exe)

音频终结点生成器 (audioendpointbuilder.exe):

音频驱动程序

音频驱动程序:

  • 遵循端口-微型端口模型。 有关详细信息,请参阅 WDM 音频术语 和开发 WaveRT 微型端口驱动程序
  • 允许音频堆栈从多个音频设备呈现和捕获音频,包括:集成扬声器和麦克风、耳机/耳机、USB 设备、蓝牙设备、HDMI 等。
  • 端口-微型端口模型与高级 Linux 声音体系结构 ALSA 对应
  • 有关示例驱动程序代码的信息,请参阅示例音频驱动程序

硬件

任何给定设备上存在的音频硬件各不相同,但可能包括:

  • 音频编解码器
  • DSP (可选)
  • 集成扬声器、麦克风等
  • 外部设备:USB 音频设备、蓝牙音频设备、HDMI 音频等。
  • 除了 APO,还可以在 H/W(例如编解码器或 DSP)中实现信号处理。

 

This topic provided a high level summary of the Windows 10/11 audio architecture.

Windows 10/11 Audio Stack Diagram

This diagram provides a summary of the major elements of the Windows 10/11 audio stack.

Windows 音频体系结构

APIs

Top level APIs

The top level APIs are used for application development. These APIs are in currently in use and supported.

These older APIs are deprecated.

Low level APIs

These lower level APIs are recommended for audio streaming.

  • WASAPI (High performance, but more complicated)
  • IXAudio2 (Typically used for games)
  • MIDI

This lower level API is recommended for enumeration.

These APIs are not recommended for Windows applications.

Audio Engine

The audio engine consists of two related components, the Audio Device Graph (audiodg.exe), which loads the Audio Engine (audioeng.dll).

The audio engine:

Audio Service (audiosrv.dll)

The audio service:

  • Is used to setup and control audio streams.
  • Implements Windows policies for background audio playback, ducking, etc.

Audio Endpoint Builder (audioendpointbuilder.exe)

The Audio Endpoint Builder (audioendpointbuilder.exe):

  • Is used to discover new audio devices and create software audio endpoints. For more information about the algorithm that is used, see Audio Endpoint Builder Algorithm.

Audio Drivers

Audio drivers:

  • Follow the port-miniport model. For more information, see WDM Audio Terminology and Developing a WaveRT Miniport Driver.
  • Allow the audio stack to render and capture audio from several audio devices, including: integrated speakers and microphones, headsets/headphones, USB devices, Bluetooth devices, HDMI, etc.
  • The port-minport model corresponds to the Advanced Linux Sound Architecture ALSA
  • For information on sample driver code, see Sample Audio Drivers.

Hardware

The audio hardware that is present on any given device varies but can include:

  • Audio Codec
  • DSP (optional)
  • Integrated speakers, microphone, etc
  • External devices: USB audio devices, Bluetooth audio devices, HDMI audio, etc.
  • Signal processing can also be implemented in the H/W (e.g. the codec or the DSP), instead of or in addition to the APOs.

小众声学

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: