locked
XAudio2 sdk sample problem

    Question

  • Hi,

    I've been trying to play an ADPCM wave file with the sample provided in c++ app samples package. (sample name is "XAudio2 audio file playback sample").

    The problem is that only the wav files included with this sample seem to work. I've tried several conversion programs and several adpcm format combinations (22k, 44k, stereo, mono...) using the MS ADPCM format. All converted files are valid as they can be played with media player... but the sample app throws an exception at the CreateSourceVoice() function (file XAudio2SoundPlayer.cpp, line 161).

    Has anyone tried to load other adpcm files than the files packaged in this sample? If so, how did you create/convert the sound file?

    Thanks!

    Friday, November 9, 2012 5:31 PM

Answers

  • The XAUDIO2 ADPCM format is a constrained subset of the full MS ADPCM format. You must use the adpcmencode tool in the Windows 8.0 SDK to compress PCM data to ADPCM in a way that is supported by XAUDIO2.

    • Marked as answer by jmenossi Friday, November 16, 2012 2:23 PM
    Tuesday, November 13, 2012 6:41 PM

All replies

  • Hello,

     

    Thanks for your feedback, I will involve more experts to investigate it.

     

    Best regards,

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, November 13, 2012 3:17 AM
    Moderator
  • The XAUDIO2 ADPCM format is a constrained subset of the full MS ADPCM format. You must use the adpcmencode tool in the Windows 8.0 SDK to compress PCM data to ADPCM in a way that is supported by XAUDIO2.

    • Marked as answer by jmenossi Friday, November 16, 2012 2:23 PM
    Tuesday, November 13, 2012 6:41 PM