Huge round trip latency when running tutorial code


#1

Hey everyone. First of all, thanks for being involved in this really helpful community. I just started using JUCE this weekend.

I’m currently on the “processing audio input” JUCE tutorial, and have a Focusrite 2i2 audio interface connected to my computer. However, when I send an input into this interface, the round trip delay is huge. I haven’t changed anything about the tutorial code; I just ran it after opening it. After using the AudioDeviceManager class to check the details about my audio device, I have:
Audio Device Type: Windows Audio
Audio Device: Focusrite USB (Focusrite USB Audio)
Sample rate: 48,000 Hz
Block size: 480 samples
Output Latency: 480 samples
Input Latency: 480 samples

My guess is that although it recognizes the Focusrite interface, it’s not using the ASIO drivers for it. (I’m assuming audio device type would say ASIO if it was using the correct driver, although I may be wrong).

If my guess is right, please let me know how to select the correct ASIO driver for my audio interface. If not, please let me know what you think might be causing the huge round trip latency.

Thanks so much for taking the time to read this.


#2

You should be able to reduce the buffer size from 480 to something lower without using ASIO, but if you just enable the JUCE_ASIO flag in the projucer project you’ll be able to build with support for that.