/usr/share/psychtoolbox-3/Psychometric/GiveFeedback.m is in psychtoolbox-3-common 3.0.11.20140816.dfsg1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | function GiveFeedback(correct)
% GiveFeedback(correct)
%
% Give auditory feedback about correctness of respose. One beep for
% correct, two beeps for incorrect. Some labs (e.g. dgp) prefer
% a short beep for correct, no sound for incorrect. One could
% easily add a flag to this routine to allow this behavior.
%
% 3/5/97 dhb Wrote it
% 1/25/00 emw Added platform conditionals
% 3/8/2000 dgp Fixed platform conditionals
% 4/14/00 dhb Fix call to Snd for windows.
% 4/13/02 dgp Eliminate obsolete calls to SndPlay. Just call Snd on both platforms.
% It's important to specify the sample rate, because the default is
% platform-dependent.
% 11/15/03 dhb Wait for sound to complete before returning. Failure to do so
% was causing problems when Snd('Close') was called by calling
% routine.
if correct
Snd('Play',sin(1:3:200),8192);
else
Snd('Play',sin(1:3:200),8192);
WaitSecs(0.1);
Snd('Play',sin(1:3:200),8192);
end
Snd('Wait');
|