Example #1
0
void CEFX::SetHeightRolloffModifer(const float& mod)
{
	heightRolloffModifier = mod;

	if (!supported)
		return;

	alEffectf(sfxReverb, AL_EAXREVERB_ROOM_ROLLOFF_FACTOR, sfxProperties->properties_f[AL_EAXREVERB_ROOM_ROLLOFF_FACTOR] * heightRolloffModifier);
	alAuxiliaryEffectSloti(sfxSlot, AL_EFFECTSLOT_EFFECT, sfxReverb);
}
Example #2
0
void CEFX::CommitEffects()
{
	if (!supported)
		return;

	//! commit reverb properties
	for (std::map<ALuint, ALfloat>::iterator it = sfxProperties->properties_f.begin(); it != sfxProperties->properties_f.end(); ++it)
		alEffectf(sfxReverb, it->first, it->second);
	for (std::map<ALuint, ALint>::iterator it = sfxProperties->properties_i.begin(); it != sfxProperties->properties_i.end(); ++it)
		alEffecti(sfxReverb, it->first, it->second);
	for (std::map<ALuint, float3>::iterator it = sfxProperties->properties_v.begin(); it != sfxProperties->properties_v.end(); ++it)
		alEffectfv(sfxReverb, it->first, (ALfloat*)&it->second[0]);

	alEffectf(sfxReverb, AL_EAXREVERB_ROOM_ROLLOFF_FACTOR, sfxProperties->properties_f[AL_EAXREVERB_ROOM_ROLLOFF_FACTOR] * heightRolloffModifier);
	alAuxiliaryEffectSloti(sfxSlot, AL_EFFECTSLOT_EFFECT, sfxReverb);

	for (std::map<ALuint, ALfloat>::iterator it=sfxProperties->filter_properties_f.begin(); it != sfxProperties->filter_properties_f.end(); ++it)
		alFilterf(sfxFilter, it->first, it->second);

	updates++;
}
Example #3
0
File: alEffect.c Project: m64/PEG
AL_API ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, ALfloat *pflValues)
{
    ALCcontext *Context;

    Context = alcGetCurrentContext();
    SuspendContext(Context);

    if (effect && alIsEffect(effect))
    {
        ALeffect *ALEffect = (ALeffect*)ALTHUNK_LOOKUPENTRY(effect);

        if(ALEffect->type == AL_EFFECT_REVERB)
        {
            switch(param)
            {
            case AL_REVERB_DENSITY:
            case AL_REVERB_DIFFUSION:
            case AL_REVERB_GAIN:
            case AL_REVERB_GAINHF:
            case AL_REVERB_DECAY_TIME:
            case AL_REVERB_DECAY_HFRATIO:
            case AL_REVERB_REFLECTIONS_GAIN:
            case AL_REVERB_REFLECTIONS_DELAY:
            case AL_REVERB_LATE_REVERB_GAIN:
            case AL_REVERB_LATE_REVERB_DELAY:
            case AL_REVERB_AIR_ABSORPTION_GAINHF:
            case AL_REVERB_ROOM_ROLLOFF_FACTOR:
                alEffectf(effect, param, pflValues[0]);
                break;

            default:
                alSetError(AL_INVALID_ENUM);
                break;
            }
        }
        else
            alSetError(AL_INVALID_ENUM);
    }
    else
        alSetError(AL_INVALID_NAME);

    ProcessContext(Context);
}
Example #4
0
	void Equalizer::setMid2Width(float value) {
		value = std::min(value, 1.0f);
		value = std::max(value, 0.01f);
		m_mid2Width = value;
		alEffectf(m_effect, AL_EQUALIZER_MID2_WIDTH, m_mid2Width);
	}
Example #5
0
	void Equalizer::setHighGain(float value) {
		value = std::min(value, 7.943f);
		value = std::max(value, 0.126f);
		m_highGain = value;
		alEffectf(m_effect, AL_EQUALIZER_HIGH_GAIN, m_highGain);
	}
