Windows legacy audio components
Encyclopedia
This article describes audio APIs and components in Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 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
Windows XP is an operating system produced by Microsoft for use on personal computers, including home and business desktops, laptops and media centers. First released to computer manufacturers on August 24, 2001, it is the second most popular version of Windows, based on installed user base...

) 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
Sound card
A sound card is an internal computer expansion card that facilitates the input and output of audio signals to and from a computer under control of computer programs. The term sound card is also applied to external audio interfaces that use software to generate sound, as opposed to using hardware...

 driver.

The Multimedia Extensions (WaveIn/WaveOut interfaces) were released in autumn 1991 to support sound card
Sound card
A sound card is an internal computer expansion card that facilitates the input and output of audio signals to and from a computer under control of computer programs. The term sound card is also applied to external audio interfaces that use software to generate sound, as opposed to using hardware...

s, as well as CD-ROM
CD-ROM
A CD-ROM is a pre-pressed compact disc that contains data accessible to, but not writable by, a computer for data storage and music playback. The 1985 “Yellow Book” standard developed by Sony and Philips adapted the format to hold any form of binary data....

 drives, which were then becoming increasingly available. The Multimedia Extensions were released to Original Equipment Manufacturers (OEMs)
Original Equipment Manufacturer
An original equipment manufacturer, or OEM, manufactures products or components that are purchased by a company and retailed under that purchasing company's brand name. OEM refers to the company that originally manufactured the product. When referring to automotive parts, OEM designates a...

, mainly CD-ROM drive and sound card manufacturers, and added basic multimedia
Multimedia
Multimedia is media and content that uses a combination of different content forms. The term can be used as a noun or as an adjective describing a medium as having multiple content forms. The term is used in contrast to media which use only rudimentary computer display such as text-only, or...

 support for audio input and output and a CD
Compact Disc
The Compact Disc is an optical disc used to store digital data. It was originally developed to store and playback sound recordings exclusively, but later expanded to encompass data storage , write-once audio and data storage , rewritable media , Video Compact Discs , Super Video Compact Discs ,...

 audio player application to Windows 3.0. The Multimedia Extensions' new features were not available in Windows 3.0 real mode, only in 386 enhanced mode. Windows 3.1x
Windows 3.1x
Windows 3.1x is a series of 16-bit operating systems produced by Microsoft for use on personal computers. The series began with Windows 3.1, which was first sold during March 1992 as a successor to Windows 3.0...

 would later incorporate many of its features. Microsoft developed the Windows Sound System
Windows Sound System
Windows Sound System was a sound card specification developed by Microsoft for use in their Windows 3.0 with MPC extensions. WSS featured support for up to 16-bit 48 kHz digital sampling, better than the contemporary Sound Blaster Pro...

 sound card specification to complement these extensions.

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 so it could work with MME too. MME supports up to two channels of recording, 16-bit audio bit depth
Audio bit depth
In digital audio, bit depth describes the number of bits of information recorded for each sample. Bit depth directly corresponds to the resolution of each sample in a set of digital audio data...

 and sampling rate
Sampling rate
The sampling rate, sample rate, or sampling frequency defines the number of samples per unit of time taken from a continuous signal to make a discrete signal. For time-domain signals, the unit for sampling rate is hertz , sometimes noted as Sa/s...

s of up to 44.1 kHz with all the audio being mixed and sampled to 44.1 kHz.

Prior to Windows XP, the number of MME/WinMM device interfaces (waveIn, waveOut, midiIn, midiOut, mixer, and aux) is restricted to 10. This limit is raised from 10 to 32 in Windows XP.

Audio Compression Manager

Audio Compression Manager (ACM) is a Windows multimedia framework
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 and transmission protocols...

 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-compatible filetypes such as WAV
WAV
Waveform Audio File Format , is a Microsoft and IBM audio file format standard for storing an audio bitstream on PCs...

 or AVI
Audio Video Interleave
Audio Video Interleave , known by its acronym AVI, is a multimedia container format introduced by Microsoft in November 1992 as part of its Video for Windows technology. AVI files can contain both audio and video data in a file container that allows synchronous audio-with-video playback...

 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
DirectShow , 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 earlier Video for Windows technology...

. However, unlike ACM and the related Video Compression Manager (VCM)
Video for Windows
Video for Windows was a multimedia framework developed by Microsoft that allowed Microsoft Windows to play digital video.-Overview:...

, DirectShow
DirectShow
DirectShow , 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 earlier Video for Windows technology...

 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
Variable bitrate
Variable bitrate is a term used in telecommunications and computing that relates to the bitrate used in sound or video encoding. As opposed to constant bitrate , VBR files vary the amount of output data per time segment...

 audio streams; therefore newer codecs like MPEG-4
MPEG-4
MPEG-4 is a method of defining compression of audio and visual digital data. It was introduced in late 1998 and designated a standard for a group of audio and video coding formats and related technology agreed upon by the ISO/IEC Moving Picture Experts Group under the formal standard ISO/IEC...

 AAC
Advanced Audio Coding
Advanced Audio Coding is a standardized, lossy compression and encoding scheme for digital audio. Designed to be the successor of the MP3 format, AAC generally achieves better sound quality than MP3 at similar bit rates....

, Ogg Vorbis, FLAC
FLAC
FLAC is a codec which allows digital audio to be losslessly compressed such that file size is reduced without any information being lost...

 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.

KMixer

KMixer is the Kernel Audio Mixer driver, a part of WDM
Windows Driver Model
In computing, the Windows Driver Model — also known at one point as the Win32 Driver Model — is a framework for device drivers that was introduced with Windows 98 and Windows 2000 to replace VxD, which was used on older versions of Windows such as Windows 95 and Windows 3.1, as well...

 Audio in Windows 98
