Need details for SCHEDULE_DELAY and SCHEDULE_LOOKAHEAD

I’m trying to figure out how do I

  1. Play an event but with an intended delay (For example, making a networked music jam with network latency considered)
  2. Play multiple events in sync

I noticed there are two properties that might be related to what I want:

FMOD_STUDIO_EVENT_PROPERTY_SCHEDULE_DELAY, /* Schedule delay to synchronized playback for multiple tracks in DSP clocks, or -1 for default. /
FMOD_STUDIO_EVENT_PROPERTY_SCHEDULE_LOOKAHEAD, /
Schedule look-ahead on the timeline in DSP clocks, or -1 for default. */

But I cannot understand them by reading the comments. Here’s my questions:

  1. For SCHEDULE_DELAY, does it take an absolute DSP clock time, or a relative time span?
    a. If it’s taking absolute DSP clock time, how can I get the current DSP time?
    b. If it’s a relative time span, what does it base on? The DSP time when I call EventInstance::start() function? Will the system introduce more delay in addition to the specified delay? Also, how can I make “synchronized playback for multiple tracks” if the delay is based on each event’s own start() time?
  2. What does “schedule look-ahead” mean exactly? Will setting it delay the event play, or making the event skip the beginning and seek ahead when it plays?

Thanks,

There isn’t really anything built into FMOD that does what you want to do, start an Event with a delay.

SCHEDULE_DELAY and SCHEDULE_LOOKAHEAD are reffering to the internal FMOD schedule system, which is used to prepare Events for playback.

We don’t currently have a lot of information on the schedule system, we are working on more whitepapers for our current docs, but this would not be the recommended way of trying to play an Event with a delay.

Currently you would need to create a system to manage this in game.