To demonstrate this, we created a minimal program simulating an audio thread to copy 128 channels in an internal BUS and in 128 delay lines. This is a very simple task done by any DAW working with 128 I/O or Tracks. In term of memory load it is like copying 256 KB every 5 ms in 2 + 128 address ranges. This is a very basic task we were doing on a Pentium I and PC100 RAM in the 90's.
For each frame, the program is measuring time passed to perform these “mem-copy” operations and count incidents when the time is above 80% of the real time. We are simulating a 256 samples buffer real time stream at 48 kHz, so we must process the buffer in less than 5.3ms (80% of 5.3m gives 4.2ms).
As it is shown on the screenshot above, WIN10 can generate big interruption, 186ms as the biggest one detected in less than 20 minutes, is just an eternity for a real time processing task.
REM: The test can be performed on optimal Windows configuration as well by removing maximum Windows options and services (no virtual memory, no onedrive, no win update, no visual effect, power management to max, no firewall, no defender…). The DSP peak problem remains.
To make the test in your computer right now, the program (EXE) can be download directly there:
https://download.vb-audio.com/Download_ ... _v1000.zip
Just run it during some hours (12 or 24h00) or until getting the first incident (will be displayed in red).
The source code of the Real Time Task performed is very simple:
Code: Select all
void MyAudioCallback(LPT_APPCTX lpapp, void * lpBuffer, int nbSample)
{
int * lpSource, *lpTarget;
int vi, fTurn;
//simple BUS Copy (in this example, this is not enough to make appear the problem)
lpSource = (int*)lpBuffer;
lpTarget = lpapp->pInternalBUS2;
for (vi=0;vi<NB_CHANNEL_IN_BUS;vi++)
{
memcpy(lpTarget, lpSource, sizeof(int)*nbSample);
lpSource=lpSource+nbSample;
lpTarget=lpTarget+nbSample;
}
//copy to delay line (we add this regular delay line copy, used in multi track recorder as DTR process for example).
fTurn=0;
lpSource = (int*)lpBuffer;
for (vi=0;vi<NB_CHANNEL_IN_BUS;vi++)
{
lpTarget = lpapp->pDelayLineBuffer[vi];
lpTarget = lpTarget + (lpapp->pDelayLineBuffer_nu[vi] * BUFFER_SIZE);
memcpy(lpTarget, lpSource, sizeof(int)*nbSample);
lpSource=lpSource+nbSample;
lpapp->pDelayLineBuffer_nu[vi]++;
if (lpapp->pDelayLineBuffer_nu[vi] >=DELAYLINE_NB_BUFFER)
{
lpapp->pDelayLineBuffer_nu[vi]=0;
fTurn=1; //count number of memory restart address
}
}
if (fTurn != 0) lpapp->pDelayLineBuffer_turn++;
}
https://download.vb-audio.com/Download_ ... _v1000.zip
CONCLUSION: It seems WIN10 has never been able to support audio streaming correctly up to now, since Microsoft changed something in the memory management that can generate huge time penalty and break any real time processing (audio or video). WIN10 RS4 update (February 2018) is expected to fix this problem. The program above will help us to validate it anyway...