Varying device latency for ASIO Device

4 views (last 30 days)
Sebastian
Sebastian on 18 Jun 2025
Commented: Sebastian on 19 Jun 2025
Hi,
my goal is to measure impulse responses using Matlab and an ASIO device. I encountered the problem, that for different runs of my code, the peak of my impulse response is at a different location on the time axis. I was able to reproduce this behavior outside of my code in the "Impulse Respones Measurer". Looping back the output channel to an input channel and capturing a fiew imulse reponses while leaving everything else untouched gives me shifted impulse responses.
I also followed this example: Measure Audio Latency, which gave me the same results.
When measuring the same impulse response (i.e. same device, same configuration of channels etc.) with another software (REW), the delay remained constant between different runs.
I was also able to reproduce this behavior vor R2020a and R2024b
Any suggestions how to keep a constant latency between several runs of audioPlayerRecorder are appreciated.
Kind Regards,
Sebastian

Answers (1)

Jimmy Lapierre
Jimmy Lapierre on 18 Jun 2025
This is not the usual behavior for ASIO. Does X-AIR allow you to select the buffer size (samples per frame) ? You should make sure that it matches what is shown here (for example, 1024).
  3 Comments
Jimmy Lapierre
Jimmy Lapierre on 19 Jun 2025
Hi Sebastian, another tip for the X-Air is if you have a spare input and output channel for a loopback cable or you are measuring something like this where the impulse is pretty clean, you can use the "latency compensation" option (and then use the Display button to display with or without latency). This will measure latency first before the actual measurement but as part of the same sequence, so you would be able to account for it.
Sebastian
Sebastian on 19 Jun 2025
Hi Jimmy,
Thanks again for the reply! I actually had the same idea, since I do have some spare channels available. Thats more a workaround than a solution, but for me it will do the trick.

Sign in to comment.

Categories

Find more on Code Generation and Deployment in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!