Overview of the Windows 8.1 Audio Stack
As a Program Manager in the Audio team, one of my goals is to improve visibility into the Windows audio stack. As a result, I’ve decided to start a series of posts that provide a high-level overview of the Windows 8.1 audio stack. As time progresses, my goal is to enhance this information and go into more depth.
From a high level perspective, the audio stack has 6 main components:
APIs
High-level APIs:
Supported APIs:
XAML MediaElement (C#, VB, C++)
HTML <audio> and <video> tags (used by websites and Windows Web Apps)
Media Foundation (C++)
Windows.Media.Capture (C#, VB, C++)
Deprecated APIs:
-
Recommended:
For Streaming:
For Device Enumeration:
Not recommended for Windows applications:
MMDevice API (replaced by Windows.Devices.Enumeration)
Audio Device Graph (audiodg.exe), which loads the Audio Engine (audioeng.dll)
Corresponds to Android’s AudioFlinger
Mixes and processes audio streams
Loads “Audio Processing Objects” (APOs), which are H/W-specific plugins that process the audio signal. Android has a similar element called “audio effects”
Audio Service (audiosrv.dll)
Used to setup and control audio streams
Implements Windows policies for background audio playback, ducking, etc
Audio Endpoint Builder (audioendpointbuilder.exe)
- Used to discover new audio devices and create S/W audio endpoints
Audio drivers
They follow the port-miniport model (corresponds to the Advanced Linux Sound Architecture - ALSA)
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
H/W
Audio codec
DSP (optionally)
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
The following diagram shows a graphical view of all the above items:
In the following blog posts I will dive deeper into each of the audio components that were described above.
Finally, I would like to thank Frank Yerrace and Kishore Kotteri from the Audio dev team for their contributions to this article.
Comments
Anonymous
February 16, 2015
Hi Ilias, Glad to finally meet the PM for the Audio Stack. You will not believe the lengths I have gone to to gather info about the audio stack. It is the least interesting to Developers obviously, while you can do a lot with it. I am starting an Audio project shortly, and I'll like to be able to communicate with you if you don't mind. I am very active on twitter under the handle @McAkins, please try to reach out to me there. I have tried to find you on social networks, I guess you don't do socials that much. :)Anonymous
February 16, 2015
Welcome back! It was a very nice surprise to see your name pop up in Feedly this morning. Your posts have always been interesting and informative, looking forward to your take on audio.Anonymous
February 17, 2015
Greetings, I'm wondering if anyone from the audio team would care to comment on what (if any) measures are being taken to enable low-latency audio in WinRT. By low latency, I mean down in the <10ms range like that provided by iOS.Anonymous
February 17, 2015
The comment has been removedAnonymous
March 27, 2015
i Have a ProbLem My Audio device is installed.!! No WorKing My Audio How to Fix?? One or more audio service isn't running Both the Windows Audio and the Windows Audio End Point Builder services must be running for audio to work correctly. Atleast one of these services isn't running. How to Fix Running??