Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cleanUp.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
% Screen Close All
sca;

% Close Psychportaudio if open
if PsychPortAudio('GetOpenDeviceCount') ~= 0
PsychPortAudio('Close');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I might have merged too quickly.

Do you think that the if is necessary?

Can we just not do a psychportaudio(close)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should work anyway. I used that because biased by macs behavior where if you close things that were not opened it crashes badly, e.g. using sca or close all at the beginning of a ptb experiment. But I could be wrong in the case of psychportaudio.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK let's keep it that way then. :-)

end

if ~ismac
% remove PsychDebugWindowConfiguration
clear Screen
Expand Down