Subversion Repositories eduke32

Rev

Rev 8775 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8775 Rev 8784
Line 1034... Line 1034...
1034
        double tmpSampleEndDbl = (double)region->end, tmpLoopEndDbl = (double)tmpLoopEnd + 1.0;
1034
        double tmpSampleEndDbl = (double)region->end, tmpLoopEndDbl = (double)tmpLoopEnd + 1.0;
1035
        double tmpSourceSamplePosition = v->sourceSamplePosition;
1035
        double tmpSourceSamplePosition = v->sourceSamplePosition;
1036
        struct tsf_voice_lowpass tmpLowpass = v->lowpass;
1036
        struct tsf_voice_lowpass tmpLowpass = v->lowpass;
1037
1037
1038
        TSF_BOOL dynamicLowpass = (region->modLfoToFilterFc || region->modEnvToFilterFc);
1038
        TSF_BOOL dynamicLowpass = (region->modLfoToFilterFc || region->modEnvToFilterFc);
1039
        float tmpSampleRate, tmpInitialFilterFc, tmpModLfoToFilterFc, tmpModEnvToFilterFc;
1039
        float tmpSampleRate = f->outSampleRate, tmpInitialFilterFc, tmpModLfoToFilterFc, tmpModEnvToFilterFc;
1040
1040
1041
        TSF_BOOL dynamicPitchRatio = (region->modLfoToPitch || region->modEnvToPitch || region->vibLfoToPitch);
1041
        TSF_BOOL dynamicPitchRatio = (region->modLfoToPitch || region->modEnvToPitch || region->vibLfoToPitch);
1042
        double pitchRatio;
1042
        double pitchRatio;
1043
        float tmpModLfoToPitch, tmpVibLfoToPitch, tmpModEnvToPitch;
1043
        float tmpModLfoToPitch, tmpVibLfoToPitch, tmpModEnvToPitch;
1044
1044
1045
        TSF_BOOL dynamicGain = (region->modLfoToVolume != 0);
1045
        TSF_BOOL dynamicGain = (region->modLfoToVolume != 0);
1046
        float noteGain = 0, tmpModLfoToVolume;
1046
        float noteGain = 0, tmpModLfoToVolume;
1047
1047
1048
        if (dynamicLowpass) tmpSampleRate = f->outSampleRate, tmpInitialFilterFc = (float)region->initialFilterFc, tmpModLfoToFilterFc = (float)region->modLfoToFilterFc, tmpModEnvToFilterFc = (float)region->modEnvToFilterFc;
1048
        if (dynamicLowpass) tmpInitialFilterFc = (float)region->initialFilterFc, tmpModLfoToFilterFc = (float)region->modLfoToFilterFc, tmpModEnvToFilterFc = (float)region->modEnvToFilterFc;
1049
        else tmpSampleRate = 0, tmpInitialFilterFc = 0, tmpModLfoToFilterFc = 0, tmpModEnvToFilterFc = 0;
1049
        else tmpInitialFilterFc = 0, tmpModLfoToFilterFc = 0, tmpModEnvToFilterFc = 0;
1050
1050
1051
        if (dynamicPitchRatio) pitchRatio = 0, tmpModLfoToPitch = (float)region->modLfoToPitch, tmpVibLfoToPitch = (float)region->vibLfoToPitch, tmpModEnvToPitch = (float)region->modEnvToPitch;
1051
        if (dynamicPitchRatio) pitchRatio = 0, tmpModLfoToPitch = (float)region->modLfoToPitch, tmpVibLfoToPitch = (float)region->vibLfoToPitch, tmpModEnvToPitch = (float)region->modEnvToPitch;
1052
        else pitchRatio = tsf_timecents2Secsd(v->pitchInputTimecents) * v->pitchOutputFactor, tmpModLfoToPitch = 0, tmpVibLfoToPitch = 0, tmpModEnvToPitch = 0;
1052
        else pitchRatio = tsf_timecents2Secsd(v->pitchInputTimecents) * v->pitchOutputFactor, tmpModLfoToPitch = 0, tmpVibLfoToPitch = 0, tmpModEnvToPitch = 0;
1053
1053
1054
        if (dynamicGain) tmpModLfoToVolume = (float)region->modLfoToVolume * 0.1f;
1054
        if (dynamicGain) tmpModLfoToVolume = (float)region->modLfoToVolume * 0.1f;