diff options
Diffstat (limited to 'OpenAL32/alEffect.c')
-rw-r--r-- | OpenAL32/alEffect.c | 206 |
1 files changed, 103 insertions, 103 deletions
diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c index dded17b1..827a2439 100644 --- a/OpenAL32/alEffect.c +++ b/OpenAL32/alEffect.c @@ -368,107 +368,107 @@ static void InitEffectParams(ALeffect *effect, ALenum type) switch(type) { case AL_EFFECT_EAXREVERB: - effect->Reverb.Density = AL_EAXREVERB_DEFAULT_DENSITY; - effect->Reverb.Diffusion = AL_EAXREVERB_DEFAULT_DIFFUSION; - effect->Reverb.Gain = AL_EAXREVERB_DEFAULT_GAIN; - effect->Reverb.GainHF = AL_EAXREVERB_DEFAULT_GAINHF; - effect->Reverb.GainLF = AL_EAXREVERB_DEFAULT_GAINLF; - effect->Reverb.DecayTime = AL_EAXREVERB_DEFAULT_DECAY_TIME; - effect->Reverb.DecayHFRatio = AL_EAXREVERB_DEFAULT_DECAY_HFRATIO; - effect->Reverb.DecayLFRatio = AL_EAXREVERB_DEFAULT_DECAY_LFRATIO; - effect->Reverb.ReflectionsGain = AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN; - effect->Reverb.ReflectionsDelay = AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY; - effect->Reverb.ReflectionsPan[0] = AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ; - effect->Reverb.ReflectionsPan[1] = AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ; - effect->Reverb.ReflectionsPan[2] = AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ; - effect->Reverb.LateReverbGain = AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN; - effect->Reverb.LateReverbDelay = AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY; - effect->Reverb.LateReverbPan[0] = AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ; - effect->Reverb.LateReverbPan[1] = AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ; - effect->Reverb.LateReverbPan[2] = AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ; - effect->Reverb.EchoTime = AL_EAXREVERB_DEFAULT_ECHO_TIME; - effect->Reverb.EchoDepth = AL_EAXREVERB_DEFAULT_ECHO_DEPTH; - effect->Reverb.ModulationTime = AL_EAXREVERB_DEFAULT_MODULATION_TIME; - effect->Reverb.ModulationDepth = AL_EAXREVERB_DEFAULT_MODULATION_DEPTH; - effect->Reverb.AirAbsorptionGainHF = AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF; - effect->Reverb.HFReference = AL_EAXREVERB_DEFAULT_HFREFERENCE; - effect->Reverb.LFReference = AL_EAXREVERB_DEFAULT_LFREFERENCE; - effect->Reverb.RoomRolloffFactor = AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR; - effect->Reverb.DecayHFLimit = AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT; + effect->Props.Reverb.Density = AL_EAXREVERB_DEFAULT_DENSITY; + effect->Props.Reverb.Diffusion = AL_EAXREVERB_DEFAULT_DIFFUSION; + effect->Props.Reverb.Gain = AL_EAXREVERB_DEFAULT_GAIN; + effect->Props.Reverb.GainHF = AL_EAXREVERB_DEFAULT_GAINHF; + effect->Props.Reverb.GainLF = AL_EAXREVERB_DEFAULT_GAINLF; + effect->Props.Reverb.DecayTime = AL_EAXREVERB_DEFAULT_DECAY_TIME; + effect->Props.Reverb.DecayHFRatio = AL_EAXREVERB_DEFAULT_DECAY_HFRATIO; + effect->Props.Reverb.DecayLFRatio = AL_EAXREVERB_DEFAULT_DECAY_LFRATIO; + effect->Props.Reverb.ReflectionsGain = AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN; + effect->Props.Reverb.ReflectionsDelay = AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY; + effect->Props.Reverb.ReflectionsPan[0] = AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ; + effect->Props.Reverb.ReflectionsPan[1] = AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ; + effect->Props.Reverb.ReflectionsPan[2] = AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ; + effect->Props.Reverb.LateReverbGain = AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN; + effect->Props.Reverb.LateReverbDelay = AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY; + effect->Props.Reverb.LateReverbPan[0] = AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ; + effect->Props.Reverb.LateReverbPan[1] = AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ; + effect->Props.Reverb.LateReverbPan[2] = AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ; + effect->Props.Reverb.EchoTime = AL_EAXREVERB_DEFAULT_ECHO_TIME; + effect->Props.Reverb.EchoDepth = AL_EAXREVERB_DEFAULT_ECHO_DEPTH; + effect->Props.Reverb.ModulationTime = AL_EAXREVERB_DEFAULT_MODULATION_TIME; + effect->Props.Reverb.ModulationDepth = AL_EAXREVERB_DEFAULT_MODULATION_DEPTH; + effect->Props.Reverb.AirAbsorptionGainHF = AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF; + effect->Props.Reverb.HFReference = AL_EAXREVERB_DEFAULT_HFREFERENCE; + effect->Props.Reverb.LFReference = AL_EAXREVERB_DEFAULT_LFREFERENCE; + effect->Props.Reverb.RoomRolloffFactor = AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR; + effect->Props.Reverb.DecayHFLimit = AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT; effect->vtbl = &ALeaxreverb_vtable; break; case AL_EFFECT_REVERB: - effect->Reverb.Density = AL_REVERB_DEFAULT_DENSITY; - effect->Reverb.Diffusion = AL_REVERB_DEFAULT_DIFFUSION; - effect->Reverb.Gain = AL_REVERB_DEFAULT_GAIN; - effect->Reverb.GainHF = AL_REVERB_DEFAULT_GAINHF; - effect->Reverb.DecayTime = AL_REVERB_DEFAULT_DECAY_TIME; - effect->Reverb.DecayHFRatio = AL_REVERB_DEFAULT_DECAY_HFRATIO; - effect->Reverb.ReflectionsGain = AL_REVERB_DEFAULT_REFLECTIONS_GAIN; - effect->Reverb.ReflectionsDelay = AL_REVERB_DEFAULT_REFLECTIONS_DELAY; - effect->Reverb.LateReverbGain = AL_REVERB_DEFAULT_LATE_REVERB_GAIN; - effect->Reverb.LateReverbDelay = AL_REVERB_DEFAULT_LATE_REVERB_DELAY; - effect->Reverb.AirAbsorptionGainHF = AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF; - effect->Reverb.RoomRolloffFactor = AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR; - effect->Reverb.DecayHFLimit = AL_REVERB_DEFAULT_DECAY_HFLIMIT; + effect->Props.Reverb.Density = AL_REVERB_DEFAULT_DENSITY; + effect->Props.Reverb.Diffusion = AL_REVERB_DEFAULT_DIFFUSION; + effect->Props.Reverb.Gain = AL_REVERB_DEFAULT_GAIN; + effect->Props.Reverb.GainHF = AL_REVERB_DEFAULT_GAINHF; + effect->Props.Reverb.DecayTime = AL_REVERB_DEFAULT_DECAY_TIME; + effect->Props.Reverb.DecayHFRatio = AL_REVERB_DEFAULT_DECAY_HFRATIO; + effect->Props.Reverb.ReflectionsGain = AL_REVERB_DEFAULT_REFLECTIONS_GAIN; + effect->Props.Reverb.ReflectionsDelay = AL_REVERB_DEFAULT_REFLECTIONS_DELAY; + effect->Props.Reverb.LateReverbGain = AL_REVERB_DEFAULT_LATE_REVERB_GAIN; + effect->Props.Reverb.LateReverbDelay = AL_REVERB_DEFAULT_LATE_REVERB_DELAY; + effect->Props.Reverb.AirAbsorptionGainHF = AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF; + effect->Props.Reverb.RoomRolloffFactor = AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR; + effect->Props.Reverb.DecayHFLimit = AL_REVERB_DEFAULT_DECAY_HFLIMIT; effect->vtbl = &ALreverb_vtable; break; case AL_EFFECT_CHORUS: - effect->Chorus.Waveform = AL_CHORUS_DEFAULT_WAVEFORM; - effect->Chorus.Phase = AL_CHORUS_DEFAULT_PHASE; - effect->Chorus.Rate = AL_CHORUS_DEFAULT_RATE; - effect->Chorus.Depth = AL_CHORUS_DEFAULT_DEPTH; - effect->Chorus.Feedback = AL_CHORUS_DEFAULT_FEEDBACK; - effect->Chorus.Delay = AL_CHORUS_DEFAULT_DELAY; + effect->Props.Chorus.Waveform = AL_CHORUS_DEFAULT_WAVEFORM; + effect->Props.Chorus.Phase = AL_CHORUS_DEFAULT_PHASE; + effect->Props.Chorus.Rate = AL_CHORUS_DEFAULT_RATE; + effect->Props.Chorus.Depth = AL_CHORUS_DEFAULT_DEPTH; + effect->Props.Chorus.Feedback = AL_CHORUS_DEFAULT_FEEDBACK; + effect->Props.Chorus.Delay = AL_CHORUS_DEFAULT_DELAY; effect->vtbl = &ALchorus_vtable; break; case AL_EFFECT_DISTORTION: - effect->Distortion.Edge = AL_DISTORTION_DEFAULT_EDGE; - effect->Distortion.Gain = AL_DISTORTION_DEFAULT_GAIN; - effect->Distortion.LowpassCutoff = AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF; - effect->Distortion.EQCenter = AL_DISTORTION_DEFAULT_EQCENTER; - effect->Distortion.EQBandwidth = AL_DISTORTION_DEFAULT_EQBANDWIDTH; + effect->Props.Distortion.Edge = AL_DISTORTION_DEFAULT_EDGE; + effect->Props.Distortion.Gain = AL_DISTORTION_DEFAULT_GAIN; + effect->Props.Distortion.LowpassCutoff = AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF; + effect->Props.Distortion.EQCenter = AL_DISTORTION_DEFAULT_EQCENTER; + effect->Props.Distortion.EQBandwidth = AL_DISTORTION_DEFAULT_EQBANDWIDTH; effect->vtbl = &ALdistortion_vtable; break; case AL_EFFECT_ECHO: - effect->Echo.Delay = AL_ECHO_DEFAULT_DELAY; - effect->Echo.LRDelay = AL_ECHO_DEFAULT_LRDELAY; - effect->Echo.Damping = AL_ECHO_DEFAULT_DAMPING; - effect->Echo.Feedback = AL_ECHO_DEFAULT_FEEDBACK; - effect->Echo.Spread = AL_ECHO_DEFAULT_SPREAD; + effect->Props.Echo.Delay = AL_ECHO_DEFAULT_DELAY; + effect->Props.Echo.LRDelay = AL_ECHO_DEFAULT_LRDELAY; + effect->Props.Echo.Damping = AL_ECHO_DEFAULT_DAMPING; + effect->Props.Echo.Feedback = AL_ECHO_DEFAULT_FEEDBACK; + effect->Props.Echo.Spread = AL_ECHO_DEFAULT_SPREAD; effect->vtbl = &ALecho_vtable; break; case AL_EFFECT_EQUALIZER: - effect->Equalizer.LowCutoff = AL_EQUALIZER_DEFAULT_LOW_CUTOFF; - effect->Equalizer.LowGain = AL_EQUALIZER_DEFAULT_LOW_GAIN; - effect->Equalizer.Mid1Center = AL_EQUALIZER_DEFAULT_MID1_CENTER; - effect->Equalizer.Mid1Gain = AL_EQUALIZER_DEFAULT_MID1_GAIN; - effect->Equalizer.Mid1Width = AL_EQUALIZER_DEFAULT_MID1_WIDTH; - effect->Equalizer.Mid2Center = AL_EQUALIZER_DEFAULT_MID2_CENTER; - effect->Equalizer.Mid2Gain = AL_EQUALIZER_DEFAULT_MID2_GAIN; - effect->Equalizer.Mid2Width = AL_EQUALIZER_DEFAULT_MID2_WIDTH; - effect->Equalizer.HighCutoff = AL_EQUALIZER_DEFAULT_HIGH_CUTOFF; - effect->Equalizer.HighGain = AL_EQUALIZER_DEFAULT_HIGH_GAIN; + effect->Props.Equalizer.LowCutoff = AL_EQUALIZER_DEFAULT_LOW_CUTOFF; + effect->Props.Equalizer.LowGain = AL_EQUALIZER_DEFAULT_LOW_GAIN; + effect->Props.Equalizer.Mid1Center = AL_EQUALIZER_DEFAULT_MID1_CENTER; + effect->Props.Equalizer.Mid1Gain = AL_EQUALIZER_DEFAULT_MID1_GAIN; + effect->Props.Equalizer.Mid1Width = AL_EQUALIZER_DEFAULT_MID1_WIDTH; + effect->Props.Equalizer.Mid2Center = AL_EQUALIZER_DEFAULT_MID2_CENTER; + effect->Props.Equalizer.Mid2Gain = AL_EQUALIZER_DEFAULT_MID2_GAIN; + effect->Props.Equalizer.Mid2Width = AL_EQUALIZER_DEFAULT_MID2_WIDTH; + effect->Props.Equalizer.HighCutoff = AL_EQUALIZER_DEFAULT_HIGH_CUTOFF; + effect->Props.Equalizer.HighGain = AL_EQUALIZER_DEFAULT_HIGH_GAIN; effect->vtbl = &ALequalizer_vtable; break; case AL_EFFECT_FLANGER: - effect->Flanger.Waveform = AL_FLANGER_DEFAULT_WAVEFORM; - effect->Flanger.Phase = AL_FLANGER_DEFAULT_PHASE; - effect->Flanger.Rate = AL_FLANGER_DEFAULT_RATE; - effect->Flanger.Depth = AL_FLANGER_DEFAULT_DEPTH; - effect->Flanger.Feedback = AL_FLANGER_DEFAULT_FEEDBACK; - effect->Flanger.Delay = AL_FLANGER_DEFAULT_DELAY; + effect->Props.Flanger.Waveform = AL_FLANGER_DEFAULT_WAVEFORM; + effect->Props.Flanger.Phase = AL_FLANGER_DEFAULT_PHASE; + effect->Props.Flanger.Rate = AL_FLANGER_DEFAULT_RATE; + effect->Props.Flanger.Depth = AL_FLANGER_DEFAULT_DEPTH; + effect->Props.Flanger.Feedback = AL_FLANGER_DEFAULT_FEEDBACK; + effect->Props.Flanger.Delay = AL_FLANGER_DEFAULT_DELAY; effect->vtbl = &ALflanger_vtable; break; case AL_EFFECT_RING_MODULATOR: - effect->Modulator.Frequency = AL_RING_MODULATOR_DEFAULT_FREQUENCY; - effect->Modulator.HighPassCutoff = AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF; - effect->Modulator.Waveform = AL_RING_MODULATOR_DEFAULT_WAVEFORM; + effect->Props.Modulator.Frequency = AL_RING_MODULATOR_DEFAULT_FREQUENCY; + effect->Props.Modulator.HighPassCutoff = AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF; + effect->Props.Modulator.Waveform = AL_RING_MODULATOR_DEFAULT_WAVEFORM; effect->vtbl = &ALmodulator_vtable; break; case AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT: case AL_EFFECT_DEDICATED_DIALOGUE: - effect->Dedicated.Gain = 1.0f; + effect->Props.Dedicated.Gain = 1.0f; effect->vtbl = &ALdedicated_vtable; break; default: @@ -641,33 +641,33 @@ ALvoid LoadReverbPreset(const char *name, ALeffect *effect) TRACE("Loading reverb '%s'\n", reverblist[i].name); props = &reverblist[i].props; - effect->Reverb.Density = props->flDensity; - effect->Reverb.Diffusion = props->flDiffusion; - effect->Reverb.Gain = props->flGain; - effect->Reverb.GainHF = props->flGainHF; - effect->Reverb.GainLF = props->flGainLF; - effect->Reverb.DecayTime = props->flDecayTime; - effect->Reverb.DecayHFRatio = props->flDecayHFRatio; - effect->Reverb.DecayLFRatio = props->flDecayLFRatio; - effect->Reverb.ReflectionsGain = props->flReflectionsGain; - effect->Reverb.ReflectionsDelay = props->flReflectionsDelay; - effect->Reverb.ReflectionsPan[0] = props->flReflectionsPan[0]; - effect->Reverb.ReflectionsPan[1] = props->flReflectionsPan[1]; - effect->Reverb.ReflectionsPan[2] = props->flReflectionsPan[2]; - effect->Reverb.LateReverbGain = props->flLateReverbGain; - effect->Reverb.LateReverbDelay = props->flLateReverbDelay; - effect->Reverb.LateReverbPan[0] = props->flLateReverbPan[0]; - effect->Reverb.LateReverbPan[1] = props->flLateReverbPan[1]; - effect->Reverb.LateReverbPan[2] = props->flLateReverbPan[2]; - effect->Reverb.EchoTime = props->flEchoTime; - effect->Reverb.EchoDepth = props->flEchoDepth; - effect->Reverb.ModulationTime = props->flModulationTime; - effect->Reverb.ModulationDepth = props->flModulationDepth; - effect->Reverb.AirAbsorptionGainHF = props->flAirAbsorptionGainHF; - effect->Reverb.HFReference = props->flHFReference; - effect->Reverb.LFReference = props->flLFReference; - effect->Reverb.RoomRolloffFactor = props->flRoomRolloffFactor; - effect->Reverb.DecayHFLimit = props->iDecayHFLimit; + effect->Props.Reverb.Density = props->flDensity; + effect->Props.Reverb.Diffusion = props->flDiffusion; + effect->Props.Reverb.Gain = props->flGain; + effect->Props.Reverb.GainHF = props->flGainHF; + effect->Props.Reverb.GainLF = props->flGainLF; + effect->Props.Reverb.DecayTime = props->flDecayTime; + effect->Props.Reverb.DecayHFRatio = props->flDecayHFRatio; + effect->Props.Reverb.DecayLFRatio = props->flDecayLFRatio; + effect->Props.Reverb.ReflectionsGain = props->flReflectionsGain; + effect->Props.Reverb.ReflectionsDelay = props->flReflectionsDelay; + effect->Props.Reverb.ReflectionsPan[0] = props->flReflectionsPan[0]; + effect->Props.Reverb.ReflectionsPan[1] = props->flReflectionsPan[1]; + effect->Props.Reverb.ReflectionsPan[2] = props->flReflectionsPan[2]; + effect->Props.Reverb.LateReverbGain = props->flLateReverbGain; + effect->Props.Reverb.LateReverbDelay = props->flLateReverbDelay; + effect->Props.Reverb.LateReverbPan[0] = props->flLateReverbPan[0]; + effect->Props.Reverb.LateReverbPan[1] = props->flLateReverbPan[1]; + effect->Props.Reverb.LateReverbPan[2] = props->flLateReverbPan[2]; + effect->Props.Reverb.EchoTime = props->flEchoTime; + effect->Props.Reverb.EchoDepth = props->flEchoDepth; + effect->Props.Reverb.ModulationTime = props->flModulationTime; + effect->Props.Reverb.ModulationDepth = props->flModulationDepth; + effect->Props.Reverb.AirAbsorptionGainHF = props->flAirAbsorptionGainHF; + effect->Props.Reverb.HFReference = props->flHFReference; + effect->Props.Reverb.LFReference = props->flLFReference; + effect->Props.Reverb.RoomRolloffFactor = props->flRoomRolloffFactor; + effect->Props.Reverb.DecayHFLimit = props->iDecayHFLimit; return; } |