In your code (setting the option at runtime) you could simply replace pyo with pysoundcard.
In preferences you could add this as an option in the list of audio libs. They get tried in order and if pysoundcard doesn’t exist then one of the others will be used instead
I’ve just been checking and this definitely looks like a bug in the recent version of pyo but only for the ‘coreaudio’ audio driver, not the ‘portaudio’ dirver (which is another preference you can control in PsychoPy).
I’ll let the authors of pro know, but for now you should be able to use either pysoundcard or pyo with portaudio
I tried using pyo with portaudio. It works without crashing and stops after the sound is played. However, I get this warning: > “2016-08-15 08:54:42.255 python[1165:12130] 08:54:42.255 WARNING: 140: This application, or a library it uses, is using the deprecated Carbon Component Manager for hosting Audio Units. Support for this will be removed in a future release. Also, this makes the host incompatible with version 3 audio units. Please transition to the API’s in AudioComponent.h.”
Don’t worry about that warning. It’s irrelevant and the people that write portaudio aleady know about it. They’ve said they don’t intend to change anything for now but they’ll monitor any change by Apple on this.