aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alSource.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-08-15 05:54:13 -0700
committerChris Robinson <[email protected]>2012-08-15 05:54:13 -0700
commitbbcf4e8c1d76948a901c4ab3e919d3c99c2e2459 (patch)
tree87db1150dd045aa7c53fb571ffa4cd72d4f46583 /OpenAL32/alSource.c
parent28593579394d9dcf489ed190dca9b14cdc2340d9 (diff)
Make sure sources are 16-byte aligned
They contain fields that require 16-byte alignment for SSE (and Neon?) acceleration.
Diffstat (limited to 'OpenAL32/alSource.c')
-rw-r--r--OpenAL32/alSource.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 7b4742df..2c5fb30d 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -66,7 +66,7 @@ AL_API ALvoid AL_APIENTRY alGenSources(ALsizei n, ALuint *sources)
CHECK_VALUE(Context, n >= 0);
for(cur = 0;cur < n;cur++)
{
- ALsource *source = calloc(1, sizeof(ALsource));
+ ALsource *source = al_calloc(16, sizeof(ALsource));
if(!source)
al_throwerr(Context, AL_OUT_OF_MEMORY);
InitSourceParams(source);
@@ -78,7 +78,7 @@ AL_API ALvoid AL_APIENTRY alGenSources(ALsizei n, ALuint *sources)
{
FreeThunkEntry(source->id);
memset(source, 0, sizeof(ALsource));
- free(source);
+ al_free(source);
al_throwerr(Context, err);
}
@@ -160,7 +160,7 @@ AL_API ALvoid AL_APIENTRY alDeleteSources(ALsizei n, const ALuint *sources)
}
memset(Source, 0, sizeof(*Source));
- free(Source);
+ al_free(Source);
}
}
al_endtry;
@@ -1998,6 +1998,6 @@ ALvoid ReleaseALSources(ALCcontext *Context)
FreeThunkEntry(temp->id);
memset(temp, 0, sizeof(*temp));
- free(temp);
+ al_free(temp);
}
}