From 6f711c32ba39c8c0b1fe712bb9c9b1361dd3ff40 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 7 Feb 2014 03:20:27 -0800 Subject: Fix some types --- Alc/effects/autowah.c | 4 ++-- Alc/effects/compressor.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Alc/effects') diff --git a/Alc/effects/autowah.c b/Alc/effects/autowah.c index 9a45e233..e3f84b03 100644 --- a/Alc/effects/autowah.c +++ b/Alc/effects/autowah.c @@ -59,7 +59,7 @@ static ALvoid ALautowahState_Destruct(ALautowahState *UNUSED(state)) static ALboolean ALautowahState_deviceUpdate(ALautowahState *state, ALCdevice *device) { - state->Frequency = device->Frequency; + state->Frequency = (ALfloat)device->Frequency; return AL_TRUE; } @@ -100,7 +100,7 @@ static ALvoid ALautowahState_process(ALautowahState *state, ALuint SamplesToDo, /* Similar to compressor, we get the current amplitude of the * incoming signal, and attack or release to reach it. */ - amplitude = fabs(smp); + amplitude = fabsf(smp); if(amplitude > gain) gain = minf(gain+state->AttackRate, amplitude); else if(amplitude < gain) diff --git a/Alc/effects/compressor.c b/Alc/effects/compressor.c index 14c0ed10..bab155c8 100644 --- a/Alc/effects/compressor.c +++ b/Alc/effects/compressor.c @@ -84,12 +84,12 @@ static ALvoid ALcompressorState_process(ALcompressorState *state, ALuint Samples { smp = SamplesIn[it+base]; - amplitude = fabs(smp); + amplitude = fabsf(smp); if(amplitude > gain) gain = minf(gain+state->AttackRate, amplitude); else if(amplitude < gain) gain = maxf(gain-state->ReleaseRate, amplitude); - output = 1.0 / clampf(gain, 0.5f, 2.0f); + output = 1.0f / clampf(gain, 0.5f, 2.0f); temps[it] = smp * output; } -- cgit v1.2.3