From 6fd23f09842b81788298e1840b8626252fdf5e18 Mon Sep 17 00:00:00 2001 From: Raulshc <33253777+Raulshc@users.noreply.github.com> Date: Sun, 18 Mar 2018 17:47:17 +0100 Subject: EFX:Pitch Shifter implementation Add pitch shifter effect using standard phase vocoder, based on work of Stephan Bernsee. Only mono signal processing by now. --- OpenAL32/alEffect.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenAL32/alEffect.c') diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c index 6b16fc56..e7dc6ace 100644 --- a/OpenAL32/alEffect.c +++ b/OpenAL32/alEffect.c @@ -45,6 +45,7 @@ const struct EffectList EffectList[EFFECTLIST_SIZE] = { { "equalizer", EQUALIZER_EFFECT, AL_EFFECT_EQUALIZER }, { "flanger", FLANGER_EFFECT, AL_EFFECT_FLANGER }, { "modulator", MODULATOR_EFFECT, AL_EFFECT_RING_MODULATOR }, + { "pshifter", PSHIFTER_EFFECT, AL_EFFECT_PITCH_SHIFTER }, { "dedicated", DEDICATED_EFFECT, AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT }, { "dedicated", DEDICATED_EFFECT, AL_EFFECT_DEDICATED_DIALOGUE }, }; @@ -589,6 +590,11 @@ static void InitEffectParams(ALeffect *effect, ALenum type) effect->Props.Modulator.Waveform = AL_RING_MODULATOR_DEFAULT_WAVEFORM; effect->vtab = &ALmodulator_vtable; break; + case AL_EFFECT_PITCH_SHIFTER: + effect->Props.Pshifter.CoarseTune = AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE; + effect->Props.Pshifter.FineTune = AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE; + effect->vtab = &ALpshifter_vtable; + break; case AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT: case AL_EFFECT_DEDICATED_DIALOGUE: effect->Props.Dedicated.Gain = 1.0f; -- cgit v1.2.3