# problem with PsychPortAudio

**URL:** <https://psychtoolbox.discourse.group/t/problem-with-psychportaudio/1459>\
**Category:** Uncategorized\
**Created:** [September 8, 2019, 12:33pm UTC](https://psychtoolbox.discourse.group/t/problem-with-psychportaudio/1459 "2019-09-08T12:33:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kermani\_mojtaba](https://avatars.discourse-cdn.com/v4/letter/k/e9a140/32.png) [@kermani\_mojtaba](https://psychtoolbox.discourse.group/u/kermani_mojtaba)\
**Post date:** [September 8, 2019, 12:33pm UTC](https://psychtoolbox.discourse.group/t/problem-with-psychportaudio/1459/1 "2019-09-08T12:33:41Z")

</div>

Hi everyone

I've started using "Psychtoolbox-3-PTB\_Beta-2019-08-07\_V3.0.16" and since then I cant use PsychPortAudio, I', getting the error below. Weird thing is that when I setup Psychtoolbox with "SetupPsychtoolbox" I can use PsychPortAudio only once and after that, I get this error.&nbsp;

any Idea how can I fix it?

Thanks

PTB-ERROR: Failed to open audio device -1. PortAudio reports this error: Invalid device&nbsp;

INTERNAL PSYCHTOOLBOX ERROR

error:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PsychError\_system

general description:&nbsp; Error reported by a system call

specific description: Failed to open PortAudio audio device.

module name:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PsychPortAudio

subfunction call:&nbsp; &nbsp; &nbsp;Open

file name:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; C:\Users\Mario Kleiner\Documents\GitHub\Psychtoolbox-3\PsychSourceGL\Source\Common\PsychPortAudio\PsychPortAudio.c

function name:&nbsp; &nbsp; &nbsp; &nbsp; PSYCHPORTAUDIOOpen

line number:&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2889
