diff options
-rw-r--r-- | Alc/ALc.c | 1 | ||||
-rw-r--r-- | OpenAL32/Include/alMain.h | 2 | ||||
-rw-r--r-- | OpenAL32/alState.c | 11 | ||||
-rw-r--r-- | OpenAL32/event.c | 2 |
4 files changed, 16 insertions, 0 deletions
@@ -665,6 +665,7 @@ static const struct { DECL(AL_EVENT_TYPE_SOURCE_STATE_CHANGED_SOFT), DECL(AL_EVENT_TYPE_ERROR_SOFT), DECL(AL_EVENT_TYPE_PERFORMANCE_SOFT), + DECL(AL_EVENT_TYPE_DEPRECATED_SOFT), }; #undef DECL diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 438f7ed5..4661b713 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -74,6 +74,7 @@ AL_API void AL_APIENTRY alFlushMappedBufferSOFT(ALuint buffer, ALsizei offset, A #define AL_EVENT_TYPE_SOURCE_STATE_CHANGED_SOFT 0xffe3 #define AL_EVENT_TYPE_ERROR_SOFT 0xffe4 #define AL_EVENT_TYPE_PERFORMANCE_SOFT 0xffe5 +#define AL_EVENT_TYPE_DEPRECATED_SOFT 0xffe6 typedef void (AL_APIENTRY*ALEVENTPROCSOFT)(ALenum eventType, ALuint object, ALuint param, ALsizei length, const ALchar *message, void *userParam); @@ -570,6 +571,7 @@ enum { EventType_BufferCompleted = 1<<1, EventType_Error = 1<<2, EventType_Performance = 1<<3, + EventType_Deprecated = 1<<4, }; struct ALCcontext_struct { diff --git a/OpenAL32/alState.c b/OpenAL32/alState.c index 67f9aab7..9c49b2e8 100644 --- a/OpenAL32/alState.c +++ b/OpenAL32/alState.c @@ -715,6 +715,17 @@ AL_API ALvoid AL_APIENTRY alDopplerVelocity(ALfloat value) context = GetContextRef(); if(!context) return; + if((context->EnabledEvts&EventType_Deprecated)) + { + static const ALCchar msg[] = + "alDopplerVelocity is deprecated in AL1.1, use alSpeedOfSound"; + almtx_lock(&context->EventLock); + if((context->EnabledEvts&EventType_Deprecated) && context->EventCb) + (*context->EventCb)(AL_EVENT_TYPE_DEPRECATED_SOFT, 0, 0, strlen(msg), msg, + context->EventParam); + almtx_unlock(&context->EventLock); + } + if(!(value >= 0.0f && isfinite(value))) SETERR_GOTO(context, AL_INVALID_VALUE, 0, "Doppler velocity out of range", done); diff --git a/OpenAL32/event.c b/OpenAL32/event.c index 88885f52..06db8713 100644 --- a/OpenAL32/event.c +++ b/OpenAL32/event.c @@ -31,6 +31,8 @@ AL_API void AL_APIENTRY alEventControlSOFT(ALsizei count, const ALenum *types, A flags |= EventType_Error; else if(types[i] == AL_EVENT_TYPE_PERFORMANCE_SOFT) flags |= EventType_Performance; + else if(types[i] == AL_EVENT_TYPE_DEPRECATED_SOFT) + flags |= EventType_Deprecated; else SETERR_GOTO(context, AL_INVALID_ENUM, 0, "Invalid event type", done); } |