Reduce the latency of the microphone when recording playback on unity?

Viewed 226

Well, I've been researching the last days about how to have a decent microphone playback (or monitoring) on Unity.

Till now, the best things that I've found, converges on the script at the end of this question. The problem is that I'm still having like 0.5 seconds delay... It's there a way to get rid of that?

var aud = this.GetComponent<AudioSource>();
        aud.clip = Microphone.Start(Microphone.devices[0], true, 10, 44100);
        aud.loop = true;
        while (!(Microphone.GetPosition(null) > 0)) { }
        aud.Play();
        

PS: I just attached the script to an AudioSource

Thanks for your time ;)

0 Answers
Related