From 2a7f5aa569d181a47c28c98e67dcadf275835b15 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 24 Jan 2018 18:42:00 -0800 Subject: Add a deprecated event type for alDopplerVelocity --- OpenAL32/alState.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'OpenAL32/alState.c') 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); -- cgit v1.2.3