aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/qsa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alc/backends/qsa.cpp')
-rw-r--r--alc/backends/qsa.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/alc/backends/qsa.cpp b/alc/backends/qsa.cpp
index 872a8541..5ed65798 100644
--- a/alc/backends/qsa.cpp
+++ b/alc/backends/qsa.cpp
@@ -207,7 +207,7 @@ FORCE_ALIGN static int qsa_proc_playback(void *ptr)
const ALint frame_size = device->frameSizeFromFmt();
- self->lock();
+ std::unique_lock<PlaybackWrapper> dlock{*self};
while(!data->mKillNow.load(std::memory_order_acquire))
{
pollfd pollitem{};
@@ -215,9 +215,9 @@ FORCE_ALIGN static int qsa_proc_playback(void *ptr)
pollitem.events = POLLOUT;
/* Select also works like time slice to OS */
- self->unlock();
+ dlock.unlock();
sret = poll(&pollitem, 1, 2000);
- self->lock();
+ dlock.lock();
if(sret == -1)
{
if(errno == EINTR || errno == EAGAIN)
@@ -266,7 +266,6 @@ FORCE_ALIGN static int qsa_proc_playback(void *ptr)
}
}
}
- self->unlock();
return 0;
}