Teensy as USB Audio interface for Mic / Line in

Status
Not open for further replies.

sonaben

Member
Hello,

I'd like to use the Teensy as a USB Audio interface for a microphone, and I've made some tests with the Audio board and this simple design:

usb.PNG

It works fine but the latency is really important (around 100ms) even if I use the mic with Asio4all setting a low buffer.

(In comparison my Roland Quad Capture interface has a latency of about 6 ms with 256b buffer)

Could you please explain where the latency may come from and what's the best way to reduce it to the minimum?

Thanks!

Ben
 
Thanks Mark, I also think it's most likely a driver issue.
However I don't know how the USB interface is created by the Teensy and how it provides the data transfer, and I wonder if there could be a cause of latency there.

If anyone knows that would be much appreciated.

Cheers
 
The latency on the Teensy side should under 7ms. The USB audio code buffers up to 256 samples, which is 5.8ms. It sends asynchronous rate feedback to your PC which attempts to keep the buffer at approximately 50% used. So the buffering delay should normally be about 2.9ms, but it could be has high as 5.8ms if your PC has been consuming slower then Teensy is producing, forcing Teensy to buffer more samples as it asks your PC to consume them slightly faster.

There is also small & unavoidable hardware delay in the analog to digital conversion, before Teensy gets the digital data from the SGTL5000 chip. In the thread Frank mentioned in msg #2, it was reported as 0.25 ms. I've heard other people claim seeing about half a millisecond. This small delay is a fundamental part of the filtering used with sigma-delta modulation that powers virtually all audio A/D conversion.
 
Status
Not open for further replies.
Back
Top