> ## 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.

# ADPCM command-line encoder

> ADPCM command-line encoder

The Adaptive Differential Pulse Code Modulation (ADPCM) command-line encoder converts sound files between ADPCM and Pulse Code Modulation (PCM). PCM input files must be at least 128 samples. Any loops in the file must also be at least 128 samples. PCM input files must have a sample rate in the range of 1 KHz-50 KHz. Any PCM input files that don't meet these requirements are rejected with a detailed error message. Conversion information is shown in the following code and table.

| Column 1                                       |
| ---------------------------------------------- |
| `AdpcmEncode [ -b `\*N \*`]`*IN.wav* *OUT.wav* |

| Option    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| -b *N*    | Specifies the number of PCM samples to which each ADPCM block in the output file will decode. The value of *N* can be 32, 64, 128, 256, or 512. The default value is 128.                                                                                                                                                                                                                                                                                                                                                                                                                  |
| *IN.wav*  | The name of the file to convert. If the input file is PCM, it will be encoded to an ADPCM output file. If the input file is ADPCM, it will be decoded to a PCM output file. Input PCM files have the following restrictions. Must be mono or stereo. Must have a sample rate between 1 KHz and 50 KHz. Must have samples that are 8, 16, or 32 bit. Can only have a `WAVEFORMATEX` structure in their format chunk. The `WAVEFORMATEXTENSIBLE` structure isn't supported. `AdpcmEncode` only supports input ADPCM files that have the same ADPCM format that's generated by `AdpcmEncode`. |
| *OUT.wav* | The name of the file that will hold the resulting converted audio.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |

<a id="ID4EOD" />

## See also

[ADPCM overview](/build/console-features/audio/overviews/adpcm-overview)
[Overview of XAudio2](/build/console-features/audio/overviews/xaudio2-overview)
[Use XAudio2 to play a sound](/build/console-features/audio/overviews/xaudio2-play-sound)


## Related topics

- [Overview of ADPCM](/build/console-features/audio/overviews/adpcm-overview.md)
- [Tools](/build/console-features/audio/tools/index.md)
- [Use XAudio2 to play a sound](/build/console-features/audio/overviews/xaudio2-play-sound.md)
- [xWMA encoder library and command line tool](/build/console-features/audio/tools/xwmaencoder/index.md)
- [XMA2 encoder library and command line tool](/build/console-features/audio/tools/xma2encoder/index.md)
