Ultra-laggy sound stimuli in simple loop

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

OS: Mac 14.2.1
PsychoPy version: 2023.2.3
Standard Standalone? yes

I am trying to get a sound to play at the beginning (time 0) of each trial of my paradigm, which loops through ~30 trials. On the first trial, the timing seems to work correctly. But, after the first trial the timing becomes offset from the start of the trial. The sound lags behind the visual stimulus that marks the start of a trial by roughly a couple seconds. This lag time seems random - the sound doesn’t play the same wrong time each trial.

Tone Details:
Tone file is a .wav file with a duration of 1.25 seconds: 750ms silence, then 500ms pure tone.
Tone is assigned through a conditions spreadsheet (the correct tone is playing) using a variable called $tone_file
Set every repeat is selected
Sync start with screen is checked (default)
All other settings are set to default

Psychopy Details: (default if not otherwise noted)
Keyboard Backend: PsychToolbox

Update: I have the same problem (ultra-laggy sound presentation) even when my images are hard-coded (i.e. not based on variables), and when I use Psychopy’s own pure-tone generator.

Any input would be much appreciated!


For anyone in the future with the same issue, I solved mine by generating my sound stimuli in Psychopy instead of loading them in as .wav files.