aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alListener.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-12-16 07:20:27 -0800
committerChris Robinson <[email protected]>2014-12-16 07:20:27 -0800
commit3b8f54d572b586cd60e6b0c8d839c71edeabbdae (patch)
tree18ceb20f443075707db5a56db4dcc5e40c5b72f3 /OpenAL32/alListener.c
parent97f6d302fe61529ca590d67af9c32bb42e75cdf5 (diff)
Use aluVector in some more places
Diffstat (limited to 'OpenAL32/alListener.c')
-rw-r--r--OpenAL32/alListener.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/OpenAL32/alListener.c b/OpenAL32/alListener.c
index c30d6f84..66865473 100644
--- a/OpenAL32/alListener.c
+++ b/OpenAL32/alListener.c
@@ -74,9 +74,7 @@ AL_API ALvoid AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat val
SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
LockContext(context);
- context->Listener->Position[0] = value1;
- context->Listener->Position[1] = value2;
- context->Listener->Position[2] = value3;
+ aluVectorSet(&context->Listener->Position, value1, value2, value3, 1.0f);
ATOMIC_STORE(&context->UpdateSources, AL_TRUE);
UnlockContext(context);
break;
@@ -86,9 +84,7 @@ AL_API ALvoid AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat val
SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
LockContext(context);
- context->Listener->Velocity[0] = value1;
- context->Listener->Velocity[1] = value2;
- context->Listener->Velocity[2] = value3;
+ aluVectorSet(&context->Listener->Velocity, value1, value2, value3, 0.0f);
ATOMIC_STORE(&context->UpdateSources, AL_TRUE);
UnlockContext(context);
break;
@@ -282,17 +278,17 @@ AL_API ALvoid AL_APIENTRY alGetListener3f(ALenum param, ALfloat *value1, ALfloat
{
case AL_POSITION:
LockContext(context);
- *value1 = context->Listener->Position[0];
- *value2 = context->Listener->Position[1];
- *value3 = context->Listener->Position[2];
+ *value1 = context->Listener->Position.v[0];
+ *value2 = context->Listener->Position.v[1];
+ *value3 = context->Listener->Position.v[2];
UnlockContext(context);
break;
case AL_VELOCITY:
LockContext(context);
- *value1 = context->Listener->Velocity[0];
- *value2 = context->Listener->Velocity[1];
- *value3 = context->Listener->Velocity[2];
+ *value1 = context->Listener->Velocity.v[0];
+ *value2 = context->Listener->Velocity.v[1];
+ *value3 = context->Listener->Velocity.v[2];
UnlockContext(context);
break;
@@ -383,17 +379,17 @@ AL_API void AL_APIENTRY alGetListener3i(ALenum param, ALint *value1, ALint *valu
{
case AL_POSITION:
LockContext(context);
- *value1 = (ALint)context->Listener->Position[0];
- *value2 = (ALint)context->Listener->Position[1];
- *value3 = (ALint)context->Listener->Position[2];
+ *value1 = (ALint)context->Listener->Position.v[0];
+ *value2 = (ALint)context->Listener->Position.v[1];
+ *value3 = (ALint)context->Listener->Position.v[2];
UnlockContext(context);
break;
case AL_VELOCITY:
LockContext(context);
- *value1 = (ALint)context->Listener->Velocity[0];
- *value2 = (ALint)context->Listener->Velocity[1];
- *value3 = (ALint)context->Listener->Velocity[2];
+ *value1 = (ALint)context->Listener->Velocity.v[0];
+ *value2 = (ALint)context->Listener->Velocity.v[1];
+ *value3 = (ALint)context->Listener->Velocity.v[2];
UnlockContext(context);
break;