Hi
Maybe I'm missing something obvious but I get an error in
MaxPriority. I'm using Psychtoolbox 2.44 for Mac on a G3.
Basically I cant get MaxPriority to work if a give it SND as an input
arguement. I think I can work out a simple fix to the problem though.
Here are the details.
If I make the call
from line 102 onwards
if strcmp(name,lower('SND'))
model=SCREEN('Computer');
if sscanf(model,'PowerMac %f',1)==6100
p=3; % on PowerMac 6100 with Mac OS 8.1
else
p=1;
end
priorityLevel=min(priorityLevel,p);
match=1;
end
Since 'model=SCREEN('Computer') returns a structure. I think this is
easily fixed by adding one line ....
if ischar(varargin{i})
name=lower(varargin{i});
if strcmp(name,lower('SND'))
model=SCREEN('Computer');
%%%new line
model=model.model;
%%%
if sscanf(model,'PowerMac %f',1)==6100
p=3; % on PowerMac 6100 with Mac OS 8.1
else
p=1;
end
priorityLevel=min(priorityLevel,p);
match=1;
end
Have I understood what this section of code is doing?
Thanks
Harriet
--
**************************************
Dr. Harriet Allen
McGill Vision Research
Department of Ophthalmology
687 Pine Ave West, H4-14
Montreal
Quebec
Canada H3A 1A1
Tel: (514) 842 1231 ext 4817
Fax: (514) 843 1691
hallen3@...
Maybe I'm missing something obvious but I get an error in
MaxPriority. I'm using Psychtoolbox 2.44 for Mac on a G3.
Basically I cant get MaxPriority to work if a give it SND as an input
arguement. I think I can work out a simple fix to the problem though.
Here are the details.
If I make the call
>Priority=MaxPriority(0,'WaitBlanking','SND');i get the error
>??? Function 'sscanf' not defined for variables of class 'struct'.Which is exactly what I would expect from the code of MaxPriority
from line 102 onwards
>if ischar(varargin{i})name=lower(varargin{i});
if strcmp(name,lower('SND'))
model=SCREEN('Computer');
if sscanf(model,'PowerMac %f',1)==6100
p=3; % on PowerMac 6100 with Mac OS 8.1
else
p=1;
end
priorityLevel=min(priorityLevel,p);
match=1;
end
Since 'model=SCREEN('Computer') returns a structure. I think this is
easily fixed by adding one line ....
if ischar(varargin{i})
name=lower(varargin{i});
if strcmp(name,lower('SND'))
model=SCREEN('Computer');
%%%new line
model=model.model;
%%%
if sscanf(model,'PowerMac %f',1)==6100
p=3; % on PowerMac 6100 with Mac OS 8.1
else
p=1;
end
priorityLevel=min(priorityLevel,p);
match=1;
end
Have I understood what this section of code is doing?
Thanks
Harriet
--
**************************************
Dr. Harriet Allen
McGill Vision Research
Department of Ophthalmology
687 Pine Ave West, H4-14
Montreal
Quebec
Canada H3A 1A1
Tel: (514) 842 1231 ext 4817
Fax: (514) 843 1691
hallen3@...