DVDSeek
DVDSeekAsync

C Specification

#include <revolution/dvd.h>
typedef void (*DVDCallback)(s32 result, DVDFileInfo* fileInfo);
s32  DVDSeek         ( DVDFileInfo* fileInfo, s32 offset );

BOOL DVDSeekAsync    ( DVDFileInfo* fileInfo, s32 offset, DVDCallback callback );

Arguments

fileInfo File information retrieved by calling the DVDOpen function.
offset Offset position in the file that moves the pickup. Must be a multiple of 4.
callback Address of callback function to notify about the result of the read (only the DVDSeekAsync function)

Return Values

For the DVDSeek function, zero is returned if the command succeeds to complete and a negative value is returned if the command fails to complete.

For the DVDSeekAsync function, TRUE if the command succeeds to issue and FALSE if the command fails to issue.

Description

The DVDSeekAsyncPrio 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 DVDOpen function.

The DVDSeek function is the synchronous version of the DVDSeekAsync function.

Note: 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.

See Also

DVDOpen
DVDRead
DVDReadAsync
DVDSeek(Async)Prio

Revision History

03/01/2006 Initial version.