Failed to decode sound

#1

Hello guys
I’m trying to add sound in my game, but I’m receiving this error:


Pls help me. What does it mean and how can I deal with it?

P.S.
All my sounds in .wav and under 44100

0 Likes

#2

Ok, let’s look at the code. The error comes from this line in comp_sound.cpp (the sound component):

The result/error codes are defined in sound.h:

-8 is RESULT_INVALID_STREAM_DATA and it happens when trying to decode the sound:

This finally leads us to “Failed to decode sound (-2)” with the -2 being an error code of dmSoundCodec::Result which we find here:

-2 is RESULT_INVALID_FORMAT so there is definitely something wrong with your sounds! Perhaps you can share one of the wav files here?

4 Likes

#3

Oh sorry
For real, after decreasing my sounds to 44100hz went something wrong and they stoped playing…
Sorry again, i had to check it before posting the question

1 Like