Example #6
0
ALboolean QOpenALEngine::SetEFXEAXReverbProperties(EFXEAXREVERBPROPERTIES *pEFXEAXReverb, ALuint uiEffect)
{
    ALboolean bReturn = AL_FALSE;

    if (pEFXEAXReverb)
    {
        // Clear AL Error code
        alGetError();

        alEffectf(uiEffect, AL_EAXREVERB_DENSITY, pEFXEAXReverb->flDensity);
        alEffectf(uiEffect, AL_EAXREVERB_DIFFUSION, pEFXEAXReverb->flDiffusion);
        alEffectf(uiEffect, AL_EAXREVERB_GAIN, pEFXEAXReverb->flGain);
        alEffectf(uiEffect, AL_EAXREVERB_GAINHF, pEFXEAXReverb->flGainHF);
        alEffectf(uiEffect, AL_EAXREVERB_GAINLF, pEFXEAXReverb->flGainLF);
        alEffectf(uiEffect, AL_EAXREVERB_DECAY_TIME, pEFXEAXReverb->flDecayTime);
        alEffectf(uiEffect, AL_EAXREVERB_DECAY_HFRATIO, pEFXEAXReverb->flDecayHFRatio);
        alEffectf(uiEffect, AL_EAXREVERB_DECAY_LFRATIO, pEFXEAXReverb->flDecayLFRatio);
        alEffectf(uiEffect, AL_EAXREVERB_REFLECTIONS_GAIN, pEFXEAXReverb->flReflectionsGain);
        alEffectf(uiEffect, AL_EAXREVERB_REFLECTIONS_DELAY, pEFXEAXReverb->flReflectionsDelay);
        alEffectfv(uiEffect, AL_EAXREVERB_REFLECTIONS_PAN, pEFXEAXReverb->flReflectionsPan);
        alEffectf(uiEffect, AL_EAXREVERB_LATE_REVERB_GAIN, pEFXEAXReverb->flLateReverbGain);
        alEffectf(uiEffect, AL_EAXREVERB_LATE_REVERB_DELAY, pEFXEAXReverb->flLateReverbDelay);
        alEffectfv(uiEffect, AL_EAXREVERB_LATE_REVERB_PAN, pEFXEAXReverb->flLateReverbPan);
        alEffectf(uiEffect, AL_EAXREVERB_ECHO_TIME, pEFXEAXReverb->flEchoTime);
        alEffectf(uiEffect, AL_EAXREVERB_ECHO_DEPTH, pEFXEAXReverb->flEchoDepth);
        alEffectf(uiEffect, AL_EAXREVERB_MODULATION_TIME, pEFXEAXReverb->flModulationTime);
        alEffectf(uiEffect, AL_EAXREVERB_MODULATION_DEPTH, pEFXEAXReverb->flModulationDepth);
        alEffectf(uiEffect, AL_EAXREVERB_AIR_ABSORPTION_GAINHF, pEFXEAXReverb->flAirAbsorptionGainHF);
        alEffectf(uiEffect, AL_EAXREVERB_HFREFERENCE, pEFXEAXReverb->flHFReference);
        alEffectf(uiEffect, AL_EAXREVERB_LFREFERENCE, pEFXEAXReverb->flLFReference);
        alEffectf(uiEffect, AL_EAXREVERB_ROOM_ROLLOFF_FACTOR, pEFXEAXReverb->flRoomRolloffFactor);
        alEffecti(uiEffect, AL_EAXREVERB_DECAY_HFLIMIT, pEFXEAXReverb->iDecayHFLimit);

        if (alGetError() == AL_NO_ERROR)
            bReturn = AL_TRUE;
    }

    return bReturn;
}
Example #7
0
	void FrequencyShifter::setFrequency(float value) {
		value = std::min(value, 24000.0f);
		value = std::max(value, 0.0f);
		m_frequency = value;
		alEffectf(m_effect, AL_FREQUENCY_SHIFTER_FREQUENCY, m_frequency);
	}
Example #8
0
AL_API ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint iValue)
{
    ALCcontext *Context;
    ALCdevice  *Device;
    ALeffect   *ALEffect;

    Context = GetContextSuspended();
    if(!Context) return;

    Device = Context->Device;
    if((ALEffect=LookupEffect(Device->EffectMap, effect)) != NULL)
    {
        if(param == AL_EFFECT_TYPE)
        {
            ALboolean isOk = (iValue == AL_EFFECT_NULL ||
                (iValue == AL_EFFECT_EAXREVERB && !DisabledEffects[EAXREVERB]) ||
                (iValue == AL_EFFECT_REVERB && !DisabledEffects[REVERB]) ||
                (iValue == AL_EFFECT_ECHO && !DisabledEffects[ECHO]) ||
                (iValue == AL_EFFECT_RING_MODULATOR && !DisabledEffects[MODULATOR]));

            if(isOk)
                InitEffectParams(ALEffect, iValue);
            else
                alSetError(Context, AL_INVALID_VALUE);
        }
        else if(ALEffect->type == AL_EFFECT_EAXREVERB)
        {
            switch(param)
            {
            case AL_EAXREVERB_DECAY_HFLIMIT:
                if(iValue >= AL_EAXREVERB_MIN_DECAY_HFLIMIT &&
                   iValue <= AL_EAXREVERB_MAX_DECAY_HFLIMIT)
                    ALEffect->Reverb.DecayHFLimit = iValue;
                else
                    alSetError(Context, AL_INVALID_VALUE);
                break;

            default:
                alSetError(Context, AL_INVALID_ENUM);
                break;
            }
        }
        else if(ALEffect->type == AL_EFFECT_REVERB)
        {
            switch(param)
            {
            case AL_REVERB_DECAY_HFLIMIT:
                if(iValue >= AL_REVERB_MIN_DECAY_HFLIMIT &&
                   iValue <= AL_REVERB_MAX_DECAY_HFLIMIT)
                    ALEffect->Reverb.DecayHFLimit = iValue;
                else
                    alSetError(Context, AL_INVALID_VALUE);
                break;

            default:
                alSetError(Context, AL_INVALID_ENUM);
                break;
            }
        }
        else if(ALEffect->type == AL_EFFECT_ECHO)
        {
            switch(param)
            {
            default:
                alSetError(Context, AL_INVALID_ENUM);
                break;
            }
        }
        else if(ALEffect->type == AL_EFFECT_RING_MODULATOR)
        {
            switch(param)
            {
            case AL_RING_MODULATOR_FREQUENCY:
            case AL_RING_MODULATOR_HIGHPASS_CUTOFF:
                alEffectf(effect, param, (ALfloat)iValue);
                break;

            case AL_RING_MODULATOR_WAVEFORM:
                if(iValue >= AL_RING_MODULATOR_MIN_WAVEFORM &&
                   iValue <= AL_RING_MODULATOR_MAX_WAVEFORM)
                    ALEffect->Modulator.Waveform = iValue;
                else
                    alSetError(Context, AL_INVALID_VALUE);
                break;

            default:
                alSetError(Context, AL_INVALID_ENUM);
                break;
            }
        }
        else
            alSetError(Context, AL_INVALID_ENUM);
    }
    else
        alSetError(Context, AL_INVALID_NAME);

    ProcessContext(Context);
}
Example #9
0
ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, ALfloat *pflValues)
{
    ALCcontext *Context;

    Context = alcGetCurrentContext();
    SuspendContext(Context);

    if (effect && alIsEffect(effect))
    {
        ALeffect *ALEffect = (ALeffect*)ALTHUNK_LOOKUPENTRY(effect);

        if(ALEffect->type == AL_EFFECT_EAXREVERB)
        {
            switch(param)
            {
            case AL_EAXREVERB_DENSITY:
            case AL_EAXREVERB_DIFFUSION:
            case AL_EAXREVERB_GAIN:
            case AL_EAXREVERB_GAINHF:
            case AL_EAXREVERB_GAINLF:
            case AL_EAXREVERB_DECAY_TIME:
            case AL_EAXREVERB_DECAY_HFRATIO:
            case AL_EAXREVERB_DECAY_LFRATIO:
            case AL_EAXREVERB_REFLECTIONS_GAIN:
            case AL_EAXREVERB_REFLECTIONS_DELAY:
            case AL_EAXREVERB_LATE_REVERB_GAIN:
            case AL_EAXREVERB_LATE_REVERB_DELAY:
            case AL_EAXREVERB_AIR_ABSORPTION_GAINHF:
            case AL_EAXREVERB_ECHO_TIME:
            case AL_EAXREVERB_ECHO_DEPTH:
            case AL_EAXREVERB_MODULATION_TIME:
            case AL_EAXREVERB_MODULATION_DEPTH:
            case AL_EAXREVERB_HFREFERENCE:
            case AL_EAXREVERB_LFREFERENCE:
            case AL_EAXREVERB_ROOM_ROLLOFF_FACTOR:
                alEffectf(effect, param, pflValues[0]);
                break;

            case AL_EAXREVERB_REFLECTIONS_PAN:
                if(!isnan(pflValues[0]) && !isnan(pflValues[1]) && !isnan(pflValues[2]))
                {
                    ALEffect->Reverb.ReflectionsPan[0] = pflValues[0];
                    ALEffect->Reverb.ReflectionsPan[1] = pflValues[1];
                    ALEffect->Reverb.ReflectionsPan[2] = pflValues[2];
                }
                else
                    alSetError(AL_INVALID_VALUE);
                break;
            case AL_EAXREVERB_LATE_REVERB_PAN:
                if(!isnan(pflValues[0]) && !isnan(pflValues[1]) && !isnan(pflValues[2]))
                {
                    ALEffect->Reverb.LateReverbPan[0] = pflValues[0];
                    ALEffect->Reverb.LateReverbPan[1] = pflValues[1];
                    ALEffect->Reverb.LateReverbPan[2] = pflValues[2];
                }
                else
                    alSetError(AL_INVALID_VALUE);
                break;

            default:
                alSetError(AL_INVALID_ENUM);
                break;
            }
        }
        else if(ALEffect->type == AL_EFFECT_REVERB)
        {
            switch(param)
            {
            case AL_REVERB_DENSITY:
            case AL_REVERB_DIFFUSION:
            case AL_REVERB_GAIN:
            case AL_REVERB_GAINHF:
            case AL_REVERB_DECAY_TIME:
            case AL_REVERB_DECAY_HFRATIO:
            case AL_REVERB_REFLECTIONS_GAIN:
            case AL_REVERB_REFLECTIONS_DELAY:
            case AL_REVERB_LATE_REVERB_GAIN:
            case AL_REVERB_LATE_REVERB_DELAY:
            case AL_REVERB_AIR_ABSORPTION_GAINHF:
            case AL_REVERB_ROOM_ROLLOFF_FACTOR:
                alEffectf(effect, param, pflValues[0]);
                break;

            default:
                alSetError(AL_INVALID_ENUM);
                break;
            }
        }
        else if(ALEffect->type == AL_EFFECT_ECHO)
        {
            switch(param)
            {
            case AL_ECHO_DELAY:
            case AL_ECHO_LRDELAY:
            case AL_ECHO_DAMPING:
            case AL_ECHO_FEEDBACK:
            case AL_ECHO_SPREAD:
                alEffectf(effect, param, pflValues[0]);
                break;

            default:
                alSetError(AL_INVALID_ENUM);
                break;
            }
        }
        else
            alSetError(AL_INVALID_ENUM);
    }
    else
        alSetError(AL_INVALID_NAME);

    ProcessContext(Context);
}
Example #10
0
	void Autowah::setResonance(float value) {
		value = std::min(value, 1000.0f);
		value = std::max(value, 2.0f);
		m_resonance = value;
		alEffectf(m_effect, AL_AUTOWAH_RESONANCE, m_resonance);
	}
