# Get the latency reported by the audio drivers

**URL:** <https://qa.fmod.com/t/get-the-latency-reported-by-the-audio-drivers/14097>\
**Category:** FMOD Engine\
**Created:** [September 12, 2018, 11:21pm UTC](https://qa.fmod.com/t/get-the-latency-reported-by-the-audio-drivers/14097 "2018-09-12T23:21:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ott](https://avatars.discourse-cdn.com/v4/letter/o/97f17d/32.png) [@ott](https://qa.fmod.com/u/ott)\
**Post date:** [September 12, 2018, 11:21pm UTC](https://qa.fmod.com/t/get-the-latency-reported-by-the-audio-drivers/14097/1 "2018-09-12T23:21:39Z")

</div>

Is there a way I can query the audio drivers (WASAPI, ALSA, etc) what their latency is? There’s System::getDSPBufferSize(), but that’s only for FMOD’s internal mixer stuff. Even if I need to provide manual support for each platform, I need to be able to query the driver latency so I can compensate for it in a rhythm game.

---

<div class="post-metadata">

**Author:** ![richard\_simms](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/richard_simms/32/261_2.png) [@richard\_simms](https://qa.fmod.com/u/richard_simms)\
**Post date:** [September 14, 2018, 12:13am UTC](https://qa.fmod.com/t/get-the-latency-reported-by-the-audio-drivers/14097/2 "2018-09-14T00:13:51Z")

</div>

Hi Ott,

You’re right in that the buffer is set or queried via System::setDSPBufferSize and System::getDSPBufferSize, in the form of a block size and buffer count. This is the main control of latency for you.

Once the audio has been passed down to the OS or hardware there isn’t a way to query the latency through FMOD. Usually the latency is quite low, with the exception of Android.

Thanks,  
Richard
