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
Time budget for processing callback buffer
-
- Posts: 8
- Joined: Tue Jan 17, 2017 11:46 am
-
- Site Admin
- Posts: 2136
- Joined: Sun Jan 17, 2010 12:01 pm
Re: Time budget for processing callback buffer
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 ).
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 ).
-
- Posts: 8
- Joined: Tue Jan 17, 2017 11:46 am
Re: Time budget for processing callback buffer
Thank you for the clear info. I was able to make a good start on my project this weekend.