Content deleted Content added
→Issues: that's not what linear interpolation means. either they're using zero-order hold interpolation or your description is wrong |
m →Issues: HTTP to HTTPS for SourceForge |
||
(38 intermediate revisions by 30 users not shown) | |||
Line 1:
{{Short description|Obsolete Microsoft Windows audio APIs}}
{{more footnotes|date=September 2009}}
This article describes audio APIs and components in [[Microsoft Windows]] which are now obsolete or deprecated.
Line 6:
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 ({{Not a typo|WaveIn/WaveOut}} interfaces) were released in autumn 1991 to support [[sound card]]s, as well as [[CD-ROM]] drives, which were then becoming increasingly available. The Multimedia Extensions were released to [[Original equipment manufacturer|Original Equipment Manufacturers (OEMs)]], mainly CD-ROM drive and sound card manufacturers, and added basic [[multimedia]] support for audio input and output and a [[Compact disc|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.
In earlier Windows versions, MME supported up to two channels of recording, 16-bit [[audio bit depth]] and [[sampling rate]]s of up to 44100 samples per second with all the audio being mixed and sampled to 44100 samples per second.{{citation needed|date=January 2013}} 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.<ref>[http://www.staudio.de/kb/english/drivers/ Windows audio driver API basics]</ref><ref>[http://msdn.microsoft.com/en-us/library/ff538956(v=VS.85).aspx Windows 2000 Device Interface Limits]</ref>▼
▲Prior to Windows XP, the number of MME/WinMM device interfaces ({{Not a typo|waveIn}}, {{Not a typo|waveOut}}, midiIn, midiOut, mixer, and aux) is restricted to 10. This limit is raised from 10 to 32 in Windows XP.<ref>[http://www.staudio.de/kb/english/drivers/ Windows audio driver API basics]</ref><ref>[http://msdn.microsoft.com/en-us/library/ff538956(v=VS.85).aspx Windows 2000 Device Interface Limits]</ref>
===Issues===▼
Device name length in MME is restricted to 31 characters so long device names may appear only partially.
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 [http://support.microsoft.com/kb/2653312 a hotfix] for Windows 7 and Windows Server 2008 only.<ref>{{cite web|url=http://msdn.microsoft.com/en-us/library/windows/hardware/ff537758(v=vs.85).aspx|title=Policy for Sample Rate Conversion of Audio Streams (Windows Drivers)|work=Dev Center - Hardware|publisher=Microsoft|accessdate=2012-01-17}}</ref><ref>{{cite web|url=http://social.msdn.microsoft.com/Forums/en-US/windowspro-audiodevelopment/thread/725546ce-57bf-40d0-b7aa-47e51de9c3ae/|title=Artifacts on Windows 7 due to sample rate conversion|work=Windows Desktop Development Forums discussion thread|accessdate=2012-01-17}}</ref>▼
▲===Issues===
▲A fault in the MME {{Not a typo|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]]
==Audio Compression Manager==
'''Audio Compression Manager (ACM)''' is a Windows [[multimedia framework]] that manages audio codecs (compressor/decompressors).<ref>{{cite web|title=Audio Compression Manager |url=https://docs.microsoft.com/en-us/windows/desktop/Multimedia/audio-compression-manager |publisher=[[Microsoft]] |date=May 30, 2018}}</ref> 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 <code>.acm</code>
ACM is considered an outdated framework/API and Microsoft now encourages the use of at least [[DirectShow]]. However, unlike ACM and the related [[Video for Windows|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 [[Variable bitrate|VBR]] audio streams; therefore newer codecs like [[MPEG-4]] [[Advanced Audio Coding|AAC]], [[Vorbis|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 {{section link|WAV file|Comparison of coding schemes}}.
ACM codecs are identified by a two-byte code (TwoCC) allocated by Microsoft.
▲ACM is considered an outdated framework/API and Microsoft now encourages the use of at least [[DirectShow]]. However, unlike ACM and the related [[Video for Windows|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 [[Variable bitrate|VBR]] audio streams; therefore newer codecs like [[MPEG-4]] [[Advanced Audio Coding|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.
==DirectX Audio Libraries==
*[[DirectSound]]
*[[DirectMusic]]
==KMixer==
{{update|section|date=March 2025|reason=All the Windows versions mentioned here have been unsupported since at least 2010.}}
'''KMixer''' is the ''Kernel Audio Mixer'' driver, a part of [[Windows Driver Model|WDM]] Audio in [[Windows 98]] to Windows XP which handles the mixing of multiple sound buffers into an output.
Line 34 ⟶ 41:
* 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
| url=http://msdn.microsoft.com/en-us/library/ff537756.aspx
| title=Policy for Mixing Audio Streams and Setting the Output Sample Rate
| accessdate=2010-11-23 |url-status=dead
| publisher=MSDN
}}{{dead link|date=March 2025}}</ref><ref name="Benchamark_kmixer">{{cite web
| url=http://www.benchmarkmedia.com/wiki/index.php/Kmixer
| title=Windows Kmixer |url-status=usurped
| accessdate=2010-11-23
}}{{dead link|date=March 2025}}</ref><ref name="Bitperfect_Googlecode">{{cite web
| url=http://code.google.com/p/cmediadrivers/wiki/Bitperfect |url-status=dead
| title=What is "bitperfect", and what do I have to do for bitperfect playback?
| accessdate=2010-11-23
}}{{dead link|date=March 2025}}</ref>
===Issues===
Line 59 ⟶ 66:
}}</ref> 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.<ref name=CakeWalkKS>[http://www.cakewalk.com/DevXchange/article.aspx?aid=114 CakeWalk - Windows Pro Audio Roundtable]</ref> If the audio hardware supports [[hardware mixing]] (also known as hardware buffering or DirectSound hardware acceleration), DirectSound buffers directly to the rendering device.<ref>[http://msdn.microsoft.com/en-us/library/windows/desktop/ee416769(v=vs.85).aspx DirectSound Driver Models]</ref> Thus, if DirectSound streams use [[hardware mixing]], KMixer is bypassed.<ref>[http://msdn.microsoft.com/en-us/library/windows/hardware/ff537603(v=vs.85).aspx Overview of DirectSound Hardware Acceleration]</ref>
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 [[Dolby
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
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 [[Technical features new to Windows Vista#Audio|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 [[Audio Stream Input/Output|ASIO]], which still have direct access to the hardware.<ref name="OpenAL_output">{{cite web
| url=
| title=Winamp OpenAL Output Plug-in
| accessdate=2010-11-23
Line 74 ⟶ 81:
'''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]]s and [[TV tuner card]]s. Kernel streaming allows a [[device driver]] to create [[DirectShow]]-like filters and pins in [[kernel mode]], providing access to hardware, lower [[Latency (audio)|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 [[
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 [https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/wavert-port-driver 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==
Line 82 ⟶ 91:
*[[Technical features new to Windows Vista#Audio|Windows Vista audio architecture]]
*[[DirectX]]
*[[Universal Audio Architecture]] (UAA)
==References==
{{
==External links==
*[
*[
*[http://wiki.silverblade.co.uk/index.php?title=ReactOS:Sound:Kernel_Streaming Kernel Streaming components]▼
*[http://wiki.silverblade.co.uk/index.php?title=ReactOS:Sound:Multimedia_Extensions_%28MME%29 MME API (WinMM)]▼
▲*[http://msdn.microsoft.com/en-us/library/ms790010.aspx KMixer Latency]
*[http://www.vishnivetsky.ru/заметки%20статьи%20обзоры/Microsoft-Audio-Compression-Manager-MS-ACM-MMACM-Codecs-g729-g711-g723-msgsm-audstub.html MS ACM Drivers(Codecs) Details]
*[http://www.vishnivetsky.ru/%D0%B7%D0%B0%D0%BC%D0%B5%D1%82%D0%BA%D0%B8%20%D1%81%D1%82%D0%B0%D1%82%D1%8C%D0%B8%20%D0%BE%D0%B1%D0%B7%D0%BE%D1%80%D1%8B/How-to-write-Microsoft-Audio-Compression-Manager-Codec-%28Installable-Driver%29.html How to write Microsoft Audio Compression Manager Codec (Installable Driver)]
* [http://www.foobar2000.org/components/view/foo_out_ks foobar2000 plug-in] — Kernel Streaming plug-in for [[foobar2000]]
* [http://www.stevemonks.com/ks_plugin/plugin.html Winamp Kernel Streaming Plugin]
==Broken links==
* [http://wiki.silverblade.co.uk/index.php?title=ReactOS:Sound:Kernel_Streaming Kernel Streaming components] (documented for re-implementation in [[ReactOS]])▼
▲*[http://wiki.silverblade.co.uk/index.php?title=ReactOS:Sound:Kernel_Streaming Kernel Streaming components]
▲*[http://wiki.silverblade.co.uk/index.php?title=ReactOS:Sound:Multimedia_Extensions_%28MME%29 MME API (WinMM)]
▲*
{{Windows Components}}
{{Microsoft APIs}}
[[Category:Music software plugin architectures]]
|