aboutsummaryrefslogtreecommitdiffstats
path: root/al/effects/vmorpher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'al/effects/vmorpher.cpp')
-rw-r--r--al/effects/vmorpher.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/al/effects/vmorpher.cpp b/al/effects/vmorpher.cpp
index 856fc6b3..21ea3680 100644
--- a/al/effects/vmorpher.cpp
+++ b/al/effects/vmorpher.cpp
@@ -355,10 +355,7 @@ template<>
template<>
bool VocalMorpherCommitter::commit(const EaxEffectProps &props)
{
- const auto orig = mEaxProps;
- mEaxProps = props;
-
- if(orig.mType == mEaxProps.mType
+ if(props.mType == mEaxProps.mType
&& mEaxProps.mVocalMorpher.ulPhonemeA == props.mVocalMorpher.ulPhonemeA
&& mEaxProps.mVocalMorpher.lPhonemeACoarseTuning == props.mVocalMorpher.lPhonemeACoarseTuning
&& mEaxProps.mVocalMorpher.ulPhonemeB == props.mVocalMorpher.ulPhonemeB
@@ -367,6 +364,8 @@ bool VocalMorpherCommitter::commit(const EaxEffectProps &props)
&& mEaxProps.mVocalMorpher.flRate == props.mVocalMorpher.flRate)
return false;
+ mEaxProps = props;
+
auto get_phoneme = [](unsigned long phoneme) noexcept
{
#define HANDLE_PHENOME(x) case x: return VMorpherPhenome::x
@@ -414,12 +413,12 @@ bool VocalMorpherCommitter::commit(const EaxEffectProps &props)
return VMorpherWaveform::Sinusoid;
};
- mAlProps.Vmorpher.PhonemeA = get_phoneme(mEaxProps.mVocalMorpher.ulPhonemeA);
- mAlProps.Vmorpher.PhonemeACoarseTuning = static_cast<ALint>(mEaxProps.mVocalMorpher.lPhonemeACoarseTuning);
- mAlProps.Vmorpher.PhonemeB = get_phoneme(mEaxProps.mVocalMorpher.ulPhonemeB);
- mAlProps.Vmorpher.PhonemeBCoarseTuning = static_cast<ALint>(mEaxProps.mVocalMorpher.lPhonemeBCoarseTuning);
- mAlProps.Vmorpher.Waveform = get_waveform(mEaxProps.mVocalMorpher.ulWaveform);
- mAlProps.Vmorpher.Rate = mEaxProps.mVocalMorpher.flRate;
+ mAlProps.Vmorpher.PhonemeA = get_phoneme(props.mVocalMorpher.ulPhonemeA);
+ mAlProps.Vmorpher.PhonemeACoarseTuning = static_cast<int>(props.mVocalMorpher.lPhonemeACoarseTuning);
+ mAlProps.Vmorpher.PhonemeB = get_phoneme(props.mVocalMorpher.ulPhonemeB);
+ mAlProps.Vmorpher.PhonemeBCoarseTuning = static_cast<int>(props.mVocalMorpher.lPhonemeBCoarseTuning);
+ mAlProps.Vmorpher.Waveform = get_waveform(props.mVocalMorpher.ulWaveform);
+ mAlProps.Vmorpher.Rate = props.mVocalMorpher.flRate;
return true;
}