Firelight Technologies FMOD Studio API
FMOD_SOUND_PCMSETPOS_CALLBACK
Callback for when the caller calls a seeking function such as Channel::setTime or Channel::setPosition.
If the sound is a user created sound, this can be used to seek within the user's resource.
C/C++ Syntax
FMOD_RESULT F_CALLBACK FMOD_SOUND_PCMSETPOS_CALLBACK(
FMOD_SOUND *sound,
int subsound,
unsigned int position,
FMOD_TIMEUNIT postype
);
Parameters
sound
Pointer to the sound. C++ users see remarks.
subsound
In a multi subsound type sound (ie fsb/dls), this will contain the index into the list of sounds.
position
Position to seek to that has been requested. This value will be of format FMOD_TIMEUNIT and must be parsed to determine what it is. Generally FMOD_TIMEUNIT_PCM will be the most common format.
postype
Position type that the user wanted to seek with. If the sound is a user create sound and the seek type is unsupported return FMOD_ERR_FORMAT.
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
C++ Users. Cast FMOD_SOUND *
to FMOD::Sound *
inside the callback and use as normal.
If the callback is used for the purpose of 'piggybacking' normal FMOD sound loads, then you do not have to do anything at all, and it can be treated as purely informational. The return value is also ignored.
See Also
Version 1.10.03 Built on Feb 1, 2018