PennController for IBEX › Forums › Support › preloading audio files
- This topic has 3 replies, 2 voices, and was last updated 2 years, 3 months ago by
Jeremy.
-
AuthorPosts
-
February 17, 2021 at 4:19 pm #6626
karmacoma
ParticipantHi Jeremy,
I have 200 audio files in my experiment. I noticed that around 20 trials in the experiment there was always a “pre-loading, may take up to 1 min” error, so I added “checkPreloaded()” in my script and was able to run the experiment further before it paused again. Is there a way to load every audio file before the experiment starts?
Thank you!
February 17, 2021 at 6:07 pm #6627Jeremy
KeymasterHi,
200 audio files is a lot, so make sure you do need all of them. For example, if you have 10 different groups of participants and each group needs only 20 audio files, take a look at this topic.
In any case, you should probably consolidate your audio files into ZIP files, if that’s not already the case. There’s a tradeoff in deciding between a single big zip file vs a few lighter zip files: one big zip file ensures that all the audio files are received once download has completed, but it takes time, which also leaves a longer time-window for download interruption to happen; several zip files could be downloaded in parallel, but it means multiple requests, so the likelihood of at least one failing to go through is of course higher.
Whatever you end up doing, you need to use CheckPreloaded to control when to check that the resources have preloaded. So if you want your experiment to proceed only after all your resources have preloaded, insert a global CheckPreloaded trial at the desired point in your Sequence. You could give a ridiculously high number as a delay if you want to really ensure that all your resources have preloaded before moving on, but your participants probably will not like that, that’s why by default CheckPreloaded still moves on after a delay regardless. What I suggest, if applicable, is to insert different CheckPreloaded trials before different blocks of trials, so as to minimize waiting time while still ensuring that all the resources for the next block of trials have preloaded before starting that block.
The documentation gives one example on how to do that, but let me know if you have questions
Jeremy
February 18, 2021 at 9:44 am #6631karmacoma
Participantthank you Jeremy! So since I have 200 audio files, do you think it might be better if I divide them into 4 different blocks (eg using 4 Templates) and inserting a CheckPreLoad before each block in my Sequence?
February 18, 2021 at 12:22 pm #6632Jeremy
KeymasterYes, if your design makes it possible, and if you don’t mind having your participants possibly wait before each block (although that becomes less likely later in the experiment, since there will have been more time for resources to preload). Just make sure to pass the right label(s) to CheckPreloaded, as illustrated on the documentation page
Jeremy
-
AuthorPosts
- You must be logged in to reply to this topic.