Windows 98
Windows 98 is a graphical operating system by Microsoft. It is the second major release in the Windows 9x line of operating systems. It was released to manufacturing on 15 May 1998 and to retail on 25 June 1998. Windows 98 is the successor to Windows 95. Like its predecessor, it is a hybrid...

 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
Latency (audio)
Latency refers to a short period of delay between when an audio signal enters and when it emerges from a system...

 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
DirectSound is a software component of the Microsoft DirectX library for the Windows operating system. DirectSound provides a low-latency interface to the sound card driver and can handle the mixing and recording of multiple audio streams....

 (except in cases of hardware mixing
Hardware mixing
Hardware mixing is a performance feature of computer audio hardware which enables sound cards to receive multiple audio streams and play them all at the same time. Hardware mixing improves performance by offloading audio mixing operations from the CPU and performing them at hardware speeds...

) and WinMM, come through the kernel mixer. If the audio hardware supports hardware mixing
Hardware mixing
Hardware mixing is a performance feature of computer audio hardware which enables sound cards to receive multiple audio streams and play them all at the same time. Hardware mixing improves performance by offloading audio mixing operations from the CPU and performing them at hardware speeds...

 (also known as hardware buffering or DirectSound hardware acceleration), DirectSound buffers directly to the rendering device. Thus, if DirectSound streams use hardware mixing
Hardware mixing
Hardware mixing is a performance feature of computer audio hardware which enables sound cards to receive multiple audio streams and play them all at the same time. Hardware mixing improves performance by offloading audio mixing operations from the CPU and performing them at hardware speeds...

, 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
Surround sound encompasses a range of techniques such as for enriching the sound reproduction quality of an audio source with audio channels reproduced via additional, discrete speakers. Surround sound is characterized by a listener location or sweet spot where the audio effects work best, and...

 streams through S/PDIF
S/PDIF
S/PDIF is a digital audio interconnect used in consumer audio equipment over relatively short distances. The signal is transmitted over either a coaxial cable with RCA connectors or a fiber optic cable with TOSLINK connectors. S/PDIF interconnects components in home theaters and other digital high...

 output of the sound card to an external home cinema
Home cinema
Home cinema, also commonly called home theater, are home entertainment set-ups that seek to reproduce a movie theater experience and mood with the help of video and audio equipment in a private home....

 receiver
Receiver (radio)
A radio receiver converts signals from a radio antenna to a usable form. It uses electronic filters to separate a wanted radio frequency signal from all other signals, the electronic amplifier increases the level suitable for further processing, and finally recovers the desired information through...

. This was corrected with Windows Me
Windows Me
Windows Millennium Edition, or Windows Me , is a graphical operating system released on September 14, 2000 by Microsoft, and was the last operating system released in the Windows 9x series. Support for Windows Me ended on July 11, 2006....

 and provided as a hotfix for Windows 98 Second Edition and Windows 2000 SP2. Starting with Windows Me, the waveOut, 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.

It should be noted, however, that contrary to popular belief KMixer doesn't 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, Direct Kernel Streaming or WASAPI. In Windows XP, for example, the usage of DirectSound
DirectSound
DirectSound is a software component of the Microsoft DirectX library for the Windows operating system. DirectSound provides a low-latency interface to the sound card driver and can handle the mixing and recording of multiple audio streams....

 (which Winamp uses by default) with a hardware mixer is a way to bypass KMixer.

KMixer was removed in Windows Vista
Windows Vista
Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...

. 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 audio APIs like OpenAL or ASIO, 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 processing of streamed data. It enables efficient real-time streaming for multimedia devices such as sound card
Sound card
A sound card is an internal computer expansion card that facilitates the input and output of audio signals to and from a computer under control of computer programs. The term sound card is also applied to external audio interfaces that use software to generate sound, as opposed to using hardware...

s and TV tuner card
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 Tivo digital video recorder does.-Variants: The interfaces for...

s. Kernel streaming allows a device driver
Device driver
In computing, a device driver or software driver is a computer program allowing higher-level computer programs to interact with a hardware device....

 to create DirectShow
DirectShow
DirectShow , 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 earlier Video for Windows technology...

-like filters and pins in kernel mode, providing access to hardware, lower latency
Latency (audio)
Latency refers to a short period of delay between when an audio signal enters and when it emerges from a system...

 communication and still be used within a DirectShow filter graph
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 process data. An example of a filter, would be a video codec that takes raw uncompressed video and compresses it using a video...

.

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 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 J. River Media Center
Media Center (software application)
Media Center, or formally, "JRiver Media Center" is a multimedia application that allows the user to play and organize various types of media on a computer running Windows....

, foobar2000
Foobar2000
foobar2000 is a freeware audio player for Windows developed by Peter Pawlowski, a former freelance contractor for Nullsoft. It is known for its highly modular design and extensive SDK which allows third-party developers to do such things as completely replace the interface...

 and Winamp
Winamp
Winamp is a media player for Windows-based PCs and Android devices, written by Nullsoft, now a subsidiary of AOL. It is proprietary freeware/shareware, multi-format, extensible with plug-ins and skins, and is noted for its graphical sound visualization, playlist, and media library features.Winamp...

 support kernel streaming. Compared to the regular "WaveOut method" in Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

, kernel streaming requires less CPU time. This comes at the expense of bypassing the KMixer and Windows volume control. Kernel streaming also does not allow device sharing.

See also

  • WDM audio in Windows 98
  • Windows Vista audio architecture
  • DirectX
    DirectX
    Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with Direct, such as Direct3D, DirectDraw, DirectMusic, DirectPlay,...

  • Universal Audio Architecture
    Universal Audio Architecture
    Universal Audio Architecture 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...


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK