Microsoft KB Archive/925901

From BetaArchive Wiki

Article ID: 925901

Article Last Modified on 11/13/2006


  • Windows Vista Business
  • Windows Vista Enterprise
  • Windows Vista Home Basic
  • Windows Vista Home Premium
  • Microsoft Windows Media Player 11


To improve reliability and to simplify audio application development in Windows Vista, the Windows audio stack has been redesigned. Microsoft Windows Media Player 11 uses a new multimedia API in Windows Vista that is called Media Foundation. Media Foundation provides Windows Media Audio (WMA), Windows Media Video (WMV), and MP3 media formats. Because of these changes, Windows Media Player audio playback may behave differently in Windows Vista than Windows Media Player audio playback behaves in Microsoft Windows XP. This article discusses aspects of audio playback in Windows Vista and provides options to modify symptoms that you may experience therein.


Description of the Windows Vista audio stack

This section describes the Windows Vista audio stack and some of the Windows Vista audio stack components. Applications that provide audio write uncompressed audio data to a buffer in a new Windows component that is called the Audio Engine. The Audio Engine is located in the Windows Audio Service. In shared mode, the Audio Engine applies optional per-stream audio effects that are called Local Effects (LFX). The Audio Engine also applies a per-session volume control on this data. Then, the streams from all applications are combined in a mixer buffer. A set of global audio effects (GFX) may be applied at this point. There is a global volume control transform that is applied before or after the GFX. Then, this audio data is passed to the audio hardware through the Audio Driver. The Audio Engine can also operate in exclusive mode. In exclusive mode, the behavior is different. The next section describes exclusive mode behavior in more detail.

Typically, the application is responsible for providing the Audio Engine audio buffers in a format that is supported by the Audio Engine. Audio sample formats consist of the sampling frequency, the bit depth, and the number of channels. The native bit depth of samples that the Audio Engine uses internally is 32-bit float. However, the Audio Engine accepts most integer formats that are up to 32-bits. Additionally, the Audio Engine converts most formats to the floating point representation internally. The Audio Control Panel specifies the required sampling frequency as the “Default format.” The Default format specifies the format that is used to provide the content by the audio device. The number of channels that the Audio Engine supports is generally the number of speakers in the audio device.

Changing the sampling frequency and data bit depth is called sample rate conversion. An application may decide to write its own sample rate converter. Alternatively, an application may decide to use APIs such as PlaySound, WAVE, Musical Instrument Digital Interface (MIDI), or Mixer. In these APIs, the conversion occurs automatically. When it is required, Windows Media Player performs sample rate conversion in its internal Media Foundation pipeline. However, if Windows Media Player is playing audio that the Audio Engine can handle natively, Windows Media Player rebuilds its own pipeline without a sample rate converter. This behavior occurs to reduce the intermediate audio transformations and to improve performance.

After the audio data moves to the Audio Engine, users can apply audio effects before the audio goes to the mixer buffer. To view the settings for these effects, click the Enhancements tab, and then click the Speakers Properties dialog box.

On 5.1 audio systems, when you enable or disable Speaker Fill that is in Speaker Properties dialog box, you affect the native formats that are supported by the Audio Engine. For example, if you enable Speaker Fill, the Audio Engine natively supports stereo audio on multichannel hardware. However, if you disable Speaker Fill, the Audio Engine does not natively support stereo audio on multichannel hardware. This forces the application to convert stereo audio to 5.1 channels before the application gives stereo audio to the Audio Engine.

Volume control and Windows media player effects do not work in the Audio Engine exclusive mode

An application can request that the Audio Engine give that application direct access to the Direct Memory Access (DMA) mode audio buffer from the Audio Device. Applications that demand the least amount of intermediate processing of the audio data by the operating system operate in DMA mode. Also, applications that want to output compressed audio data such as Dolby Digital or WMA Pro over Sony/Philips Digital Interface (S/PDIF) operate in DMA mode. No other application can provide audio when the application has the Audio Engine in exclusive mode. This can be controlled in the Advanced tab of the Speaker Properties dialog box. In exclusive mode, the whole Audio Engine stack is bypassed. Therefore, system sounds, per-session volume controls, and Windows Media Player enhancements do not work.

Mono content in multichannel hardware is provided through center speaker only

The new Audio Engine in Windows Vista provides single-channel, or mono, content through the center channel. At the same time, the Audio Engine provides audio on a multichannel speaker configuration such as the 5.1 audio system or the 7.1 audio system. This behavior differs from Windows XP where mono audio is equally split between the left and right channels. Therefore, if a user plugs headphones into the left or right output of a 5.1 audio system, mono content is inaudible. Additionally, some in-speaker headphone outputs that are on multichannel systems may not mix all the channels to stereo. In this case, all audio is inaudible through the systems.

If this default behavior presents hardware difficulties, use the Speaker Setup dialog box that is available in Control Panel to change the number of audio channels that run to the stereo. This causes the Audio Engine to send mono audio to the left and right channels.

Brief silence around 200 milliseconds (ms) when you play encoded audio over S/PDIF

If the audio device is configured to use an external S/PDIF receiver, Windows Media Player may send encoded audio such as Dolby Digital, DTS, or WMA Pro to the device. The audio is decoded by an embedded decoder that is inside the audio/video receiver. The embedded decoder is not inside the computer. When you play audio in this mode, a small amount of audio may be missing at the start of playback. The missing audio may be around 200 ms long. However, the length may vary from receiver to receiver. This behavior occurs because the external decoder needs some time to detect the stream, to set up internal pipeline, and to start decoding. The receiver drops the audio. The receiver does not delay the audio. This behavior makes sure that the audio is in sync with any video that may be provided. The missing audio should not affect most DVD playback scenarios because there is generally no audio content at the start in most commercial content. Typically, the first scene that is provided is an FBI warning or a logo. However, you may experience the missing audio by using playlists in Windows Media Player. This behavior may occur especially when content types change from supported encoded formats such as WMA Pro to unsupported encoded formats such as MP3, WAV, and more. Whenever this occurs, the S/PDIF receiver must change from providing an uncompressed format to providing a compressed format.

If this behavior is a problem, the user can disable encoded audio output by disabling the encoded formats in the Supported Formats tab of SPDIF Interface Properties dialog box of the S/PDIF audio device. By disabling the unsupported encoding format, the computer puts out uncompressed PCM audio to the S/PDIF receiver for all content.

Cross fading from stereo to multichannel audio does not work if Speaker Fill is enabled

Cross fading is a feature in Windows Media Player that lets the next song softly start before the current song ends. This is also known as seamless audio. In Windows XP, Windows Media Player only allows for cross fading between media elements that have the same number of audio channels. In Windows Vista, Windows Media Player uses Media Foundation. This allows for cross fading between media elements where the number of channels may be different.

However, there is one situation where Windows Media Player does not cross fade. This situation occurs when you enable Speaker Fill and the Windows Media Player playlist has stereo audio that is followed by 5.1 or 7.1 multichannel audio. If this behavior is a problem, you can disable Speaker Fill by clicking to clear the Speaker Fill check box that is under the Enhancements tab of the Speakers Properties dialog box.

Additional query words: kbmissingaudio, kbexclusivemode, kbcrossfading, kbplaylists

Keywords: kbhowto kbinfo kbtshoot KB925901