- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
![](/skins/images/D2683F18326913BBA0436CB7114DD569/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page