[−][src]Function libeyelink_sys::eyelink_playback_start
pub unsafe extern "C" fn eyelink_playback_start() -> INT16
@ingroup playback Flushes data from queue and starts data playback. An EDF file must be open and have at least one recorded trial. Use \c eyelink_wait_for_data() to wait for data: this will time out if the playback failed. Playback begins from start of file or from just after the end of the next-but-last recording block. Link data is determined by file contents, not by link sample and event settings.
@return \c 0 if command sent OK, else link error.
\b Example:
\code #include#include set_offline_mode(); // set up eye tracker for playback eyelink_playback_start(); // start data playback if(!eyelink_wait_for_block_start(2000, 1, 1)) { printf("ERROR: playback data did not start!"); return -1; } while(1) // Loop while data available { if(escape_pressed() || break_pressed() || eyelink_last_button_press(NULL)) { eyelink_playback_stop(); // stop playback return 0; } i = eyelink_get_next_data(NULL); // check for new data item if(i==0) // 0: no new data { // Checks if playback has completed if((eyelink_current_mode() & IN_PLAYBACK_MODE)==0) break; } ... ... } eyelink_playback_stop(); \endcode
\sa \c eyelink_playback_stop() and \c eyelink_wait_for_block_start()