Example #11
0
	void EaxReverb::setDiffusion(float value) {
		value = std::min(value, 1.0f);
		value = std::max(value, 0.0f);
		m_diffusion = value;
		alEffectf(m_effect, AL_EAXREVERB_DIFFUSION, m_diffusion);
	}
Example #12
0
	void Autowah::setAttackTime(float value) {
		value = std::min(value, 1.0f);
		value = std::max(value, 0.0001f);
		m_attackTime = value;
		alEffectf(m_effect, AL_AUTOWAH_ATTACK_TIME, m_attackTime);
	}
Example #13
0
	void Autowah::setReleaseTime(float value) {
		value = std::min(value, 1.0f);
		value = std::max(value, 0.0001f);
		m_releaseTime = value;
		alEffectf(m_effect, AL_AUTOWAH_RELEASE_TIME, m_releaseTime);
	}
Example #14
0
	void RingModulator::setHighpassCutoff(float value) {
		value = std::min(value, 24000.0f);
		value = std::max(value, 0.0f);
		m_highpassCutoff = value;
		alEffectf(m_effect, AL_RING_MODULATOR_HIGHPASS_CUTOFF, m_highpassCutoff);
	}
Example #15
0
	void RingModulator::setFrequency(float value) {
		value = std::min(value, 8000.0f);
		value = std::max(value, 0.0f);
		m_frequency = value;
		alEffectf(m_effect, AL_RING_MODULATOR_FREQUENCY, m_frequency);
	}
