XACT and ADPCM not working?


I’m trying to play a single cue from an XACT project that is built using XACT v3.0 (

The cue consists of one wave sound (0.148s, 44100Hz, 16 bit, Mono). When the XACT-Project is build using a PCM compression preset it works fine. With ADPCM it’s some noise. I tried different files, without getting any of them to work.

I need help with two aspects of this:

  1. Is building the AudioContent.xgs, SoundBank.xsb and WaveBank.xwb width XACT v3.0 and copying the resulting files into the content the right way to do it? It seems so to me, since PCM is working
  2. It looks like the audio file isn’t decoded the right way. Is this done by MonoGame or the underlying SharpDX? Some advice on possible causes and what to try/debug would help me a lot.

Best, Martin

Yes… that is the only way to do it right now. We’re still looking for help with getting XAct integrated into the content pipeline:

Implement XactImporter and XactProcessor · Issue #2661 · MonoGame/MonoGame · GitHub

I assume you’re using the DirectX version of MonoGame on Windows and not OpenGL.

On the DirectX platforms we use XAudio2 which can natively play MSADPCM. So we do no decoding and it should just play.

On OpenGL platforms we general use OpenAL which cannot play MSADPCM and we decode these to raw PCM on load. Still these should play correctly.

So it is strange you’re getting an issue at all.

If you can give us a simple XAct project that fails we can test it more closely and work it out.

Here is an example project: https://www.dropbox.com/s/wrykbx78lm833af/MonoGameTestGame.zip?dl=0
You can open the XactContent.xap file from the content and change the settings in the compression preset.

In the issue you posted, kvenkateshan seems to be having the same problem and solved it by removing the compression preset. This would increase the audio content size of our project by 10s of MB and really isn’t an option.

One question that comes to mind is how the user will be able to set the compression for a future XActProcessor. It would probably be necessary to individually overwrite the compression setting for each compression preset (e.g. using wav for short sounds and m4a for music tracks).

Openal-soft can play both MS-ADPCM and IMA-ADPCM, so when we switch to that for the desktop platforms we can get compressed audio samples support working on most platforms. iOS may require some more work.

Switching to OpenAL works.

I’m not sure what this means for the MonoGame Windows version. Would you really replace XAudio2 with OpenAL?
Simply using the WindowsGL version isn’t working for me, because it doesn’t seam to have Video support.

If someone stumbles over this issue:

The error can very likely be fixed by using the “new” format specific SoundEffect constructor that has been introduced with https://github.com/mono/MonoGame/commit/8a70a734c93e335c2c50683aa31744316bf6374f

A general issue for Xact already exists here: https://github.com/mono/MonoGame/issues/4745