aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 597cc890..1858c29b 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -550,8 +550,8 @@ static const struct {
DECL(AL_EFFECT_ECHO),
DECL(AL_EFFECT_FLANGER),
DECL(AL_EFFECT_PITCH_SHIFTER),
-#if 0
DECL(AL_EFFECT_FREQUENCY_SHIFTER),
+#if 0
DECL(AL_EFFECT_VOCAL_MORPHER),
#endif
DECL(AL_EFFECT_RING_MODULATOR),
@@ -632,6 +632,10 @@ static const struct {
DECL(AL_FLANGER_FEEDBACK),
DECL(AL_FLANGER_DELAY),
+ DECL(AL_FREQUENCY_SHIFTER_FREQUENCY),
+ DECL(AL_FREQUENCY_SHIFTER_LEFT_DIRECTION),
+ DECL(AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION),
+
DECL(AL_RING_MODULATOR_FREQUENCY),
DECL(AL_RING_MODULATOR_HIGHPASS_CUTOFF),
DECL(AL_RING_MODULATOR_WAVEFORM),
@@ -2213,9 +2217,12 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
break;
}
}
- else if(depth > 24)
- depth = 24;
- device->DitherDepth = (depth > 0) ? powf(2.0f, (ALfloat)(depth-1)) : 0.0f;
+
+ if(depth > 0)
+ {
+ depth = clampi(depth, 2, 20);
+ device->DitherDepth = powf(2.0f, (ALfloat)(depth-1));
+ }
}
if(!(device->DitherDepth > 0.0f))
TRACE("Dithering disabled\n");