Example #16
0
	void VocalMorpher::setRate(float value) {
		value = std::min(value, 10.0f);
		value = std::max(value, 0.0f);
		m_rate = value;
		alEffectf(m_effect, AL_VOCAL_MORPHER_RATE, m_rate);
	}
Example #17
0
	void Equalizer::setHighCutoff(float value) {
		value = std::min(value, 16000.0f);
		value = std::max(value, 4000.0f);
		m_highCutoff = value;
		alEffectf(m_effect, AL_EQUALIZER_HIGH_CUTOFF, m_highCutoff);
	}
Example #18
0
	void Autowah::setPeakGain(float value) {
		value = std::min(value, 31621.0f);
		value = std::max(value, 0.00003f);
		m_peakGain = value;
		alEffectf(m_effect, AL_AUTOWAH_PEAK_GAIN, m_peakGain);
	}
Example #19
0
	void EaxReverb::setDensity(float value) {
		value = std::min(value, 1.0f);
		value = std::max(value, 0.0f);
		m_density = value;
		alEffectf(m_effect, AL_EAXREVERB_DENSITY, m_density);
	}
Example #20
0
	void Equalizer::setLowGain(float value) {
		value = std::min(value, 7.943f);
		value = std::max(value, 0.126f);
		m_lowGain = value;
		alEffectf(m_effect, AL_EQUALIZER_LOW_GAIN, m_lowGain);
	}
Example #21
0
	void EaxReverb::setGainHf(float value) {
		value = std::min(value, 1.0f);
		value = std::max(value, 0.0f);
		m_gainHf = value;
		alEffectf(m_effect, AL_EAXREVERB_GAINHF, m_gainHf);
	}
Example #22
0
	void Equalizer::setLowCutoff(float value) {
		value = std::min(value, 800.0f);
		value = std::max(value, 50.0f);
		m_lowCutoff = value;
		alEffectf(m_effect, AL_EQUALIZER_LOW_CUTOFF, m_lowCutoff);
	}
