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><STRONG><EM><CODE>offset</CODE></EM></STRONG></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>For the <code>DVDSeek</code> function, zero is returned if the command succeeds to complete and a negative value is returned if the command fails to complete.</P> 44<P>For the <code>DVDSeekAsync</code> function, <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>DVDSeekAsyncPrio</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>Note:</strong> 49 Take care if you plan to use a synchronous function in a real game program. 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> 50 51<h2>See Also</h2> 52 53<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></p> 54<H2>Revision History</H2> 55<P>03/01/2006 Initial version.</P> 56</body> 57</html> 58