> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview of ADPCM

> How XAudio2 uses ADPCM lossy audio compression with configurable sample block size for XBOX game audio, and how to encode ADPCM content.

Adaptive Differential Pulse Code Modulation (ADPCM) is a lossy compression format. This means that some data is altered and lost during compression. ADPCM can achieve compression ratios of up to 4:1.

The implementation of ADPCM for `XAudio2` provides additional features to specify the size of the compression sample block. The audio designer can use ADPCM to choose a setting that's an appropriate compromise among size, quality, and resolution (for placing loop points).

Because `XAudio2` implements ADPCM compression with a configurable sample block size, `XAudio2` ADPCM isn't compatible with previous ADPCM formats, such as IMA ADPCM and Microsoft ADPCM. `XAudio2` requires ADPCM content that's created with its own ADPCM command-line encoder tool. Conversely, decoding content that's encoded in the `XAudio2` ADPCM format requires explicit support for an external audio authoring or rendering engine.

<a id="ID4EY" />

## ADPCM encoding

Encode audio data to ADPCM by using the [ADPCM command-line encoder](/build/console-features/audio/tools/adpcmencoder-tools) tool.

<a id="ID4EDB" />

## ADPCM playback

Use `XAudio2` to play back ADPCM audio on XBOX One. To do so, begin by initializing a [WAVEFORMATEX](https://learn.microsoft.com/windows/desktop/api/mmreg/ns-mmreg-waveformatex) structure with ADPCM-specific values and then pass that structure as an argument to [IXAudio2::CreateSourceVoice](https://learn.microsoft.com/windows/desktop/api/xaudio2/nf-xaudio2-ixaudio2-createsourcevoice) when you create a source voice. For an example of loading and playing a sound in `XAudio2`, see [How to: Play a Sound with XAudio2](https://msdn.microsoft.com/library/windows/desktop/ee415787\(v=vs.85\).aspx).

## See also

[Overview of XAudio2](/build/console-features/audio/overviews/xaudio2-overview)
[Use XAudio2 to play a sound](/build/console-features/audio/overviews/xaudio2-play-sound)
[ADPCM command-line encoder](/build/console-features/audio/tools/adpcmencoder-tools)


## Related topics

- [Overviews](/build/console-features/audio/overviews/index.md)
- [Use XAudio2 to play a sound](/build/console-features/audio/overviews/xaudio2-play-sound.md)
- [The audio architecture in XBOX One](/build/console-features/audio/overviews/xbox-one-audio-architecture.md)
- [ADPCM command-line encoder](/build/console-features/audio/tools/adpcmencoder-tools.md)
- [Tools](/build/console-features/audio/tools/index.md)
