Merge pull request #724 from lioncash/mem_fn

AudioCommon: Get rid of some unnecessary mem_fn calls
This commit is contained in:
Pierre Bourdon 2014-08-03 21:25:24 -07:00
commit 87e7c1ee46
2 changed files with 3 additions and 5 deletions

View File

@ -3,9 +3,7 @@
// Refer to the license.txt file included. // Refer to the license.txt file included.
#include <cmath> #include <cmath>
#include <functional> #include <Windows.h>
#include <windows.h>
#include "AudioCommon/AudioCommon.h" #include "AudioCommon/AudioCommon.h"
#include "AudioCommon/DSoundStream.h" #include "AudioCommon/DSoundStream.h"
@ -123,7 +121,7 @@ bool DSound::Start()
dsBuffer->Lock(0, bufferSize, (void* *)&p1, &num1, 0, 0, DSBLOCK_ENTIREBUFFER); dsBuffer->Lock(0, bufferSize, (void* *)&p1, &num1, 0, 0, DSBLOCK_ENTIREBUFFER);
memset(p1, 0, num1); memset(p1, 0, num1);
dsBuffer->Unlock(p1, num1, 0, 0); dsBuffer->Unlock(p1, num1, 0, 0);
thread = std::thread(std::mem_fn(&DSound::SoundLoop), this); thread = std::thread(&DSound::SoundLoop, this);
return true; return true;
} }

View File

@ -38,7 +38,7 @@ bool OpenALStream::Start()
//period_size_in_millisec = 1000 / refresh; //period_size_in_millisec = 1000 / refresh;
alcMakeContextCurrent(pContext); alcMakeContextCurrent(pContext);
thread = std::thread(std::mem_fn(&OpenALStream::SoundLoop), this); thread = std::thread(&OpenALStream::SoundLoop, this);
bReturn = true; bReturn = true;
} }
else else