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="Microsoft FrontPage 5.0">
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
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">#include &lt;revolution/dvd.h&gt;
18
19typedef void (*DVDCallback)(s32 result, DVDFileInfo* fileInfo);
20
21s32  DVDSeek         ( DVDFileInfo* fileInfo, s32 offset );
22
23BOOL DVDSeekAsync    ( DVDFileInfo* fileInfo, s32 offset, DVDCallback callback );
24</pre></dd></dl>
25
26<h2>Arguments</h2>
27<TABLE class="arguments" border="1" >
28  <tr>
29<TH>fileInfo</TH>
30<TD>Information about the file associated by calling the <A href="DVDOpen.html"><CODE>DVDOpen</CODE></A> function in advance.</TD>
31    </tr>
32  <tr>
33<TH>offset</TH>
34<TD>Offset position in the file that moves the pickup. Must be a multiple of 4.</TD>
35    </tr>
36  <tr>
37<TH>callback</TH>
38<TD>Address of callback function used to notify about the seek result (only the <CODE>DVDSeekAsync</CODE> function).</TD>
39    </tr>
40</TABLE>
41
42<h2>Return Values</h2>
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, <CODE>TRUE</CODE> is returned if the command is issued successfully and <CODE>FALSE</CODE> if the command fails.</P>
45
46<H2>Description</H2>
47<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>
48<P>The <CODE>DVDSeek</CODE> function is the synchronous version of <CODE>DVDSeekAsync</CODE>.</P>
49<P><strong><B>Note:</B></strong>Carefully consider the use of a synchronous function in a real game. Synchronous functions&nbsp;can only be used in a multithreaded game. In single thread games, synchronous functions cannot be used because there is no way to check errors.</P>
50
51<p>This function may put the current thread to sleep. Refer to <a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>.</p>
52
53<h2>See Also</h2>
54<p class="reference">
55<A href="DVDOpen.html">DVDOpen</A>,
56<A href="DVDRead.html">DVDRead</A>,
57<A href="DVDReadAsync.html">DVDReadAsync</A>,
58<A href="DVDSeekPrio.html">DVDSeek(Async)Prio</A>,
59<a href="../os/Interrupt/intro.html">Interrupts and Callback Functions</a>
60</p>
61
62<H2>Revision History</H2>
63<P>
642007/09/25 Added an explanation of thread behavior. <BR>2006/03/01 Initial version.<BR>
65</P>
66
67<hr><p>CONFIDENTIAL</p></body>
68</html>