Issues with PsychPortAudio on macOS 11

Hi everyone!

I am very new to using PsychToolbox and have had some issues with PsychPortAudio specifically.

The laptop I am using operates on macOS Big Sur 11.6

I tried to run a script that uses PsychPortAudio to play a certain audio stimulus but kept getting an error message. I subsequently tried running the BasicSoundOutputDemo but got the same error. As I was not able to open my audio file in neither the first script I tried nor the demo, I resorted to trying the default audio file in the demo and still got the same error message which I have posted here:

PTB-ERROR: Desired audio parameters for device -1 unsupported by audio device: Internal PortAudio error
PTB-ERROR: This could be, e.g., due to an unsupported combination of audio sample rate, audio channel count/allocation, or audio sample format.
Error in function Open: Usage error
Failed to open PortAudio audio device due to unsupported combination of audio parameters.
Error using PsychPortAudio
Usage:

pahandle = PsychPortAudio(‘Open’ [, deviceid][, mode][, reqlatencyclass][, freq][, channels][, buffersize][, suggestedLatency][,
selectchannels][, specialFlags=0]);

Error in BasicSoundOutputDemo (line 88)
pahandle = PsychPortAudio(‘Open’, device, [], 0, freq, nrchannels);

I did notice that PsychToolbox was not officially supported for macOS 11 so I’m not sure whether this is just a compatibility issue that I can’t resolve or if it could be fixed with a few changes to the script.

I’d really appreciate any help/advice and thanks in advance!

There was a recent commit in Mario’s development branch updating PortAudio to the latest version which will be available in the next public release. Perhaps this will solve your problem — at least on my mid2015 Macbook Pro with macOS 11.6 sound output is working fine with Mario’s latest development branch…

1 Like

Okay, thank you very much! Do you by any chance know when this update will become available?

Released. UpdatePsychtoolbox.
-mario

1 Like

Amazing, thank you very much! Just tried it out again and everything seems to be working great!!

Good that it worked.

The best way to thank us is for your lab and other macOS using labs to buy a community membership for 150 Euros to express thankfulness in tangible goods that help keep PTB alive. E.g., fixing these latest macOS PsychPortAudio problems due to Apples faulty work did cost us more than a full work day and more than 1000 Euros in work time.

Given the costs of keeping PTB for macOS sort of functional despite Apple working constantly against us, and the general lack of financial support from our user community, we will have to consider if terminating PTB for macOS wouldn’t make a lot of business sense.

Best,
-mario