summaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/Include/alMain.h15
-rw-r--r--OpenAL32/alExtension.c1
-rw-r--r--OpenAL32/alState.c45
3 files changed, 59 insertions, 2 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index d9549cbf..a577db52 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -116,6 +116,17 @@ AL_API ALboolean AL_APIENTRY alIsBufferFormatSupportedSOFT(ALenum format);
#define AL_VIRTUAL_CHANNELS_SOFT 0x1033
#endif
+#ifndef AL_SOFT_deferred_updates
+#define AL_SOFT_deferred_updates 1
+#define AL_DEFERRED_UPDATES_SOFT 0xC002
+typedef ALvoid (AL_APIENTRY*LPALDEFERUPDATESSOFT)(void);
+typedef ALvoid (AL_APIENTRY*LPALPROCESSUPDATESSOFT)(void);
+#ifdef AL_ALEXT_PROTOTYPES
+AL_API ALvoid AL_APIENTRY alDeferUpdatesSOFT(void);
+AL_API ALvoid AL_APIENTRY alProcessUpdatesSOFT(void);
+#endif
+#endif
+
#if defined(HAVE_STDINT_H)
#include <stdint.h>
@@ -465,14 +476,14 @@ struct ALCcontext_struct
ALenum LastError;
ALboolean UpdateSources;
- ALboolean Suspended;
enum DistanceModel DistanceModel;
- ALboolean SourceDistanceModel;
+ ALboolean SourceDistanceModel;
ALfloat DopplerFactor;
ALfloat DopplerVelocity;
ALfloat flSpeedOfSound;
+ ALboolean DeferUpdates;
struct ALsource **ActiveSources;
ALsizei ActiveSourceCount;
diff --git a/OpenAL32/alExtension.c b/OpenAL32/alExtension.c
index ed6236b2..a986bc16 100644
--- a/OpenAL32/alExtension.c
+++ b/OpenAL32/alExtension.c
@@ -213,6 +213,7 @@ static const ALenums enumeration[] = {
{ "AL_DISTANCE_MODEL", AL_DISTANCE_MODEL },
{ "AL_SPEED_OF_SOUND", AL_SPEED_OF_SOUND },
{ "AL_SOURCE_DISTANCE_MODEL", AL_SOURCE_DISTANCE_MODEL },
+ { "AL_DEFERRED_UPDATES_SOFT", AL_DEFERRED_UPDATES_SOFT },
// Distance Models
{ "AL_INVERSE_DISTANCE", AL_INVERSE_DISTANCE },
diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c
index 8bc50989..3c1ab9b8 100644
--- a/OpenAL32/alState.c
+++ b/OpenAL32/alState.c
@@ -138,6 +138,10 @@ AL_API ALboolean AL_APIENTRY alGetBoolean(ALenum pname)
value = AL_TRUE;
break;
+ case AL_DEFERRED_UPDATES_SOFT:
+ value = Context->DeferUpdates;
+ break;
+
default:
alSetError(Context, AL_INVALID_ENUM);
break;
@@ -174,6 +178,10 @@ AL_API ALdouble AL_APIENTRY alGetDouble(ALenum pname)
value = (double)Context->flSpeedOfSound;
break;
+ case AL_DEFERRED_UPDATES_SOFT:
+ value = (ALdouble)Context->DeferUpdates;
+ break;
+
default:
alSetError(Context, AL_INVALID_ENUM);
break;
@@ -210,6 +218,10 @@ AL_API ALfloat AL_APIENTRY alGetFloat(ALenum pname)
value = Context->flSpeedOfSound;
break;
+ case AL_DEFERRED_UPDATES_SOFT:
+ value = (ALfloat)Context->DeferUpdates;
+ break;
+
default:
alSetError(Context, AL_INVALID_ENUM);
break;
@@ -246,6 +258,10 @@ AL_API ALint AL_APIENTRY alGetInteger(ALenum pname)
value = (ALint)Context->flSpeedOfSound;
break;
+ case AL_DEFERRED_UPDATES_SOFT:
+ value = (ALint)Context->DeferUpdates;
+ break;
+
default:
alSetError(Context, AL_INVALID_ENUM);
break;
@@ -268,6 +284,7 @@ AL_API ALvoid AL_APIENTRY alGetBooleanv(ALenum pname,ALboolean *data)
case AL_DOPPLER_VELOCITY:
case AL_DISTANCE_MODEL:
case AL_SPEED_OF_SOUND:
+ case AL_DEFERRED_UPDATES_SOFT:
*data = alGetBoolean(pname);
return;
}
@@ -306,6 +323,7 @@ AL_API ALvoid AL_APIENTRY alGetDoublev(ALenum pname,ALdouble *data)
case AL_DOPPLER_VELOCITY:
case AL_DISTANCE_MODEL:
case AL_SPEED_OF_SOUND:
+ case AL_DEFERRED_UPDATES_SOFT:
*data = alGetDouble(pname);
return;
}
@@ -344,6 +362,7 @@ AL_API ALvoid AL_APIENTRY alGetFloatv(ALenum pname,ALfloat *data)
case AL_DOPPLER_VELOCITY:
case AL_DISTANCE_MODEL:
case AL_SPEED_OF_SOUND:
+ case AL_DEFERRED_UPDATES_SOFT:
*data = alGetFloat(pname);
return;
}
@@ -382,6 +401,7 @@ AL_API ALvoid AL_APIENTRY alGetIntegerv(ALenum pname,ALint *data)
case AL_DOPPLER_VELOCITY:
case AL_DISTANCE_MODEL:
case AL_SPEED_OF_SOUND:
+ case AL_DEFERRED_UPDATES_SOFT:
*data = alGetInteger(pname);
return;
}
@@ -550,3 +570,28 @@ AL_API ALvoid AL_APIENTRY alDistanceModel(ALenum value)
UnlockContext(Context);
}
+
+
+AL_API ALvoid AL_APIENTRY alDeferUpdatesSOFT(void)
+{
+ ALCcontext *Context;
+
+ Context = GetLockedContext();
+ if(!Context) return;
+
+ Context->DeferUpdates = AL_TRUE;
+
+ UnlockContext(Context);
+}
+
+AL_API ALvoid AL_APIENTRY alProcessUpdatesSOFT(void)
+{
+ ALCcontext *Context;
+
+ Context = GetLockedContext();
+ if(!Context) return;
+
+ Context->DeferUpdates = AL_FALSE;
+
+ UnlockContext(Context);
+}