Issues repeating an audio file across trials in 2021.2.3

You’re right — if the audio has not finished playing, then subsequent repeats are able to go ahead as planned. This actually revealed that I was wrong in my original post: other routines did have this issue — I was just advancing through repeats so quickly that I always replayed the audio before the first play had finished! The danger of having gone through your own experiment so many times for troubleshooting, I guess… So thank you very very much for the suggestion, @wakecarter !

However, for the relevant routines in my experiment, the trial only advances to the next repeat (which causes the sound to potentially be replayed) dependent on a key response from the participant. Since a participant could take arbitrarily long, in principle, to make that key response, I’d rather not add excessively long silence to the end of every single possible audio file.

Instead, I’ve solved this issue by modifying the idea I had in my original post slightly:

  • How about adding a silent sound at the end of each routine, so that identical calls for the same audio file to be played won’t be right next to each other?

I added silence at the beginning of each routine instead. That is, I added a short silent audio component (0.1 seconds long) to the beginning of the offending routines, and adjusted the start time of the audio component presenting issues by 0.1 second as well. This interleaves the potentially repeating audio component with different audio files, and allows replay to happen even after the audio file has finished playing; (though I am still not sure what the technical source of the issue is,) that solves my issue!

2 Likes