Music Timing System

Hi Penguin,

The problem is running two audio events synced together. Input latency is not a worry as input is controller driven and so latency will be incredibly low (no audio processing). When devs talk about controller latency, they are referring to input + visual output latency (including things like screen refresh rates, like you said). Frame rate is variable, so nothing should be based off this.
Audio software such as ProTools and Logic run graphics and audio engines separately, with the graphics engine lagging behind the audio and exclusively drawing to the screen. The audio engine handles all other functions (user input, pluggin processing etc.) to keep sync.

From experience, 25ms+ is noticeable lag from input to audio out. And adding 5ms to a synced audio stream is very noticeable.

UE4 already bases it’s delta time off the framerate avoid accumulative latency across the whole game.

The problem in this thread was just getting a clock, from within the engine, accurate enough to keep tempo with an internal music stream. Most likely this would require a separate, high priority, audio engine that receives commands from the main game engine. That or just a real clock in UE4 (>.<)

P.S Teed. I suggested 1ms as a very fast transition that doesn’t cause pops due to low frequency waveforms being cut in the middle of a cycle. Anything would be OK really.