This article describes audio APIs and components in
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
which are now obsolete or deprecated.
Multimedia Extensions (MME)
The MME API or the Windows Multimedia API (also known as ''WinMM'') was the first universal and standardized Windows audio API. Wave sound events played in Windows (up to
Windows XP
Windows XP is a major release of Microsoft's Windows NT operating system. It was released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct upgrade to its predecessors, Windows 2000 for high-end and ...
) and MIDI I/O use MME. The devices listed in the ''Multimedia/Sounds and Audio'' control panel applet represent the MME API of the
sound card
A sound card (also known as an audio card) is an internal expansion card that provides input and output of audio signals to and from a computer under the control of computer programs. The term ''sound card'' is also applied to external audio ...
driver.
The Multimedia Extensions ( interfaces) were released in autumn 1991 to support
sound card
A sound card (also known as an audio card) is an internal expansion card that provides input and output of audio signals to and from a computer under the control of computer programs. The term ''sound card'' is also applied to external audio ...
s, as well as
CD-ROM drives, which were then becoming increasingly available. The Multimedia Extensions were released to
Original Equipment Manufacturers (OEMs), mainly CD-ROM drive and sound card manufacturers, and added basic
multimedia
Multimedia is a form of communication that uses a combination of different content forms such as text, audio, images, animations, or video into a single interactive presentation, in contrast to tradit ...
support for audio input and output and a
CD audio player application to Windows 3.0. The Multimedia Extensions' new features were not available in Windows 3.0 real mode, only in standard and 386 enhanced mode.
Windows 3.1x
Windows 3.1 is a major release of Microsoft Windows. It was released to manufacturing on April 6, 1992, as a successor to Windows 3.0.
Like its predecessors, the Windows 3.1 series ran as a shell on top of MS-DOS. Codenamed Janus, Windows 3 ...
would later incorporate many of its features. Microsoft developed the
Windows Sound System
Windows Sound System (WSS) is a sound card specification developed by Microsoft released at the end of 1992 for Windows 3.1. WSS featured support for up to 16-bit, 48 kHz digital sampling, beyond the capabilities of the popular contemporary S ...
sound card specification to complement these extensions.
In Windows 95/ME, MME lacks mixing multiple audio streams during playback and device sharing, so only one audio stream can be rendered at a time. But some sound card drivers can emulate more than one MME device (or support more than a single streaming client) so it could work with MME too. Starting from Windows 2000, MME supports playback device sharing (multi-client access) and can mix playback streams together. Starting from Windows XP, MME started to support recording device sharing.
In earlier Windows version, MME supported up to two channels of recording, 16-bit
audio bit depth and
sampling rate
In signal processing, sampling is the reduction of a continuous-time signal to a discrete-time signal. A common example is the conversion of a sound wave to a sequence of "samples".
A sample is a value of the signal at a point in time and/or s ...
s of up to 44100 samples per second with all the audio being mixed and sampled to 44100 samples per second. Starting from Windows 2000, MME supports up to 384000 samples per second, up to 8 channels, and up to 32 bits per sample.
Prior to Windows XP, the number of MME/WinMM device interfaces (, , midiIn, midiOut, mixer, and aux) is restricted to 10. This limit is raised from 10 to 32 in Windows XP.
Device name length in MME is restricted to 31 characters so long device names may appear only partially.
Issues
A fault in the MME emulation was introduced in Windows Vista: if sample rate conversion is needed, audible noise is sometimes introduced, such as when playing audio in a web browser that uses these APIs. This is because the internal resampler, which is no longer configurable, defaults to a fast integer-based
linear interpolation
In mathematics, linear interpolation is a method of curve fitting using linear polynomials to construct new data points within the range of a discrete set of known data points.
Linear interpolation between two known points
If the two known poi ...
(e.g. new sample is taken as an exact duplicate of the nearest sample instead of a varying portion of the two nearest samples), which was the lowest-quality conversion mode that could be set in previous versions of Windows. The resampler can be set to a high-quality mode vi
a hotfixfor Windows 7 and Windows Server 2008 only.
Audio Compression Manager
Audio Compression Manager (ACM) is a Windows
multimedia framework
A multimedia framework is a software framework that handles media on a computer and through a network. A good multimedia framework offers an intuitive API and a modular architecture to easily add support for new audio, video and container formats ...
that manages audio codecs (compressor/decompressors). ACM can also be considered an API specification. A codec must conform to the implicit ACM specification to work with Windows Multimedia. ACM files can be recognized by their filename extension
.acm
. ACM files also use
RIFF
A riff is a repeated chord progression or refrain in music (also known as an ostinato figure in classical music); it is a pattern, or melody, often played by the rhythm section instruments or solo instrument, that forms the basis or acc ...
-compatible filetypes such as
WAV
Waveform Audio File Format (WAVE, or WAV due to its filename extension; pronounced "wave") is an audio file format standard, developed by IBM and Microsoft, for storing an audio bitstream on PCs. It is the main format used on Microsoft Wind ...
or
AVI as a "wrapper" to store audio data encoded by any audio codec supported by ACM.
ACM is considered an outdated framework/API and Microsoft now encourages the use of at least
DirectShow
DirectShow (sometimes abbreviated as DS or DShow), codename Quartz, is a multimedia framework and API produced by Microsoft for software developers to perform various operations with media files or streams. It is the replacement for Microsoft's ea ...
. However, unlike ACM and the related
Video Compression Manager (VCM),
DirectShow
DirectShow (sometimes abbreviated as DS or DShow), codename Quartz, is a multimedia framework and API produced by Microsoft for software developers to perform various operations with media files or streams. It is the replacement for Microsoft's ea ...
provides no means to encode files for end-users but requires developers to build end-to-end graphs for encoding content. ACM also does not support
VBR audio streams; therefore newer codecs like
MPEG-4 AAC,
Ogg Vorbis
Vorbis is a free and open-source software project headed by the Xiph.Org Foundation. The project produces an audio coding format and software reference encoder/decoder (codec) for lossy audio compression. Vorbis is most commonly used in conjun ...
,
FLAC etc. cannot be supported through ACM if using variable bitrates. Though many sources state the contrary, Ogg Vorbis does work well with the ACM, e.g. when embedded in a RIFF-compatible file (such as a WAV or AVI file as mentioned earlier), provided the Ogg Vorbis stream is encoded at a constant bitrate.
Windows comes with a number of ACM codecs pre-installed. For a list of these codecs, consult .
ACM codecs are identified by a two-byte code (TwoCC) allocated by Microsoft.
DirectX Audio Libraries
*
DirectSound
DirectSound is a deprecated software component of the Microsoft DirectX library for the Windows operating system, superseded by XAudio2. It provides a low-latency interface to sound card drivers written for Windows 95 through Windows XP and can h ...
*
DirectMusic DirectMusic is a deprecated component of the Microsoft DirectX API that allows music and sound effects to be composed and played and provides flexible interactive control over the way they are played. Architecturally, DirectMusic is a high-level se ...
*
DirectX plugin In computer music and professional audio creation, a DirectX plugin is a software processing component that can be loaded as a plugin into ''host applications'' to allow real-time processing, audio effects, mixing audio or act as virtual synthesize ...
KMixer
KMixer is the ''Kernel Audio Mixer'' driver, a part of
WDM Audio in
Windows 98
Windows 98 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of Microsoft Windows operating systems. The second operating system in the 9x line, it is the successor to Windows 95, and was released to ...
to Windows XP which handles the mixing of multiple sound buffers into an output.
The tasks performed by KMixer.sys:
* Mixing multiple
PCM audio streams
* Format, bit-depth (also known as word-length) and sample-rate conversion
* Speaker configuration and channel mapping
In Windows 98, Windows 2000 and Windows Me, the KMixer maximum sample rate is 100 kHz. In Windows XP SP1 and later, KMixer audio sampling rate supports a maximum of 200 kHz.
Issues
The KMixer was designed to aid the applications by relieving them from the need to perform the mixing of audio streams, especially on low-end sound cards that didn't support multiple sound streams. However, it introduced some significant problems.
First, the
latency of KMixer is around 30 ms
and it cannot be reduced, because this component sits just right above the port class audio driver, so every audio stream, including those issued by
DirectSound
DirectSound is a deprecated software component of the Microsoft DirectX library for the Windows operating system, superseded by XAudio2. It provides a low-latency interface to sound card drivers written for Windows 95 through Windows XP and can h ...
(except in cases of
hardware mixing
Hardware acceleration is the use of computer hardware designed to perform specific functions more efficiently when compared to software running on a general-purpose central processing unit (CPU). Any transformation of data that can be calcula ...
) and WinMM, come through the kernel mixer.
[CakeWalk - Windows Pro Audio Roundtable]
/ref> If the audio hardware supports hardware mixing
Hardware acceleration is the use of computer hardware designed to perform specific functions more efficiently when compared to software running on a general-purpose central processing unit (CPU). Any transformation of data that can be calcula ...
(also known as hardware buffering or DirectSound hardware acceleration), DirectSound buffers directly to the rendering device. Thus, if DirectSound streams use hardware mixing
Hardware acceleration is the use of computer hardware designed to perform specific functions more efficiently when compared to software running on a general-purpose central processing unit (CPU). Any transformation of data that can be calcula ...
, KMixer is bypassed.
In earlier releases like the original release of Windows 98, KMixer tried to mix every data format that passed through it, even those it did not support. It caused various problems with media players that tried to pass AC3-encoded surround sound
Surround sound is a technique for enriching the fidelity and depth of sound reproduction by using multiple audio channels from speakers that surround the listener (surround channels). Its first application was in movie theaters. Prior to s ...
streams through S/PDIF
S/PDIF (Sony/Philips Digital Interface) is a type of digital audio interface used in consumer audio equipment to output audio over relatively short distances. The signal is transmitted over either a coaxial cable (using RCA or BNC connectors ...
output of the sound card to an external home cinema
Home cinema, also called home theaters or theater rooms, are home entertainment audio-visual systems that seek to reproduce a movie theater experience and mood using consumer electronics-grade video and audio equipment that is set up in a room ...
receiver. This was corrected with Windows Me
Windows Millennium Edition, or Windows Me (marketed with the pronunciation of the pronoun "me"), is an operating system developed by Microsoft as part of its Windows 9x family of Microsoft Windows operating systems. It is the successor to Windo ...
and provided as a hotfix for Windows 98 Second Edition and Windows 2000 SP2.Non-PCM Wave Formats and WDM Audio Drivers
/ref> Starting with Windows Me, the , DirectSound, and DirectShow APIs support non-PCM formats such as AC-3 or WMA over S/PDIF and non-PCM data goes directly to the class driver instead of going through KMixer.
A new kernel-mode API, ''Direct Kernel Streaming'', was also introduced in Windows 98 in order to bypass the KMixer and avoid problems associated with it.
KMixer does not alter the sound in the majority of cases. Also, there are many ways to bypass KMixer without the need of an extra plugin to access DirectSound, ASIO
''Asio'' is a genus of typical owls, or true owls, in the family Strigidae. This group has representatives over most of the planet, and the short-eared owl is one of the most widespread of all bird species, breeding in Europe, Asia, North and ...
, Direct Kernel Streaming or WASAPI
Windows Vista (formerly codenamed Windows "Longhorn") has many significant new features compared with previous Microsoft Windows versions, covering most aspects of the operating system.
In addition to the new user interface, security capabilities ...
. In Windows XP, for example, the usage of DirectSound
DirectSound is a deprecated software component of the Microsoft DirectX library for the Windows operating system, superseded by XAudio2. It provides a low-latency interface to sound card drivers written for Windows 95 through Windows XP and can h ...
(which Winamp uses by default) with a hardware mixer is a way to bypass KMixer.
KMixer was removed in Windows Vista
Windows Vista is a major release of the Windows NT operating system developed by Microsoft. It was the direct successor to Windows XP, which was released five years before, at the time being the longest time span between successive releases of ...
. It is replaced by the user-mode WASAPI (Windows Audio Session API) Audio Engine which is part of the revamped audio architecture. The Audio engine can operate in ''Shared mode'' or ''Exclusive mode''. In shared mode, mixing still takes place. Pre-mixed PCM audio is sent to the driver in a single format (in terms of sample rate, bit depth and channel count) that is configurable from the Sounds control panel. WASAPI ''Exclusive mode'' bypasses the mixer, as does using third-party audio APIs like OpenAL
OpenAL (Open Audio Library) is a cross-platform audio application programming interface (API). It is designed for efficient rendering of multichannel three-dimensional positional audio. Its API style and conventions deliberately resemble those ...
or ASIO
''Asio'' is a genus of typical owls, or true owls, in the family Strigidae. This group has representatives over most of the planet, and the short-eared owl is one of the most widespread of all bird species, breeding in Europe, Asia, North and ...
, which still have direct access to the hardware.
Kernel Streaming
Kernel Streaming or Direct Kernel streaming (Direct KS) is a technique that supports kernel-mode
In computer science, hierarchical protection domains, often called protection rings, are mechanisms to protect data and functionality from faults (by improving fault tolerance) and malicious behavior (by providing computer security).
Computer ...
processing of streamed data. It enables efficient real-time streaming for multimedia devices such as sound card
A sound card (also known as an audio card) is an internal expansion card that provides input and output of audio signals to and from a computer under the control of computer programs. The term ''sound card'' is also applied to external audio ...
s and TV tuner card
A TV tuner card is a kind of television tuner that allows television signals to be received by a computer. Most TV tuners also function as video capture cards, allowing them to record television programs onto a hard disk much like the digital v ...
s. Kernel streaming allows a device driver to create DirectShow
DirectShow (sometimes abbreviated as DS or DShow), codename Quartz, is a multimedia framework and API produced by Microsoft for software developers to perform various operations with media files or streams. It is the replacement for Microsoft's ea ...
-like filters and pins in kernel mode
In computer science, hierarchical protection domains, often called protection rings, are mechanisms to protect data and functionality from faults (by improving fault tolerance) and malicious behavior (by providing computer security).
Compute ...
, providing access to hardware, lower latency communication and still be used within a DirectShow filter graph
A filter graph is used in multimedia processing - for example, to capture video from a webcam. Filters take input, process it (or change the input), and then output the processed data. For example: a video codec takes raw uncompressed video and ...
.
Kernel streaming was introduced in Windows 98. When the sound card uses a custom driver for use with the system supplied port class driver ''PortCls.sys'' or implements a mini-driver for use with the streaming class driver, applications can bypass the KMixer completely and use the kernel streaming interfaces instead to directly interact with audio driver and reduce latency. Windows 98 includes the first kernel streaming driver, Stream.sys. In Windows XP, Microsoft introduced another improved kernel streaming class driver, AVStream.
Music players such as JRiver Media Center
JRiver Media Center is a multimedia application that allows the user to play and organize various types of media on a computer running Windows, macOS, or Linux operating systems.
JRiver Media Center is a "jukebox"-style media player, like iTu ...
, JPLAY, foobar2000, Audirvana Studio and Winamp
Winamp is a media player for Microsoft Windows originally developed by Justin Frankel and Dmitry Boldyrev by their company Nullsoft, which they later sold to AOL in 1999 for $80 million. It was then acquired by Radionomy in 2014. Sinc ...
support kernel
Kernel may refer to:
Computing
* Kernel (operating system), the central component of most operating systems
* Kernel (image processing), a matrix used for image convolution
* Compute kernel, in GPGPU programming
* Kernel method, in machine learn ...
streaming. Compared to the regular "WaveOut method" in Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
, kernel streaming requires less CPU time. This comes at the expense of bypassing the KMixer
This article describes audio APIs and components in Microsoft Windows which are now obsolete or deprecated.
Multimedia Extensions (MME)
The MME API or the Windows Multimedia API (also known as ''WinMM'') was the first universal and standardized ...
and Windows volume control. Kernel streaming also does not allow device sharing unless kernel-mode audio driver supports multiple clients.
Prior to Windows Vista, Kernel Streaming offered only a single client-to-driver communication protocol
A communication protocol is a system of rules that allows two or more entities of a communications system to transmit information via any kind of variation of a physical quantity. The protocol defines the rules, syntax, semantics and synchroniza ...
with buffer chain, as used in MME. Starting from Vista, new Real-Time Audio (RT Audio, not to be confused with the RTAudio codec) protocol is introduced, based on a single circular buffer
In computer science, a circular buffer, circular queue, cyclic buffer or ring buffer is a data structure that uses a single, fixed-size buffer as if it were connected end-to-end. This structure lends itself easily to buffering data streams. Ther ...
. RT Audio protocol is implemented b
WaveRT port driver
in portcls.sys. In Vista and later versions, Audio Subsystem supports both protocols so it can interact with both legacy and new audio drivers. But most audio applications that use KS support only a single protocol (legacy in most cases) so they can communicate only with a single type of audio drivers.
See also
* WDM audio in Windows 98
*Windows Vista audio architecture
Windows Vista (formerly codenamed Windows "Longhorn") has many significant new features compared with previous Microsoft Windows versions, covering most aspects of the operating system.
In addition to the new user interface, security capabilities, ...
* DirectX
*Universal Audio Architecture
Universal Audio Architecture (UAA) is an initiative unveiled in 2002 by Microsoft to standardize the hardware and class driver architecture for audio devices in modern Microsoft Windows operating systems. Three classes of audio devices are support ...
(UAA)
References
External links
Information on Kmixer at Microsoft website
KMixer Latency at Microsoft website
* ttp://www.foobar2000.org/components/view/foo_out_ks foobar2000 plug-in— Kernel Streaming plug-in for foobar2000
Winamp Kernel Streaming Plugin
h1>
Broken links
Kernel Streaming components
MME API (WinMM)
Kernel Streaming components
(documented for re-implementation in ReactOS)
{{Microsoft APIs
Music software plugin architectures
Windows audio