aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alState.c
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/alState.c')
-rw-r--r--OpenAL32/alState.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c
index 8ca5a012..ec2cdfe9 100644
--- a/OpenAL32/alState.c
+++ b/OpenAL32/alState.c
@@ -23,9 +23,11 @@
#include <stdlib.h>
#include "alMain.h"
#include "AL/alc.h"
+#include "AL/alext.h"
#include "alError.h"
#include "alSource.h"
#include "alState.h"
+#include "alDatabuffer.h"
static const ALchar alVendor[] = "OpenAL Community";
static const ALchar alVersion[] = "1.1 ALSOFT "ALSOFT_VERSION;
@@ -281,6 +283,20 @@ ALAPI ALint ALAPIENTRY alGetInteger(ALenum pname)
value = (ALint)Context->flSpeedOfSound;
break;
+ case AL_SAMPLE_SOURCE_EXT:
+ if(Context->SampleSource)
+ value = (ALint)Context->SampleSource->databuffer;
+ else
+ value = 0;
+ break;
+
+ case AL_SAMPLE_SINK_EXT:
+ if(Context->SampleSink)
+ value = (ALint)Context->SampleSink->databuffer;
+ else
+ value = 0;
+ break;
+
default:
alSetError(AL_INVALID_ENUM);
break;
@@ -479,6 +495,20 @@ ALAPI ALvoid ALAPIENTRY alGetIntegerv(ALenum pname,ALint *data)
*data = (ALint)Context->flSpeedOfSound;
break;
+ case AL_SAMPLE_SOURCE_EXT:
+ if(Context->SampleSource)
+ *data = (ALint)Context->SampleSource->databuffer;
+ else
+ *data = 0;
+ break;
+
+ case AL_SAMPLE_SINK_EXT:
+ if(Context->SampleSink)
+ *data = (ALint)Context->SampleSink->databuffer;
+ else
+ *data = 0;
+ break;
+
default:
alSetError(AL_INVALID_ENUM);
break;