Firelight Technologies FMOD Studio API
Seek callback for the codec for when FMOD tries to seek within the file with Channel::setPosition.
FMOD_RESULT F_CALLBACK FMOD_CODEC_SETPOSITION_CALLBACK(
FMOD_CODEC_STATE *codec_state,
int subsound,
unsigned int position,
FMOD_TIMEUNIT postype
);
codec_state
Pointer to the codec state. The user can use this variable to access runtime plugin specific variables and plugin writer user data.
subsound
Subsound within which to seek.
position
Position to seek to in the sound based on the timeunit specified in the postype parameter.
postype
Timeunit type of the position parameter. This will be one of the timeunits supplied by the codec author in the FMOD_CODEC_DESCRIPTION structure.
If the function succeeds then the return value is FMOD_OK.
If the function fails then the return value will be one of the values defined in the FMOD_RESULT enumeration.
Read and seek within the file using the 'fileread' and 'fileseek' members of the FMOD_CODEC codec that is passed in.
Note: DO NOT USE YOUR OWN FILESYSTEM.
The reasons for this are:
Remember to return FMOD_OK at the bottom of the function, or an appropriate error code from FMOD_RESULT.
Version 1.03.06 Built on Apr 17, 2014