Synopsis:
[Bug 8335] High CPU load on Pause Playback Status

Overview:
Currently when we play any a/v file in Linux, and during playback we do a PAUSE, CPU usage jumps to 100%. During the PAUSE, the audio thread should be waiting for the data, but it was not happening since we were not initializing the event and due to this although we are going to CHelixEvent::Wait(UINT32 ulTimeoutPeriod) in file chxthread.cpp , but inside this function, we are always getting m_pEvent as NULL so we never reaches HXUnixEvent::Wait(). Inside audunix.cpp, we are doing m_pAvailableDataEvent->SignalEvent(); but are not calling Init on m_pAvailableDataEvent to initialize the events.

So, calling Init on m_pAvailableDataEvent solves the problem.

Files Added:
None

Files Modified:
/audio/device/platform/unix/audUnix.cpp

Image Size and Heap Use impact (Client -Only):
None.

Platforms and Profiles Affected:
None

Distribution Libraries Affected:
None

Distribution library impact and planned action:
None

Platforms and Profiles Build Verified:
BIF branch   -> hxclient_3_1_0_atlas_restricted
Target(s)      ->  splay
Profile          ->  helix-client-all-defines
SYSTEM_ID -> linux-2.2-libc6-gcc32-i586

Branch:
hxclient_3_1_0_atlas, HEAD

Files Attached:
audUnix_diff.cpp

Thanks,
Deepak Jain
Index: audUnix.cpp
===================================================================
RCS file: /cvsroot/audio/device/platform/unix/audUnix.cpp,v
retrieving revision 1.12.2.1
diff -u -r1.12.2.1 audUnix.cpp
--- audUnix.cpp 29 Apr 2008 17:50:24 -0000      1.12.2.1
+++ audUnix.cpp 4 Jun 2008 04:31:48 -0000
@@ -145,6 +145,10 @@
        CreateInstanceCCF(CLSID_IHXThread, (void**)&m_audioThread, m_pContext);
        CreateInstanceCCF(CLSID_IHXEvent, (void**)&m_pAvailableDataEvent, 
m_pContext);
     }
+       if(m_pAvailableDataEvent)
+       {
+               m_pAvailableDataEvent->Init("Audio_wait",0);
+       }
 #endif    
 
 }
_______________________________________________
Audio-dev mailing list
[email protected]
http://lists.helixcommunity.org/mailman/listinfo/audio-dev

Reply via email to