Sound file not ready for playing

I have a strange error that comes the first time I want to play an mp3 file.
It’s a game and when the player gives the right answer I play an applaud.mp3 file.
However, the first time that occurs in the game I get this message:
Error 703: unable to play applaud.mp3
And that does not happen when I play the other sound when there is an error.
I followed the advice that I found in the forum to add a clock to wait a moment before playing it, thinking that uploading the file in memory may take some time.
So, I modified my blocks to this (see blocks), with a 100 then 200 clock interval.
But still the same result.

Should I test with 300, 400 until I get something right or there is another solution.
Thanks for your help.

remove the clock component and try to set the source of the sound in the blocks editor before playing it

Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

Do you mean this kind of blocks?
That’s where I started and since I had this error message I added a clock component.
Maybe I misunderstood your response.

use Do it to debug your blocks, see also tip 4 here
and remove the 2 slashes from the filename… these are only required for the file component to access files in the assets, but not for other components…


1 Like

I am quite familiar with the Do it feature, but if the problem is related to a timing problem I am not sure if it can help. I tested it and was not able to reproduce the problem.
Actually I tested it by changing the position of the “Get sound source” command for applaud.mp3 at the beginning and the other “Get sound source” command in the branch inside the If, and now I get the problem with the other sounds.
After testing several combinations I decided to put two differents sound components, and that solves the problem. Not the most elegant but after all…
Thanks for your help

I had this same problem once. When you open up the AI companion on your Android device, use legacy connection. That should probably solve it.