aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-19 03:53:31 -0800
committerChris Robinson <[email protected]>2018-11-19 03:53:31 -0800
commitc01743fe5df8ba4778950176ea38d95c65f25309 (patch)
tree7c1cc0b7354f7cce4b349f75b58fe52ac99bb6ea /OpenAL32
parente6c2c1f3b6795444a3719e26f203240511c6d464 (diff)
Remove the CONST_CAST hack
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alSource.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/OpenAL32/alSource.cpp b/OpenAL32/alSource.cpp
index ea83d578..539a5f4f 100644
--- a/OpenAL32/alSource.cpp
+++ b/OpenAL32/alSource.cpp
@@ -1438,8 +1438,7 @@ static ALboolean GetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp p
while(BufferList && BufferList != Current)
{
played += BufferList->num_buffers;
- BufferList = ATOMIC_LOAD(&CONST_CAST(ALbufferlistitem*,BufferList)->next,
- almemory_order_relaxed);
+ BufferList = BufferList->next.load(std::memory_order_relaxed);
}
*values = played;
}
@@ -3294,8 +3293,7 @@ static ALint64 GetSourceSampleOffset(ALsource *Source, ALCcontext *context, ALui
while(BufferList && BufferList != Current)
{
readPos += (ALuint64)BufferList->max_samples << 32;
- BufferList = ATOMIC_LOAD(&CONST_CAST(ALbufferlistitem*,BufferList)->next,
- almemory_order_relaxed);
+ BufferList = BufferList->next.load(std::memory_order_relaxed);
}
readPos = minu64(readPos, U64(0x7fffffffffffffff));
}
@@ -3347,8 +3345,7 @@ static ALdouble GetSourceSecOffset(ALsource *Source, ALCcontext *context, ALuint
while(!BufferFmt && i < BufferList->num_buffers)
BufferFmt = BufferList->buffers[i++];
readPos += (ALuint64)BufferList->max_samples << FRACTIONBITS;
- BufferList = ATOMIC_LOAD(&CONST_CAST(ALbufferlistitem*,BufferList)->next,
- almemory_order_relaxed);
+ BufferList = BufferList->next.load(std::memory_order_relaxed);
}
while(BufferList && !BufferFmt)
@@ -3356,8 +3353,7 @@ static ALdouble GetSourceSecOffset(ALsource *Source, ALCcontext *context, ALuint
ALsizei i = 0;
while(!BufferFmt && i < BufferList->num_buffers)
BufferFmt = BufferList->buffers[i++];
- BufferList = ATOMIC_LOAD(&CONST_CAST(ALbufferlistitem*,BufferList)->next,
- almemory_order_relaxed);
+ BufferList = BufferList->next.load(std::memory_order_relaxed);
}
assert(BufferFmt != NULL);
@@ -3418,8 +3414,7 @@ static ALdouble GetSourceOffset(ALsource *Source, ALenum name, ALCcontext *conte
totalBufferLen += BufferList->max_samples;
if(!readFin) readPos += BufferList->max_samples;
- BufferList = ATOMIC_LOAD(&CONST_CAST(ALbufferlistitem*,BufferList)->next,
- almemory_order_relaxed);
+ BufferList = BufferList->next.load(std::memory_order_relaxed);
}
assert(BufferFmt != NULL);
@@ -3534,8 +3529,7 @@ static ALboolean GetSampleOffset(ALsource *Source, ALuint *offset, ALsizei *frac
for(i = 0;i < BufferList->num_buffers && !BufferFmt;i++)
BufferFmt = BufferList->buffers[i];
if(BufferFmt) break;
- BufferList = ATOMIC_LOAD(&CONST_CAST(ALbufferlistitem*,BufferList)->next,
- almemory_order_relaxed);
+ BufferList = BufferList->next.load(std::memory_order_relaxed);
}
if(!BufferFmt)
{