Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I get this error when I'm trying to play a sound in XNA: Error 1 Audio file cash-register.wav contains non-PCM data. What is PCM data?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

PCM stands for Pulse-Code-Modulation and is a way to digitally represent analogue (sound) data. The problem you're having is that your WAV file contains invalid data. Did you just rename a .mp3 file to .wav? Or did you use a program to convert the data? If so you should check the converter settings and make sure that only the sound data is converted and that all meta-data is discarded.

share|improve this answer
    
No, I just downloaded it as .waw file! I got this problem with several files :( –  3D-kreativ Aug 27 '12 at 8:50
1  
You could try to open it in an audio editor end re-export is as wave (44100Hz, 16Bit is probably the most common format) –  helium Aug 27 '12 at 9:12
1  
It is valid for a .wav file to contain data in a format other than PCM. –  Andrew Russell Aug 27 '12 at 10:11
    
Andrew Russel is right (as usual ;) ) see the codec comparison section of this page en.wikipedia.org/wiki/WAV it indeed lists a few other codecs though (L)PCM should be the most common. –  Roy T. Aug 27 '12 at 10:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.