Firelight Technologies FMOD Studio API
FMOD_CODEC_SETPOSITION_CALLBACK
Seek callback for the codec for when FMOD tries to seek within the file with Channel::setPosition.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_CODEC_SETPOSITION_CALLBACK(
FMOD_CODEC_STATE *codec_state,
int subsound,
unsigned int position,
FMOD_TIMEUNIT postype
);
Parameters
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.
Return Values
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.
Remarks
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:
- The user may have set their own file system via user filesystem callbacks.
- FMOD allows file reading via disk, memory and TCP/IP. If you use your own file routines you will lose this ability.
Remember to return FMOD_OK at the bottom of the function, or an appropriate error code from FMOD_RESULT.
See Also
- Channel::setPosition
- FMOD_CODEC_STATE
- FMOD_CODEC_DESCRIPTION
- FMOD_CODEC_OPEN_CALLBACK
- FMOD_CODEC_CLOSE_CALLBACK
- FMOD_CODEC_READ_CALLBACK
- FMOD_CODEC_GETLENGTH_CALLBACK
- FMOD_CODEC_GETPOSITION_CALLBACK
- FMOD_CODEC_SOUNDCREATE_CALLBACK
Version 1.10.03 Built on Feb 1, 2018