aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--OpenAL32/alSource.c48
1 files changed, 12 insertions, 36 deletions
diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c
index 5488003c..7bd92842 100644
--- a/OpenAL32/alSource.c
+++ b/OpenAL32/alSource.c
@@ -1006,6 +1006,12 @@ AL_API ALvoid AL_APIENTRY alGetSourcefv(ALuint source, ALenum eParam, ALfloat *p
alGetSourcef(source, eParam, pflValues);
break;
+ case AL_POSITION:
+ case AL_VELOCITY:
+ case AL_DIRECTION:
+ alGetSource3f(source, eParam, pflValues+0, pflValues+1, pflValues+2);
+ break;
+
case AL_SAMPLE_RW_OFFSETS_EXT:
case AL_BYTE_RW_OFFSETS_EXT:
updateLen = (ALdouble)pContext->Device->UpdateSize /
@@ -1015,24 +1021,6 @@ AL_API ALvoid AL_APIENTRY alGetSourcefv(ALuint source, ALenum eParam, ALfloat *p
pflValues[1] = Offsets[1];
break;
- case AL_POSITION:
- pflValues[0] = Source->vPosition[0];
- pflValues[1] = Source->vPosition[1];
- pflValues[2] = Source->vPosition[2];
- break;
-
- case AL_VELOCITY:
- pflValues[0] = Source->vVelocity[0];
- pflValues[1] = Source->vVelocity[1];
- pflValues[2] = Source->vVelocity[2];
- break;
-
- case AL_DIRECTION:
- pflValues[0] = Source->vOrientation[0];
- pflValues[1] = Source->vOrientation[1];
- pflValues[2] = Source->vOrientation[2];
- break;
-
default:
alSetError(pContext, AL_INVALID_ENUM);
break;
@@ -1254,6 +1242,12 @@ AL_API void AL_APIENTRY alGetSourceiv(ALuint source, ALenum eParam, ALint* plVal
alGetSourcei(source, eParam, plValues);
break;
+ case AL_POSITION:
+ case AL_VELOCITY:
+ case AL_DIRECTION:
+ alGetSource3i(source, eParam, plValues+0, plValues+1, plValues+2);
+ break;
+
case AL_SAMPLE_RW_OFFSETS_EXT:
case AL_BYTE_RW_OFFSETS_EXT:
updateLen = (ALdouble)pContext->Device->UpdateSize /
@@ -1263,24 +1257,6 @@ AL_API void AL_APIENTRY alGetSourceiv(ALuint source, ALenum eParam, ALint* plVal
plValues[1] = (ALint)Offsets[1];
break;
- case AL_POSITION:
- plValues[0] = (ALint)Source->vPosition[0];
- plValues[1] = (ALint)Source->vPosition[1];
- plValues[2] = (ALint)Source->vPosition[2];
- break;
-
- case AL_VELOCITY:
- plValues[0] = (ALint)Source->vVelocity[0];
- plValues[1] = (ALint)Source->vVelocity[1];
- plValues[2] = (ALint)Source->vVelocity[2];
- break;
-
- case AL_DIRECTION:
- plValues[0] = (ALint)Source->vOrientation[0];
- plValues[1] = (ALint)Source->vOrientation[1];
- plValues[2] = (ALint)Source->vOrientation[2];
- break;
-
default:
alSetError(pContext, AL_INVALID_ENUM);
break;