Failed to open PortAudio audio device Error

Hello. This is a post similar to another post from July 2020, but I still have not found the exact resolution to it.

My experiment involves playing of audio files as a tone to indicate the presentation of a stimulus.
While the tone plays fine if there is no external audio device (such as headphones) connected to the computer, when an external audio device is connected to the computer, the error listed in the title of this post appears instead.

I checked the past forum post, but as stated previously, the solution stated was just not to use one.

Is there any way to resolve this so that people are able to use external audio devices?

Any help would be greatly appreciated.

Thank you for reading, and even if you do not have a solution, I hope that you have a wonderful day.

  • Justin Hannah