aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/opensl.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2020-03-29 23:57:37 -0700
committerChris Robinson <[email protected]>2020-03-29 23:57:37 -0700
commit9b237790b274a9191e0835e84c28de6cefbc2d34 (patch)
tree83c696bb61d947e5c4ab3c79adf2308d918ef29c /alc/backends/opensl.cpp
parentd70912c0345e402e8aed9835ce450330cd6a7d36 (diff)
Remove the mutex from the backend base
Diffstat (limited to 'alc/backends/opensl.cpp')
-rw-r--r--alc/backends/opensl.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/alc/backends/opensl.cpp b/alc/backends/opensl.cpp
index 635d6c0d..b1355061 100644
--- a/alc/backends/opensl.cpp
+++ b/alc/backends/opensl.cpp
@@ -171,6 +171,8 @@ struct OpenSLPlayback final : public BackendBase {
RingBufferPtr mRing{nullptr};
al::semaphore mSem;
+ std::mutex mMutex;
+
ALuint mFrameSize{0};
std::atomic<bool> mKillNow{true};
@@ -260,7 +262,7 @@ int OpenSLPlayback::mixerProc()
}
}
- std::unique_lock<std::recursive_mutex> dlock{mMutex};
+ std::unique_lock<std::mutex> dlock{mMutex};
auto data = mRing->getWriteVector();
aluMixData(mDevice, data.first.buf,
static_cast<ALuint>(data.first.len*mDevice->UpdateSize), frame_step);
@@ -610,7 +612,7 @@ ClockLatency OpenSLPlayback::getClockLatency()
{
ClockLatency ret;
- std::lock_guard<std::recursive_mutex> _{mMutex};
+ std::lock_guard<std::mutex> _{mMutex};
ret.ClockTime = GetDeviceClockTime(mDevice);
ret.Latency = std::chrono::seconds{mRing->readSpace() * mDevice->UpdateSize};
ret.Latency /= mDevice->Frequency;