DVDSeek
DVDSeekAsync

Syntax

#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 Information about the file associated by calling the DVDOpen function in advance.
offset Offset position in the file that moves the pickup. Must be a multiple of 4.
callback Address of callback function used to notify about the seek result (only the DVDSeekAsync function).

Return Values

The DVDSeek function returns zero if the command completes successfully, and a negative value if the command fails.

For the DVDSeekAsync function, TRUE is returned if the command is issued successfully and FALSE if the command fails.

Description

The DVDSeekAsync 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 DVDSeekAsync.

Note:Carefully consider 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 cannot be used because there is no way to check errors.

This function may put the current thread to sleep. Refer to Interrupts and Callback Functions.

See Also

DVDOpen, DVDRead, DVDReadAsync, DVDSeek(Async)Prio, Interrupts and Callback Functions

Revision History

2007/09/25 Added an explanation of thread behavior.
2006/03/01 Initial version.


CONFIDENTIAL