#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 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) |
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.
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.
DVDOpen
DVDRead
DVDReadAsync
DVDSeek(Async)Prio
03/01/2006 Initial version.