I’m presenting audio stimuli of various volumes trial to trial. To ensure timing with other (visual) stimuli I’m using the example here Sound - for audio playback — PsychoPy v2023.1.2 to preschedule the sound on each trial. The code from that page is in my begin routine block. Some way through the experiment I get a crash with the following error :“OpenSlave: Maximum number of simultaneously open audio devices exceeded”.
I assume this means I should be closing the audio device, or somehow updating one device instead of creating it on each trial. But I’m not sure what to change? Can I tell sound.sound to play (and update its properties) without creating a new slave? It’s called the same thing on each trial so I thought that was sufficient…