I’m having an issue with intermittent problems with sounddevice. A majority of the time I call it (see the minimal example below), I get a horrible sound that plays continuously. It starts as soon as line 151 of backend_sounddevice.py is called:
I imagine it has to do with starting the stream at the beginning of the experiment, as mentioned in this thread. This is further supported by “test.play()” working, but only creating a tone on-top-of the noise.
Stranger, this error doesn’t happen every time. Sometimes I run the code below and it is perfectly silent until I run “test.play()”, which results in a simple tone, as it should. Occasionally an error is printed out (but not every time)
invalid value encountered in multiply toSpk *= 0 # it starts with the contents of the buffer before
from psychopy import prefs prefs.general['audioLib'] = ['sounddevice'] from psychopy import visual, core, event, sound test = sound.Sound()
Relevant environment details:
Thanks for any help!