Distorted Sounds and Bad Timing

If this template helps then use it. If not then just delete and start from scratch.

OS (e.g. Win10):
PsychoPy version (e.g. 1.84.x): V2022.2.5.
Standard Standalone? (y/n) If not then what?: Standalone
**What are you trying to achieve?: present the same sound in a loop with a variable inter stimulus interval

**What did you try to make it work?: Inter stimulus interval governed by a variable in the conditions file. A fixation cross that starts at the beginning of the routine and ends when the sound status is ‘Finished’. The sound starts at the beginning of the routine. Once the sound ends a second fixation cross starts when the sound status is ‘Finished’ and lasts for the duration specified by the variable in the conditions file. The routine then ends and loops back to the beginning. The sound file is hard coded into the sound component and does not change with the loop itteration.

I have tried using PTB with Asio in the settings but the latency between the marker and the sound onset is variable. Also it often occurs at some point in the experiment that the sound playback becomes distorted so that the pure tone ‘beep’ becomes an emergency alarm ‘ERRP!’ instead, which should not be happening.

When using pyo instead of PTB the latency increases dramatically with almost as much variability. In both cases the variability can be up to +/- 20ms.

What could be the cause of these issues?

The stimulus computer is a high performance stimulus PC set prepared by SR Research.