MATLAB 程式設計/Psychtoolbox/螢幕命令/偏好設定
外觀
用法
boolean=Screen('Preference','Backgrounding')
oldBoolean=Screen('Preference','IgnoreCase',[boolean])
psychTableVersion=Screen('Preference','PsychTableVersion')
mexFunctionName=Screen('Preference','PsychTableCreator')
oldPriority=Screen(windowPtrOrScreenNumber,'Preference','MaxPriorityForBlankingInterrupt',priority)
oldBoolean=Screen(windowPtrOrScreenNumber,'Preference','WaitBlankingUsesInterrupt',[boolean])
bits=Screen(windowPtrOrScreenNumber,'Preference','ClutDacSize')
boolean=Screen(windowPtrOrScreenNumber,'Preference','FixedClut')
oldBoolean=Screen(windowPtrOrScreenNumber,'Preference','SetClutDriverWaitsForBlanking',[boolean])
oldBoolean=Screen(windowPtrOrScreenNumber,'Preference','SetClutQuickly',[boolean])
oldBoolean=Screen(windowPtrOrScreenNumber,'Preference','SetClutCallsWaitBlanking',[boolean])
oldFrames=Screen(windowPtrOrScreenNumber,'Preference','SetClutSimulatesBlankingInterrupts',[frames])
獲取/設定各種偏好設定。前四個是通用的,其餘與WaitBlanking或SetClut相關,並且是特定於螢幕的。布林值為 1(非零)表示是,0 表示否。偏好設定是易失性的:它們在您第一次使用每個螢幕時由 SCREEN 設定,並且在關閉最後一個 SCREEN 視窗時被清除(例如,透過Psychtoolbox:Screen Commands:Close,Psychtoolbox:Screen Commands:CloseAll,或透過鍵入clear screen來清除 SCREEN.mex)。因此,在呼叫“OpenWindow”之後進行任何偏好設定。
警告:這些設定允許您訪問所有確定 SCREEN 行為的內部引數。因此,引數集一直在不斷變化,因為 SCREEN 正在不斷發展以應對不斷變化的環境(例如,不等待 blanking 的影片驅動程式和 Rush 的高優先順序)。
您可以隨意使用這些專家控制,但是,如果您確實使用它們,請意識到您可能需要在每次 PsychToolbox 新版本釋出時調整您的“Preference”呼叫。
- SetClutDriverWaitsForBlanking 報告顯示器的影片驅動程式是否等待 blanking。通常是隻讀的,您也可以在 PowerMac 7300/7500/7600/8500/8600 內建驅動程式上設定/清除它。
- SetClutQuickly 指定您是否使用自定義 SetEntriesQuickly.c 驅動程式(如果該裝置可用)來代替標準影片驅動程式的偏好設定。SetEntriesQuickly 驅動程式不等待 blanking。
- SetClutCallsWaitBlanking 確定是否應在每次呼叫 SetClut 後呼叫 WaitBlanking。
- SetClutSimulatesBlankingInterrupts 設定/獲取每次 SetClut 後模擬的 blanking 中斷次數,以彌補 SetClut 呼叫期間丟失的中斷。
- WaitBlankingUsesInterrupt 指定是否應使用 SetClut(原始驅動程式)或螢幕的 blanking 中斷來等待 blanking 的偏好設定。請參見“WaitBlanking”。
- MaxPriorityForBlankingInterrupt 指定硬體 blanking 中斷仍然有效的最大優先順序。通常情況下,這是 1,但如果需要在 3 毫秒的時間間隔內對 spurious VBL 中斷進行計時(在此時間間隔內, spurious VBL 中斷將被忽略),則會降至 0.5(在非 PCI Mac 上)。您的程式可以覆蓋此設定,但您的計算機可能會掛起,除非您真正瞭解自己在做什麼。