Online experiments don't replay audio in a loop unless there's a routine at the end of the loop

URL of experiment

Description of the problem

The shortest way that I can describe the error is that online experiments don’t replay audio in a loop unless there is some routine at the end of the loop. The replaying works as expected locally. The first experiment above has such a routine inside the inner loop; the second one does not. I believe this to be a bug (or something that I don’t understand about loops and the (re-)initialization of components) since I can’t see why that would affect audio playback.

I’ve attempted to create a minimal (non-)working example, though I thought it necessary to include a representative example of the “correct picture” detection code from the real experiment. Simply put, there is an outer loop that uses a conditions file with two conditions and an inner one that loops if you’ve clicked the wrong image. The correct image is, for simplicity’s sake, defined as the image on the left, and clicking on it will set the inner loop’s status to “finished.” Clicking on the image to the right will cause the inner loop to run all three times.

Note that the audio samples are somewhat quiet as I recorded them in a library, so you might need to turn up the volume a little to hear them. When the audio doesn’t replay online, it takes about ten seconds to finish the three inner routines.

Thanks in advance for any help.

I’ve sometimes solved this issue by playing a split second of silence (a silent sound file) in before each repeated audio file.

Thanks for the reply. It’s good to know that it happens for others as well.

Should this be reported as a bug? I don’t see anything corresponding to this in the issue tracker.