1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 6.5.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css"> 9<title>DVDSeek</title> 10</head> 11 12<body> 13 14<h1>DVDSeek<BR>DVDSeekAsync</h1> 15<h2>C Specification</h2> 16 17<dl> 18<dd><pre><code>#include <revolution/dvd.h></code></pre> 19 <dd> 20<PRE><CODE>typedef void (*DVDCallback)(s32 result, DVDFileInfo* fileInfo);</CODE></PRE> 21<dd><pre><CODE>s32 DVDSeek ( DVDFileInfo* fileInfo, s32 offset ); 22 23BOOL DVDSeekAsync ( DVDFileInfo* fileInfo, s32 offset, DVDCallback callback );</CODE></pre> 24</dl> 25 26<h2>Arguments</h2> 27<TABLE border="1" cellpadding="3" cellspacing="0.1"> 28 <tr> 29<TD width="120" bgcolor="#ffffe8"><em><strong><code>fileInfo</code></strong></em></TD> 30<TD width="520">File information retrieved by calling the <A href="DVDOpen.html"><CODE>DVDOpen</CODE></A> function.</TD> 31 </tr> 32 <tr> 33<TD width="120" bgcolor="#ffffe8"><em><strong><code>offset</code></strong></em></TD> 34<TD width="520">Offset position in the file that moves the pickup. Must be a multiple of 4.</TD> 35 </tr> 36 <tr> 37<TD width="120" bgcolor="#ffffe8"><em><strong><code>callback</code></strong></em></TD> 38<TD width="520">Address of callback function to notify about the result of the read (only the <code>DVDSeekAsync</code> function).</TD> 39 </tr> 40</TABLE> 41<h2>Return Values</h2> 42 43<P>The <CODE>DVDSeek</CODE> function returns zero if the command completes successfully and a negative value if the command fails.</P> 44<P>For the <code>DVDSeekAsync</code> function, returns <CODE>TRUE</CODE> if the command succeeds to issue and <CODE>FALSE</CODE> if the command fails to issue.</P> 45<H2>Description</H2> 46<P>The <CODE>DVDSeekAsync</CODE> function asynchronously moves the drive pickup. Moving the pickup ahead of the read operation can reduce the reading time. The file should have previously been opened with the <A href="DVDOpen.html"><CODE>DVDOpen</CODE></A> function.</P> 47<P>The <CODE>DVDSeek</CODE> function is the synchronous version of the <CODE>DVDSeekAsync</CODE> function.</P> 48<P><strong><B>Note:</B></strong> Be careful if you are considering the use of a synchronous function in a real game. synchronous functions can only be used in a multithreaded game. In single thread games, synchronous functions can't be used because there is no way to check errors.</P> 49 50<p>The <CODE>DVDSeek</CODE> function may put the current thread to sleep. Refer to <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>.</p> 51 52<h2>See Also</h2> 53 54<p><CODE><A href="DVDOpen.html">DVDOpen</A><BR> <A href="DVDRead.html">DVDRead</A><BR> <A href="DVDReadAsync.html">DVDReadAsync</A><BR> <A href="DVDSeekPrio.html">DVDSeek(Async)Prio</A></CODE><BR> <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a></p> 55<H2>Revision History</H2> 56<P>2007/09/25 Added an explanation of thread behavior and corrected typos.<BR> 2006/03/01 Initial version.</P> 57<hr><p>CONFIDENTIAL</p></body> 58</html> 59