Unity Recorder script (from Scripting Examples) has few seconds of delay

Hi,

I’m trying to record gameplay with the Unity Recorder. I was pleased to see that there is now a scripting example that should allow to record the sound from FMOD. It does record sound, but it’s very much delayed (Example - the light dots should match the sound).

Here is what I did:

  1. Copy-pasted the code from here in a script in my project (Simply renamed the class)
  2. Added it to an empty GameObject in my scene
  3. Added an AudioListener to the same gameObject
  4. Enabled Unity Audio
  5. Set the Unity Audio Sample Rate to 48.000 (same as FMOD audio)
  6. Hit play
  7. I can hear the sound in double as planned, tho one of them is delayed by ~1 sec
  8. Started recording with Unity Recorder. In the video output, sound is delayed by a few seconds.

Settings:

I also tried the script on a different project on a different computer, same result.

Am I missing something, or is the script broken?

As a side note, the fact that FMOD struggles to work with Unity’s Recorder is a very big deal for us. I know that it’s 50% from your side and 50% from Unity’s side, but I believe that two tools that are both used hand in hand for a large portion of their users could figure something out together…