Sound warning - what is PCM format=1? (SOLVED)

WARNING:SOUND: Only wav-files with 8 or 16 bit PCM format (format=1) supported, got format=65534 and bitdepth=16.
ERROR:SOUND: Failed to decode sound (-2)
ERROR:GAMESYS: A sound could not be played, error: -8. Message 'play_sound' sent from main:/instance5#script to main:/instance5#sound4.

What means those magic numbers in warnings and errors and what do I need to do to get rid of them?

1 Like

The format=1 is relating to format this specification. 1 means PCM format.

If the format= 65534then it’s something wrong with the resource.
Double check the type of your source file first.

2 Likes

Thanks :slight_smile: what I can add is, in those cases you can use https://online-audio-converter.com, it helped me :wink:

1 Like

Hate to awaken a dead thread but I have something to add.

For those who want to convert files en masse to a Defold suitable format, or who do not like/trust online converters when avoidable, a great solution is to use ffmpeg. Here is the specific command I use to convert files to a Defold suitable format:

ffmpeg -i {infile, any format} -ar 44100 -ac 1 -acodec pcm_s16le {outfile, .wav}

Since it is bash, you can easily automate it or integrate it with your other audio workflows.
The easiest way to install ffmpeg is homebrew. Instructions here.
I hope this helps someone. It would have saved me half an hour if I’d come across it in this thread rather putting it together myself.

3 Likes

Or use audacity and convert to ogg format with 44000 hz

But then you would have to manually do this for each sound which is something I wanted to avoid. Integrating with bash allows you to chain your workflows and make the development of new content for your game project much faster and less error-prone.