I’m trying to figure out how do I
- Play an event but with an intended delay (For example, making a networked music jam with network latency considered)
- 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:
- 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? - 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,