Replaced Common::CriticalSection with a std::mutex implementation. 64bit Windows builds now use SRWLocks and ConditionVariables(requires Vista/7, x64 builds will no longer work on Windows XP x64). Tell me if you hate that. Removed Common::EventEx. Common::Event now uses a std::condition_variable impl.(using ConditionVariables on Windows x64, Events on x86, or posix condition variables elsewhere). I experience slight speed improvements with these changes.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7294 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Jordan Woyak
2011-03-05 06:11:26 +00:00
parent a037ff2358
commit 423018f811
56 changed files with 918 additions and 835 deletions

View File

@ -22,10 +22,10 @@ struct StreamingVoiceContext : public IXAudio2VoiceCallback
{
IXAudio2SourceVoice* pSourceVoice;
CMixer *m_mixer;
Common::EventEx *soundSyncEvent;
Common::Event *soundSyncEvent;
short *xaBuffer;
StreamingVoiceContext(IXAudio2 *pXAudio2, CMixer *pMixer, Common::EventEx *pSyncEvent)
StreamingVoiceContext(IXAudio2 *pXAudio2, CMixer *pMixer, Common::Event *pSyncEvent)
{
m_mixer = pMixer;
@ -100,7 +100,6 @@ struct StreamingVoiceContext : public IXAudio2VoiceCallback
//
if( !pSourceVoice || !context) return;
//soundSyncEvent->Init();
//soundSyncEvent->Wait(); //sync
//soundSyncEvent->Spin(); //or tight sync
@ -123,8 +122,6 @@ StreamingVoiceContext* pVoiceContext = 0;
bool XAudio2::Start()
{
//soundSyncEvent.Init();
// XAudio2 init
CoInitializeEx(NULL, COINIT_MULTITHREADED);
HRESULT hr;
@ -207,5 +204,4 @@ void XAudio2::Stop()
safe_release(pXAudio2);
pMasteringVoice = NULL;
CoUninitialize();
//soundSyncEvent.Shutdown();
}