aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alState.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2009-08-16 00:54:08 -0700
committerChris Robinson <[email protected]>2009-08-16 00:54:08 -0700
commit0b7eb9f118a259f4bc666140093b6be7dcf01158 (patch)
tree808f71536e3df4b38d0b9e9eae76e25a372ef33d /OpenAL32/alState.c
parentdc26261065a7ff78657ac79accc993c78069deca (diff)
Add in-progress working extension AL_EXTX_sample_buffer_object
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;