Prescheduling sounds in a loop

Hello! I have an experiment that plays a new (5-second) audio file on each trial in a loop. The filename of each audio file is pulled up through the Conditions file on each trial. There are a total of 20 trials (20 individual audio files) per block of the experiment.

My questions are:

  1. is it possible to preschedule all 20 audio files at the beginning of the block, as described here: Sound - for audio playback — PsychoPy v2023.1.0

I’m not sure how I would go about doing that for all 20 files and to set the timing to the start of each trial in the loop.

  1. if so, is it only possible when using PTB, or can I do that using pyo?

Thank you in advance.