Example #23
0
AL_API ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, ALfloat *pflValues)
{
    ALCcontext *Context;
    ALCdevice  *Device;
    ALeffect   *ALEffect;

    Context = GetContextSuspended();
    if(!Context) return;

    Device = Context->Device;
    if((ALEffect=LookupEffect(Device->EffectMap, effect)) != NULL)
    {
        if(ALEffect->type == AL_EFFECT_EAXREVERB)
        {
            switch(param)
            {
            case AL_EAXREVERB_DENSITY:
            case AL_EAXREVERB_DIFFUSION:
            case AL_EAXREVERB_GAIN:
            case AL_EAXREVERB_GAINHF:
            case AL_EAXREVERB_GAINLF:
            case AL_EAXREVERB_DECAY_TIME:
            case AL_EAXREVERB_DECAY_HFRATIO:
            case AL_EAXREVERB_DECAY_LFRATIO:
            case AL_EAXREVERB_REFLECTIONS_GAIN:
            case AL_EAXREVERB_REFLECTIONS_DELAY:
            case AL_EAXREVERB_LATE_REVERB_GAIN:
            case AL_EAXREVERB_LATE_REVERB_DELAY:
            case AL_EAXREVERB_AIR_ABSORPTION_GAINHF:
            case AL_EAXREVERB_ECHO_TIME:
            case AL_EAXREVERB_ECHO_DEPTH:
            case AL_EAXREVERB_MODULATION_TIME:
            case AL_EAXREVERB_MODULATION_DEPTH:
            case AL_EAXREVERB_HFREFERENCE:
            case AL_EAXREVERB_LFREFERENCE:
            case AL_EAXREVERB_ROOM_ROLLOFF_FACTOR:
                alEffectf(effect, param, pflValues[0]);
                break;

            case AL_EAXREVERB_REFLECTIONS_PAN:
                if(!isnan(pflValues[0]) && !isnan(pflValues[1]) && !isnan(pflValues[2]))
                {
                    ALEffect->Reverb.ReflectionsPan[0] = pflValues[0];
                    ALEffect->Reverb.ReflectionsPan[1] = pflValues[1];
                    ALEffect->Reverb.ReflectionsPan[2] = pflValues[2];
                }
                else
                    alSetError(Context, AL_INVALID_VALUE);
                break;
            case AL_EAXREVERB_LATE_REVERB_PAN:
                if(!isnan(pflValues[0]) && !isnan(pflValues[1]) && !isnan(pflValues[2]))
                {
                    ALEffect->Reverb.LateReverbPan[0] = pflValues[0];
                    ALEffect->Reverb.LateReverbPan[1] = pflValues[1];
                    ALEffect->Reverb.LateReverbPan[2] = pflValues[2];
                }
                else
                    alSetError(Context, AL_INVALID_VALUE);
                break;

            default:
                alSetError(Context, AL_INVALID_ENUM);
                break;
            }
        }
        else if(ALEffect->type == AL_EFFECT_REVERB)
        {
            switch(param)
            {
            case AL_REVERB_DENSITY:
            case AL_REVERB_DIFFUSION:
            case AL_REVERB_GAIN:
            case AL_REVERB_GAINHF:
            case AL_REVERB_DECAY_TIME:
            case AL_REVERB_DECAY_HFRATIO:
            case AL_REVERB_REFLECTIONS_GAIN:
            case AL_REVERB_REFLECTIONS_DELAY:
            case AL_REVERB_LATE_REVERB_GAIN:
            case AL_REVERB_LATE_REVERB_DELAY:
            case AL_REVERB_AIR_ABSORPTION_GAINHF:
            case AL_REVERB_ROOM_ROLLOFF_FACTOR:
                alEffectf(effect, param, pflValues[0]);
                break;

            default:
                alSetError(Context, AL_INVALID_ENUM);
                break;
            }
        }
        else if(ALEffect->type == AL_EFFECT_ECHO)
        {
            switch(param)
            {
            case AL_ECHO_DELAY:
            case AL_ECHO_LRDELAY:
            case AL_ECHO_DAMPING:
            case AL_ECHO_FEEDBACK:
            case AL_ECHO_SPREAD:
                alEffectf(effect, param, pflValues[0]);
                break;

            default:
                alSetError(Context, AL_INVALID_ENUM);
                break;
            }
        }
        else if(ALEffect->type == AL_EFFECT_RING_MODULATOR)
        {
            switch(param)
            {
            case AL_RING_MODULATOR_FREQUENCY:
            case AL_RING_MODULATOR_HIGHPASS_CUTOFF:
                alEffectf(effect, param, pflValues[0]);
                break;

            default:
                alSetError(Context, AL_INVALID_ENUM);
                break;
            }
        }
        else
            alSetError(Context, AL_INVALID_ENUM);
    }
    else
        alSetError(Context, AL_INVALID_NAME);

    ProcessContext(Context);
}
Example #24
0
	void Flanger::setFeedback(float value) {
		value = std::min(value, 1.0f);
		value = std::max(value, -1.0f);
		m_feedback = value;
		alEffectf(m_effect, AL_FLANGER_FEEDBACK, m_feedback);
	}
Example #25
0
static ALvoid CDECL wine_alEffectf(ALuint eid, ALenum param, ALfloat value)
{
    alEffectf(eid, param, value);
}
Example #26
0
	void Flanger::setDepth(float value) {
		value = std::min(value, 1.0f);
		value = std::max(value, 0.0f);
		m_depth = value;
		alEffectf(m_effect, AL_FLANGER_DEPTH, m_depth);
	}
Example #27
0
	void Equalizer::setMid2Gain(float value) {
		value = std::min(value, 7.943f);
		value = std::max(value, 0.126f);
		m_mid2Gain = value;
		alEffectf(m_effect, AL_EQUALIZER_MID2_GAIN, m_mid2Gain);
	}
Example #28
0
	void Flanger::setDelay(float value) {
		value = std::min(value, 0.004f);
		value = std::max(value, 0.0f);
		m_delay = value;
		alEffectf(m_effect, AL_FLANGER_DELAY, m_delay);
	}
Example #29
0
	void Equalizer::setMid2Center(float value) {
		value = std::min(value, 8000.0f);
		value = std::max(value, 1000.0f);
		m_mid2Center = value;
		alEffectf(m_effect, AL_EQUALIZER_MID2_CENTER, m_mid2Center);
	}
Example #30
0
	void Flanger::setRate(float value) {
		value = std::min(value, 10.0f);
		value = std::max(value, 0.0f);
		m_rate = value;
		alEffectf(m_effect, AL_FLANGER_RATE, m_rate);
	}