Community
cancel
Showing results for 
Search instead for 
Did you mean: 
franknatoli
New Contributor I
56 Views

WinMMAudioRenderer Pegs CPU

Windows Task Manager shows a 100% CPU hit when the WinMMAudioRenderer is initialized as follows:

UMC::FWAudioRenderParams audioRenderParams;
audioRenderParams.info = *audioTrackInfo;
audioRenderParams.pModuleContext = NULL;
audioRenderParams.pOutFile = NULL;

UMC::WinMMAudioRender audioRender;
audioRender.Init(&audioRenderParams);
if (umcResult != UMC::UMC_OK)
{
str.Format("WinMMAudioRender::Init failure %d", umcResult);
AfxMessageBox(str);
dualThreadedCodec.Reset();
dualThreadedCodec.Close();
splitter->Stop();
splitter->Close();
reader.Close();
return;
}

// check run
while (!m_bPlay)
Sleep(200);

If I move the Sleep loop above the WinMMAudioRenderer Init call, CPU stays normal. Move the Sleep loop after the WinMMAudioRenderer Init call, CPU pegs 100%. My guess is that WinMMAudioRenderer is creating a thread that is spinning badly on something. Probably should submit this to premier.intel.com but thought I'd check the forum first. Thanks.
0 Kudos
2 Replies
franknatoli
New Contributor I
56 Views

Discovered that the base audio renderer has a vm_time_sleep(0) spin on UMC_ERR_NOT_ENOUGH_BUFFERS. While no data is flowing through the audio renderer, this loop will peg the CPU at 100%. There are other examples of vm_time_sleep(0) or vm_time_sleep(TIME_TO_SLEEP) where TIME_TO_SLEEP=0 in other parts of UMC. They all need to be replaced with synchronization objects.
Vladimir_Dudnik
Employee
56 Views

Agree, please submit your issue report to Intel Premier Support

Vladimir

Reply