aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alEffect.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-09-22 00:35:08 -0700
committerChris Robinson <[email protected]>2011-09-22 00:35:08 -0700
commit43350f9066f0c28ac8ff6269783db222508dec45 (patch)
treedc74c80fcbb2f7d39f3124e56605cac656e56e23 /OpenAL32/alEffect.c
parent0988023d30d16563461f92ffcad6a5fc1d5766f3 (diff)
Silence some MSVC precision warnings
Diffstat (limited to 'OpenAL32/alEffect.c')
-rw-r--r--OpenAL32/alEffect.c35
1 files changed, 12 insertions, 23 deletions
diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c
index 178628cf..d9e38069 100644
--- a/OpenAL32/alEffect.c
+++ b/OpenAL32/alEffect.c
@@ -1003,7 +1003,7 @@ static void echo_GetParamfv(ALeffect *effect, ALCcontext *context, ALenum param,
}
-static void mod_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val)
+static void mod_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
{
switch(param)
{
@@ -1023,39 +1023,28 @@ static void mod_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, A
alSetError(context, AL_INVALID_VALUE);
break;
- case AL_RING_MODULATOR_WAVEFORM:
- if(val >= AL_RING_MODULATOR_MIN_WAVEFORM &&
- val <= AL_RING_MODULATOR_MAX_WAVEFORM)
- effect->Modulator.Waveform = val;
- else
- alSetError(context, AL_INVALID_VALUE);
- break;
-
default:
alSetError(context, AL_INVALID_ENUM);
break;
}
}
-static void mod_SetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals)
+static void mod_SetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals)
{
- mod_SetParami(effect, context, param, vals[0]);
+ mod_SetParamf(effect, context, param, vals[0]);
}
-static void mod_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
+static void mod_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val)
{
switch(param)
{
case AL_RING_MODULATOR_FREQUENCY:
- if(val >= AL_RING_MODULATOR_MIN_FREQUENCY &&
- val <= AL_RING_MODULATOR_MAX_FREQUENCY)
- effect->Modulator.Frequency = val;
- else
- alSetError(context, AL_INVALID_VALUE);
+ case AL_RING_MODULATOR_HIGHPASS_CUTOFF:
+ mod_SetParamf(effect, context, param, (ALfloat)val);
break;
- case AL_RING_MODULATOR_HIGHPASS_CUTOFF:
- if(val >= AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF &&
- val <= AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF)
- effect->Modulator.HighPassCutoff = val;
+ case AL_RING_MODULATOR_WAVEFORM:
+ if(val >= AL_RING_MODULATOR_MIN_WAVEFORM &&
+ val <= AL_RING_MODULATOR_MAX_WAVEFORM)
+ effect->Modulator.Waveform = val;
else
alSetError(context, AL_INVALID_VALUE);
break;
@@ -1065,9 +1054,9 @@ static void mod_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, A
break;
}
}
-static void mod_SetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals)
+static void mod_SetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals)
{
- mod_SetParamf(effect, context, param, vals[0]);
+ mod_SetParami(effect, context, param, vals[0]);
}
static void mod_GetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint *val)