Channel::getDSPClock

FMOD Studio API

Firelight Technologies FMOD Studio API

Channel::getDSPClock

Retrieves the DSP clock values which count up by the number of samples per second in the software mixer, i.e. if the default sample rate is 48KHz, the DSP clock increments by 48000 per second.

C++ Syntax

FMOD_RESULT Channel::getDSPClock(
  unsigned long long *dspclock,
  unsigned long long *parentclock
);

C Syntax

FMOD_RESULT FMOD_Channel_GetDSPClock(
  FMOD_CHANNEL *channel,
  unsigned long long *dspclock,
  unsigned long long *parentclock
);

C# Syntax

RESULT Channel.getDSPClock(
  out ulong dspclock,
  out ulong parentclock
);

JavaScript Syntax

Channel.getDSPClock(
  dspclock,                        // writes value to dspclock.val
  parentclock                      // writes value to parentclock.val
);

Parameters

dspclock
Address of a variable to receive the DSP clock value for the head DSP node.
parentclock
Address of a variable to receive the DSP clock value for the tail DSP node.

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

Use result with ChannelControl::setDelay to play a sound on an exact tick in the future, or stop it in the future.

Note that when delaying a channel or channel group you want to sync it to the parent channel group DSP clock value, not its own DSP clock value.

See Also




Version 1.10.03 Built on Feb 1, 2018