Firelight Technologies FMOD Studio API
ChannelGroup::setDelay
Sets a start (and/or stop) time relative to the parent channel group DSP clock, with sample accuracy.
C++ Syntax
FMOD_RESULT ChannelGroup::setDelay(
unsigned long long dspclock_start,
unsigned long long dspclock_end,
bool stopchannels
);
C Syntax
FMOD_RESULT FMOD_ChannelGroup_SetDelay(
FMOD_CHANNELGROUP *channelgroup,
unsigned long long dspclock_start,
unsigned long long dspclock_end,
FMOD_BOOL stopchannels
);
C# Syntax
RESULT ChannelGroup.setDelay(
ulong dspclock_start,
ulong dspclock_end,
bool stopchannels
);
JavaScript Syntax
ChannelGroup.setDelay(
dspclock_start,
dspclock_end,
stopchannels
);
Parameters
- dspclock_start
- DSP clock of the parent channel group to audibly start playing sound at, a value of 0 indicates no delay.
- dspclock_end
- DSP clock of the parent channel group to audibly stop playing sound at, a value of 0 indicates no delay.
- stopchannels
- TRUE = stop according to ChannelControl::isPlaying. FALSE = remain 'active' and a new start delay could start playback again at a later time.
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
Every channel and channel group has its own DSP Clock. A channel or channel group can be delayed relatively against its parent, with sample accurate positioning. To delay a sound, use the 'parent' channel group DSP clock to reference against when passing values into this function.
If a parent channel group changes its pitch, the start and stop times will still be correct as the parent clock is rate adjusted by that pitch.
See Also
Version 1.10.03 Built on Feb 1, 2018