How to calculate audio input and output latency?

Please discuss general Delphi programming topics here.

How to calculate audio input and output latency?

Postby Darko8 » August 31st, 2008, 1:05 pm

Hello,

I wonder how to get DX audio output buffer size so I can predict when will sound arrive.
I'm playing sound output through DXAudioOut component and I record another one back from microphone with help of waveaudio TLiveAudioRecorder.

I need to align recorded sound internally with played buffer, so I can analyze how different it is, but I need to know how delayed it is because of DX output buffer size, Win mixer size, input buffer size...

I found only answers like: usually win mixer buffer is 20-30ms, DX audio latency is 25-150ms, ..., but I need sample accurate information of how delayed is directX sound output and how delayed is waveaudio Liverecorder input (is it always delayed only one buffer size, and is it arriving in exact time??).

Same problem exists if someone wants to make multitrack sound recorder, where previously recorded audio needs to be aligned with new recorded track.

Any comments appreciated :)
Darko8
Member
Member
 
Posts: 1
Joined: August 31st, 2008, 12:40 pm

Postby Kambiz » September 8th, 2008, 1:19 am

Delays in components of WaveAudio package (both players and recorders) are only one buffer size.

I don't know answer to your other questions, sorry.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2421
Joined: March 7th, 2003, 7:10 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron