Firelight Technologies FMOD Studio API
FMOD_CODEC_GETLENGTH_CALLBACK
Callback to return the length of the song in whatever format required when Sound::getLength is called.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_CODEC_GETLENGTH_CALLBACK(
FMOD_CODEC_STATE *codec_state,
unsigned int *length,
FMOD_TIMEUNIT lengthtype
);
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.
length
Address of a variable that is to receive the length of the sound determined by the format specified in the lengttype parameter.
lengthtype
Timeunit type of length to return. 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
Remember to return FMOD_OK at the bottom of the function, or an appropriate error code from FMOD_RESULT.
See Also
- FMOD_TIMEUNIT
- FMOD_CODEC_STATE
- FMOD_CODEC_DESCRIPTION
- FMOD_CODEC_OPEN_CALLBACK
- FMOD_CODEC_CLOSE_CALLBACK
- FMOD_CODEC_READ_CALLBACK
- FMOD_CODEC_SETPOSITION_CALLBACK
- FMOD_CODEC_GETPOSITION_CALLBACK
- FMOD_CODEC_SOUNDCREATE_CALLBACK
Version 1.10.03 Built on Feb 1, 2018