nrchannels = 2
pahandle1 = PsychPortAudio(‘Open’, [], 1, [], [], nrchannels, [], 0.015);
pahandle2 = PsychPortAudio(‘Open’, [], 1, [], [], nrchannels, [], 0.015);
pahandle3 = PsychPortAudio(‘Open’, [], 1, [], [], nrchannels, [], 0.015);
Get the following error:
PTB-ERROR: Failed to open audio device 3. PortAudio reports this error: Device unavailable
PTB-ERROR: Could not open audio device, most likely because it is already in use by a previous call to
PTB-ERROR: PsychPortAudio(‘Open’, …). You can open each audio device only once per session. If you need
PTB-ERROR: multiple independent devices simulated on one physical audio device, look into use of audio
PTB-ERROR: slave devices. See help for this by typing ‘PsychPortAudio OpenSlave?’.
Error in function Open: Usage error
Audio device unavailable. Most likely tried to open device multiple times.
Error using PsychPortAudio
Usage:
pahandle = PsychPortAudio(‘Open’ [, deviceid][, mode][, reqlatencyclass][, freq][, channels][, buffersize][,
suggestedLatency][, selectchannels][, specialFlags=0]);
Error in PAPI_Pro_main (line 321)
pahandle1 = PsychPortAudio(‘Open’, [], 1, [], [], nrchannels, [], 0.015);
How do I fix it? Already installed all the dependencies to run Psychtoolbox on Linux. Sometimes the PsychPortAudio opens the devise but other time I get this error.