aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-08-22 07:22:02 -0700
committerChris Robinson <[email protected]>2011-08-22 07:22:02 -0700
commitc1f435cc18df4e2597d166b8b1c8a0d4ba9b23a6 (patch)
tree49e06bfa81531efa7217a487dbea712a35af5905 /OpenAL32/alSource.c
parent858592832f7adf39dd1983ff72ebeda75cc4dd16 (diff)
Don't use the thunk array for object lookups
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r--OpenAL32/alSource.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 532d5178..6a6edfa0 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -85,7 +85,7 @@ AL_API ALvoid AL_APIENTRY alGenSources(ALsizei n,ALuint *sources)
break;
}
- err = ALTHUNK_ADDENTRY(source, &source->source);
+ err = ALTHUNK_NEWENTRY(source, &source->source);
if(err == AL_NO_ERROR)
err = InsertUIntMapEntry(&Context->SourceMap, source->source, source);
if(err != AL_NO_ERROR)
@@ -1376,7 +1376,7 @@ AL_API ALvoid AL_APIENTRY alSourcePlayv(ALsizei n, const ALuint *sources)
for(i = 0;i < n;i++)
{
- Source = (ALsource*)ALTHUNK_LOOKUPENTRY(sources[i]);
+ Source = LookupSource(Context->SourceMap, sources[i]);
if(Context->DeferUpdates) Source->new_state = AL_PLAYING;
else SetSourceState(Source, Context, AL_PLAYING);
}
@@ -1422,7 +1422,7 @@ AL_API ALvoid AL_APIENTRY alSourcePausev(ALsizei n, const ALuint *sources)
for(i = 0;i < n;i++)
{
- Source = (ALsource*)ALTHUNK_LOOKUPENTRY(sources[i]);
+ Source = LookupSource(Context->SourceMap, sources[i]);
if(Context->DeferUpdates) Source->new_state = AL_PAUSED;
else SetSourceState(Source, Context, AL_PAUSED);
}
@@ -1468,7 +1468,7 @@ AL_API ALvoid AL_APIENTRY alSourceStopv(ALsizei n, const ALuint *sources)
for(i = 0;i < n;i++)
{
- Source = (ALsource*)ALTHUNK_LOOKUPENTRY(sources[i]);
+ Source = LookupSource(Context->SourceMap, sources[i]);
if(Context->DeferUpdates) Source->new_state = AL_STOPPED;
else SetSourceState(Source, Context, AL_STOPPED);
}
@@ -1514,7 +1514,7 @@ AL_API ALvoid AL_APIENTRY alSourceRewindv(ALsizei n, const ALuint *sources)
for(i = 0;i < n;i++)
{
- Source = (ALsource*)ALTHUNK_LOOKUPENTRY(sources[i]);
+ Source = LookupSource(Context->SourceMap, sources[i]);
if(Context->DeferUpdates) Source->new_state = AL_INITIAL;
else SetSourceState(Source, Context, AL_INITIAL);
}
@@ -1616,7 +1616,7 @@ AL_API ALvoid AL_APIENTRY alSourceQueueBuffers(ALuint source, ALsizei n, const A
// Change Source Type
Source->lSourceType = AL_STREAMING;
- buffer = (ALbuffer*)ALTHUNK_LOOKUPENTRY(buffers[0]);
+ buffer = LookupBuffer(device->BufferMap, buffers[0]);
// All buffers are valid - so add them to the list
BufferListStart = malloc(sizeof(ALbufferlistitem));
@@ -1631,7 +1631,7 @@ AL_API ALvoid AL_APIENTRY alSourceQueueBuffers(ALuint source, ALsizei n, const A
for(i = 1;i < n;i++)
{
- buffer = (ALbuffer*)ALTHUNK_LOOKUPENTRY(buffers[i]);
+ buffer = LookupBuffer(device->BufferMap, buffers[i]);
BufferList->next = malloc(sizeof(ALbufferlistitem));
BufferList->next->buffer = buffer;