aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alEffect.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-24 12:10:48 -0800
committerChris Robinson <[email protected]>2018-01-24 12:10:48 -0800
commit786a05876e492074aba245209d11fb73d05ad60a (patch)
tree1caade0900214c3a4106475e97c3b07c135ac5df /OpenAL32/alEffect.c
parentcaa3b4f7f833278498a78f261e8badb85fd2896b (diff)
Call the event callback when an error is generated
Most errors don't yet provide correct object IDs or text messages for the AL error.
Diffstat (limited to 'OpenAL32/alEffect.c')
-rw-r--r--OpenAL32/alEffect.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c
index bb56e6a3..755d792e 100644
--- a/OpenAL32/alEffect.c
+++ b/OpenAL32/alEffect.c
@@ -167,7 +167,7 @@ AL_API ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint value)
Device = Context->Device;
LockEffectsWrite(Device);
if((ALEffect=LookupEffect(Device, effect)) == NULL)
- alSetError(Context, AL_INVALID_NAME);
+ alSetError(Context, AL_INVALID_NAME, effect, "Invalid effect ID");
else
{
if(param == AL_EFFECT_TYPE)
@@ -184,7 +184,7 @@ AL_API ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint value)
if(isOk)
InitEffectParams(ALEffect, value);
else
- alSetError(Context, AL_INVALID_VALUE);
+ alSetError(Context, AL_INVALID_VALUE, effect, "Effect type not supported");
}
else
{
@@ -216,7 +216,7 @@ AL_API ALvoid AL_APIENTRY alEffectiv(ALuint effect, ALenum param, const ALint *v
Device = Context->Device;
LockEffectsWrite(Device);
if((ALEffect=LookupEffect(Device, effect)) == NULL)
- alSetError(Context, AL_INVALID_NAME);
+ alSetError(Context, AL_INVALID_NAME, effect, "Invalid effect ID");
else
{
/* Call the appropriate handler */
@@ -239,7 +239,7 @@ AL_API ALvoid AL_APIENTRY alEffectf(ALuint effect, ALenum param, ALfloat value)
Device = Context->Device;
LockEffectsWrite(Device);
if((ALEffect=LookupEffect(Device, effect)) == NULL)
- alSetError(Context, AL_INVALID_NAME);
+ alSetError(Context, AL_INVALID_NAME, effect, "Invalid effect ID");
else
{
/* Call the appropriate handler */
@@ -262,7 +262,7 @@ AL_API ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, const ALfloat
Device = Context->Device;
LockEffectsWrite(Device);
if((ALEffect=LookupEffect(Device, effect)) == NULL)
- alSetError(Context, AL_INVALID_NAME);
+ alSetError(Context, AL_INVALID_NAME, effect, "Invalid effect ID");
else
{
/* Call the appropriate handler */
@@ -285,7 +285,7 @@ AL_API ALvoid AL_APIENTRY alGetEffecti(ALuint effect, ALenum param, ALint *value
Device = Context->Device;
LockEffectsRead(Device);
if((ALEffect=LookupEffect(Device, effect)) == NULL)
- alSetError(Context, AL_INVALID_NAME);
+ alSetError(Context, AL_INVALID_NAME, effect, "Invalid effect ID");
else
{
if(param == AL_EFFECT_TYPE)
@@ -320,7 +320,7 @@ AL_API ALvoid AL_APIENTRY alGetEffectiv(ALuint effect, ALenum param, ALint *valu
Device = Context->Device;
LockEffectsRead(Device);
if((ALEffect=LookupEffect(Device, effect)) == NULL)
- alSetError(Context, AL_INVALID_NAME);
+ alSetError(Context, AL_INVALID_NAME, effect, "Invalid effect ID");
else
{
/* Call the appropriate handler */
@@ -343,7 +343,7 @@ AL_API ALvoid AL_APIENTRY alGetEffectf(ALuint effect, ALenum param, ALfloat *val
Device = Context->Device;
LockEffectsRead(Device);
if((ALEffect=LookupEffect(Device, effect)) == NULL)
- alSetError(Context, AL_INVALID_NAME);
+ alSetError(Context, AL_INVALID_NAME, effect, "Invalid effect ID");
else
{
/* Call the appropriate handler */
@@ -366,7 +366,7 @@ AL_API ALvoid AL_APIENTRY alGetEffectfv(ALuint effect, ALenum param, ALfloat *va
Device = Context->Device;
LockEffectsRead(Device);
if((ALEffect=LookupEffect(Device, effect)) == NULL)
- alSetError(Context, AL_INVALID_NAME);
+ alSetError(Context, AL_INVALID_NAME, effect, "Invalid effect ID");
else
{
/* Call the appropriate handler */