#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 );
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). |
The DVDSeek function returns zero if the command completes successfully and a negative value if the command fails.
For the DVDSeekAsync function, returns TRUE if the command succeeds to issue and FALSE if the command fails to issue.
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 the DVDSeekAsync function.
Note: 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.
The DVDSeek function may put the current thread to sleep. Refer to Interrupts and Callback Functions.
DVDOpen
DVDRead
DVDReadAsync
DVDSeek(Async)Prio
Interrupts and Callback Functions
2007/09/25 Added an explanation of thread behavior and corrected typos.
2006/03/01 Initial version.
CONFIDENTIAL