Time budget for processing callback buffer

How to use Voicemeeter Remote API and control Voicemeeter Audio Engine
erik.vanhamme
Posts: 8
Joined: Tue Jan 17, 2017 11:46 am

Time budget for processing callback buffer

Postby erik.vanhamme » Fri Jan 27, 2017 7:21 pm

I have my callback registered and working. My sample rate in the whole chain is 96kHz.

The callback receives buffers with a length of 960. Can I assume that the buffer length will always correspond to a 10ms window?

This would put the upper boundary for processing the buffers at 10 ms. I guess VoiceMeeter itself also requires some time from the 10 ms window. How much time do I have to process a buffer in the callback?

Thanks in advance, Erik

Vincent Burel
Site Admin
Posts: 445
Joined: Sun Jan 17, 2010 12:01 pm

Re: Time budget for processing callback buffer

Postby Vincent Burel » Sat Jan 28, 2017 7:11 am

the general DSP rule is that you have the time of the buffer size (count 80% of this time).
and the Voicemeeter Callback Buffer size is given by main stream (output A1) so the buffer size can vary from 128 to 2048 samples according configuration.

Example:
At 96 kHZ if your buffer is 960 samples , you have 10 ms to process these 960 samples
At 48 kHz, if your buffer is 512 samples, you have around 10 ms to process
At 48 kHz, if your buffer is 256 samples, you have around 5 ms to process

if you take more time than the buffering, then you may have a cut in the sound.
(we recommend to not call system function , including synchro function in this callback... for example all allocations / initializations must have been done in start/end step... like with a DSP ).

erik.vanhamme
Posts: 8
Joined: Tue Jan 17, 2017 11:46 am

Re: Time budget for processing callback buffer

Postby erik.vanhamme » Tue Jan 31, 2017 12:07 am

Thank you for the clear info. I was able to make a good start on my project this weekend.


Return to “Voicemeeter Remote API”

Who is online

Users browsing this forum: No registered users and 1 guest