Audio Resampling

[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

Every compressed format of an audio codec has a specific sample rate and sample size. These do not need to match the settings of the input format or output format. If an input format has different settings than the compressed format described in the profile, the writer will resample the audio, during the encoding process, to match the compressed format. Only certain formats are accepted by the writer as input. When you enumerate the input formats for a compressed audio stream, all of the formats retrieved can be resampled to match the format in the profile.

When reading compressed audio, the reader will resample the content to match the output format. You must use one of the output formats enumerated by the reader, so you are guaranteed that the audio can be resampled to the output format settings.

Each resampling potentially affects the quality of the audio. When possible, you should use input and output formats with settings that match the compressed format.

File Writing Features

Working with Inputs

Working with Outputs