Search Unity

Audio Process OnAudioRead in realtime?

Discussion in 'Audio & Video' started by RyuMaster, Apr 26, 2017.

  1. RyuMaster

    RyuMaster

    Joined:
    Sep 13, 2010
    Posts:
    468
    Hi! I playback my dynamic audio using AudioClip.Create() and then OnAudioRead()

    It all plays fine, but the problem is, that all realtime changes I do with audio data inside OnAudioRead() have latency of 1 or 2 seconds. Those changes are based on character position, so once I move around the scene, I do not get immediate feedback, but only delayed one.

    Are there any settings I could play with to work around that issue?
     
  2. rorywalsh

    rorywalsh

    Joined:
    Apr 10, 2015
    Posts:
    114
    Did you try setting your audio settings DSP buffer size to best performance?
     
  3. DaveHoskins

    DaveHoskins

    Joined:
    Sep 9, 2013
    Posts:
    190
    Hmm, it sounds like you want a time machine? :D

    Are you using an FFT or in other words - why is there latency?