aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-19 05:07:09 -0800
committerChris Robinson <[email protected]>2018-11-19 05:07:09 -0800
commitf766437569da417cc9048cb789764c8c29cce8b0 (patch)
treea571b962178793bb05c21bfbe576456133d746c6 /Alc
parentac2a420351a2489fc347689968767a15f863ec77 (diff)
Fix a couple incorrect uses of ringbuffer pointer data
Diffstat (limited to 'Alc')
-rw-r--r--Alc/backends/opensl.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/Alc/backends/opensl.cpp b/Alc/backends/opensl.cpp
index a53c0759..2c516021 100644
--- a/Alc/backends/opensl.cpp
+++ b/Alc/backends/opensl.cpp
@@ -300,14 +300,15 @@ static int ALCopenslPlayback_mixerProc(void *arg)
for(size_t i = 0;i < todo;i++)
{
- if(!data[0].len)
+ if(!data.first.len)
{
- data[0] = data[1];
- data[1].buf = NULL;
- data[1].len = 0;
+ data.first = data.second;
+ data.second.buf = nullptr;
+ data.second.len = 0;
}
- result = VCALL(bufferQueue,Enqueue)(data[0].buf, device->UpdateSize*self->mFrameSize);
+ result = VCALL(bufferQueue,Enqueue)(data.first.buf,
+ device->UpdateSize*self->mFrameSize);
PRINTERR(result, "bufferQueue->Enqueue");
if(SL_RESULT_SUCCESS != result)
{
@@ -315,8 +316,8 @@ static int ALCopenslPlayback_mixerProc(void *arg)
break;
}
- data[0].len--;
- data[0].buf += device->UpdateSize*self->mFrameSize;
+ data.first.len--;
+ data.first.buf += device->UpdateSize*self->mFrameSize;
}
}
ALCopenslPlayback_unlock(self);