Windows legacy audio components

Last updated

This article describes audio APIs and components in Microsoft Windows which are now obsolete or deprecated.

Contents

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) 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 driver.

The Multimedia Extensions (WaveIn/WaveOut interfaces) were released in autumn 1991 to support sound cards, 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 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 would later incorporate many of its features. Microsoft developed the Windows Sound System 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 rates of up to 44100 samples per second with all the audio being mixed and sampled to 44100 samples per second.[ citation needed ] 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 (waveIn, waveOut, midiIn, midiOut, mixer, and aux) is restricted to 10. This limit is raised from 10 to 32 in Windows XP. [1] [2]

Device name length in MME is restricted to 31 characters so long device names may appear only partially.

Issues

A fault in the MME WaveIn/WaveOut 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 (e.g. new sample is taken as an exact duplicate[ dubious ] 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 via a hotfix for Windows 7 and Windows Server 2008 only. [3] [4]

Audio Compression Manager

Audio Compression Manager (ACM) is a Windows multimedia framework that manages audio codecs (compressor/decompressors). [5] 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 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. However, unlike ACM and the related Video Compression Manager (VCM), DirectShow 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, 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 WAV file § Comparison of coding schemes.

ACM codecs are identified by a two-byte code (TwoCC) allocated by Microsoft.

DirectX Audio Libraries

KMixer

KMixer is the Kernel Audio Mixer driver, a part of WDM Audio in Windows 98 to Windows XP which handles the mixing of multiple sound buffers into an output.

The tasks performed by KMixer.sys:

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. [6] [7] [8]

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 [9] 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 (except in cases of hardware mixing) and WinMM, come through the kernel mixer. [10] If the audio hardware supports hardware mixing (also known as hardware buffering or DirectSound hardware acceleration), DirectSound buffers directly to the rendering device. [11] Thus, if DirectSound streams use hardware mixing, KMixer is bypassed. [12]

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 streams through S/PDIF output of the sound card to an external home cinema receiver. This was corrected with Windows Me and provided as a hotfix for Windows 98 Second Edition and Windows 2000 SP2. [13] 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.

KMixer does not alter the sound in the majority of cases. [6] 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 (which Winamp uses by default) with a hardware mixer is a way to bypass KMixer. [9]

KMixer was removed in Windows Vista. 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 or ASIO, which still have direct access to the hardware. [14]

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 cards and TV tuner cards. Kernel streaming allows a device driver to create DirectShow-like filters and pins in kernel mode, providing access to hardware, lower latency communication and still be used within a DirectShow filter graph.

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, JPLAY, foobar2000, Audirvana Studio and Winamp support kernel streaming. Compared to the regular "WaveOut method" in Microsoft Windows, 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 unless kernel-mode audio driver supports multiple clients.

Prior to Windows Vista, Kernel Streaming offered only a single client-to-driver communication protocol 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. RT Audio protocol is implemented by 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

Related Research Articles

DirectX Collection of multimedia related APIs on Microsoft platforms

Microsoft DirectX is a collection of application programming interfaces (APIs) 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, DirectSound, and so forth. The name DirectX was coined as a shorthand term for all of these APIs and soon became the name of the collection. When Microsoft later set out to develop a gaming console, the X was used as the basis of the name Xbox to indicate that the console was based on DirectX technology. The X initial has been carried forward in the naming of APIs designed for the Xbox such as XInput and the Cross-platform Audio Creation Tool (XACT), while the DirectX pattern has been continued for Windows APIs such as Direct2D and DirectWrite.

Sound card Expansion card that provides input and output of audio signals

A sound card is an internal expansion card that provides 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 used for professional audio applications.

Windows Media Player Media player and media library application by Microsoft

Windows Media Player (WMP) is a media player and media library application developed by Microsoft that is used for playing audio, video and viewing images on personal computers running the Microsoft Windows operating system, as well as on Pocket PC and Windows Mobile-based devices. Editions of Windows Media Player were also released for classic Mac OS, Mac OS X and Solaris but development of these has since been discontinued.

Windows 98 Microsoft personal computer operating system released in 1998

Windows 98 is an operating system developed by Microsoft as part of its Windows 9x family of Microsoft Windows operating systems. It is the successor to Windows 95, and was released to manufacturing on May 15, 1998, and generally to retail on June 25, 1998. Like its predecessor, it is a hybrid 16-bit and 32-bit monolithic product with the boot stage based on MS-DOS.

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 handle the mixing and recording of multiple audio streams. DirectSound was originally written for Microsoft by John Miles.

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. Based on the Microsoft Windows Component Object Model (COM) framework, DirectShow provides a common interface for media across various programming languages, and is an extensible, filter-based framework that can render or record media files on demand at the request of the user or developer. The DirectShow development tools and documentation were originally distributed as part of the DirectX SDK. Currently, they are distributed as part of the Windows SDK.

SMPTE 421, informally known as VC-1, is a video coding format. Most of it was initially developed as Microsoft's proprietary video format Windows Media Video 9 in 2003. With some enhancements including the development of a new Advanced Profile, it was officially approved as a SMPTE standard on April 3, 2006. It was primarily marketed as a lower-complexity competitor to the H.264/MPEG-4 AVC standard. After its development, several companies other than Microsoft asserted that they held patents that applied to the technology, including Panasonic, LG Electronics and Samsung Electronics.

Architecture of Windows NT Overview of the architecture of the Microsoft Windows NT line of operating systems

The architecture of Windows NT, a line of operating systems produced and sold by Microsoft, is a layered design that consists of two main components, user mode and kernel mode. It is a preemptive, reentrant multitasking operating system, which has been designed to work with uniprocessor and symmetrical multiprocessor (SMP)-based computers. To process input/output (I/O) requests, they use packet-driven I/O, which utilizes I/O request packets (IRPs) and asynchronous I/O. Starting with Windows XP, Microsoft began making 64-bit versions of Windows available; before this, there were only 32-bit versions of these operating systems.

DirectX Video Acceleration (DXVA) is a Microsoft API specification for the Microsoft Windows and Xbox 360 platforms that allows video decoding to be hardware-accelerated. The pipeline allows certain CPU-intensive operations such as iDCT, motion compensation and deinterlacing to be offloaded to the GPU. DXVA 2.0 allows more operations, including video capturing and processing operations, to be hardware-accelerated as well.

The High Precision Event Timer (HPET) is a hardware timer used in personal computers. It was developed jointly by Intel and Microsoft and has been incorporated in PC chipsets since 2005. Formerly referred to by Intel as a Multimedia Timer, the term HPET was selected to avoid confusion with the software multimedia timers introduced in the MultiMedia Extensions to Windows 3.0.

Cross-platform Audio Creation Tool (XACT) is an audio programming library and engine released by Microsoft as part of the DirectX SDK. It is a high-level audio library for authoring/playing audio that is written to use Xaudio on the Xbox, DirectSound on Windows XP, and the new audio stack on Windows Vista and Windows 7. Xaudio is an Xbox-only API designed for optimal digital signal processing. XACT also includes X3DAudio, a spatialization helper library available on both platforms, Windows and the Xbox. XACT was originally developed for Xbox development, and was later modified to work for Microsoft Windows development as well.

As the next version of Windows NT after Windows 2000, as well as the successor to Windows Me, Windows XP introduced many new features but it also removed some others.

Ensoniq AudioPCI

The Ensoniq AudioPCI is a PCI-based sound card released in 1997. It was Ensoniq's last sound card product before they were acquired by Creative Technology. The card represented a shift in Ensoniq's market positioning. Whereas the Soundscape line had been made up primarily of low-volume high-end products full of features, the AudioPCI was designed to be a very simple, low-cost product to appeal to system OEMs and thus hopefully sell in mass quantities.

Compared with previous versions of Microsoft Windows, there are numerous features new to Windows Vista, covering most aspects of the operating system, which include additional management features, new aspects of security and safety, new I/O technologies, new networking features, and new technical features. Windows Vista also removed some others.

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 supported by default: USB, IEEE 1394 (FireWire), and Intel High Definition Audio, which supports PCI and PCI Express.

Windows Display Driver Model (WDDM) is the graphic driver architecture for video card drivers running Microsoft Windows versions beginning with Windows Vista.

Media Foundation (MF) is a COM-based multimedia framework pipeline and infrastructure platform for digital media in Windows Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10. It is the intended replacement for Microsoft DirectShow, Windows Media SDK, DirectX Media Objects (DMOs) and all other so-called "legacy" multimedia APIs such as Audio Compression Manager (ACM) and Video for Windows (VfW). The existing DirectShow technology is intended to be replaced by Media Foundation step-by-step, starting with a few features. For some time there will be a co-existence of Media Foundation and DirectShow. Media Foundation will not be available for previous Windows versions, including Windows XP.

The Protected Media Path is a set of technologies creating a "Protected Environment," first included in Microsoft's Windows Vista operating system, that is used to enforce digital rights management protections on content. Its subsets are Protected Video Path (PVP) and Protected User Mode Audio (PUMA). Any application that uses Protected Media Path in Windows uses Media Foundation.

Windows Vista has many significant new features compared with previous Microsoft Windows versions, covering most aspects of the operating system.

References

  1. Windows audio driver API basics
  2. Windows 2000 Device Interface Limits
  3. "Policy for Sample Rate Conversion of Audio Streams (Windows Drivers)". Dev Center - Hardware. Microsoft. Retrieved 2012-01-17.
  4. "Artifacts on Windows 7 due to sample rate conversion". Windows Desktop Development Forums discussion thread. Retrieved 2012-01-17.
  5. "Audio Compression Manager". Microsoft. May 30, 2018.
  6. 1 2 "Policy for Mixing Audio Streams and Setting the Output Sample Rate". MSDN. Retrieved 2010-11-23.
  7. "Windows Kmixer" . Retrieved 2010-11-23.
  8. "What is "bitperfect", and what do I have to do for bitperfect playback?" . Retrieved 2010-11-23.
  9. 1 2 "KMixer Latency". MSDN. Retrieved 2010-11-23.
  10. CakeWalk - Windows Pro Audio Roundtable
  11. DirectSound Driver Models
  12. Overview of DirectSound Hardware Acceleration
  13. Non-PCM Wave Formats and WDM Audio Drivers
  14. "Winamp OpenAL Output Plug-in" . Retrieved 2010-11-23.