diff options
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/alu.cpp | 4 | ||||
-rw-r--r-- | Alc/effects/autowah.cpp | 26 | ||||
-rw-r--r-- | Alc/effects/base.h | 127 | ||||
-rw-r--r-- | Alc/effects/chorus.cpp | 48 | ||||
-rw-r--r-- | Alc/effects/compressor.cpp | 26 | ||||
-rw-r--r-- | Alc/effects/dedicated.cpp | 26 | ||||
-rw-r--r-- | Alc/effects/distortion.cpp | 26 | ||||
-rw-r--r-- | Alc/effects/echo.cpp | 26 | ||||
-rw-r--r-- | Alc/effects/equalizer.cpp | 26 | ||||
-rw-r--r-- | Alc/effects/fshifter.cpp | 26 | ||||
-rw-r--r-- | Alc/effects/modulator.cpp | 26 | ||||
-rw-r--r-- | Alc/effects/null.cpp | 26 | ||||
-rw-r--r-- | Alc/effects/pshifter.cpp | 26 | ||||
-rw-r--r-- | Alc/effects/reverb.cpp | 48 |
14 files changed, 295 insertions, 192 deletions
diff --git a/Alc/alu.cpp b/Alc/alu.cpp index 82eaa510..71e2b3ad 100644 --- a/Alc/alu.cpp +++ b/Alc/alu.cpp @@ -340,7 +340,7 @@ bool CalcEffectSlotParams(ALeffectslot *slot, ALCcontext *context, bool force) slot->Params.AuxSendAuto = props->AuxSendAuto; slot->Params.Target = props->Target; slot->Params.EffectType = props->Type; - slot->Params.EffectProps = props->Props; + slot->Params.mEffectProps = props->Props; if(IsReverbEffect(props->Type)) { slot->Params.RoomRolloff = props->Props.Reverb.RoomRolloffFactor; @@ -414,7 +414,7 @@ bool CalcEffectSlotParams(ALeffectslot *slot, ALCcontext *context, bool force) ALCdevice *device{context->Device}; output = EffectTarget{&device->Dry, &device->RealOut}; } - state->update(context, slot, &slot->Params.EffectProps, output); + state->update(context, slot, &slot->Params.mEffectProps, output); return true; } diff --git a/Alc/effects/autowah.cpp b/Alc/effects/autowah.cpp index 0b12f68e..dc03dee1 100644 --- a/Alc/effects/autowah.cpp +++ b/Alc/effects/autowah.cpp @@ -71,7 +71,7 @@ struct ALautowahState final : public EffectState { ALboolean deviceUpdate(const ALCdevice *device) override; - void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) override; + void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], const ALsizei numInput, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], const ALsizei numOutput) override; DEF_NEWDEL(ALautowahState) @@ -105,7 +105,7 @@ ALboolean ALautowahState::deviceUpdate(const ALCdevice *UNUSED(device)) return AL_TRUE; } -void ALautowahState::update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) +void ALautowahState::update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) { const ALCdevice *device{context->Device}; @@ -200,7 +200,7 @@ void ALautowahState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT sampl } -void ALautowah_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat val) +void ALautowah_setParamf(EffectProps *props, ALCcontext *context, ALenum param, ALfloat val) { switch(param) { @@ -232,15 +232,15 @@ void ALautowah_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param alSetError(context, AL_INVALID_ENUM, "Invalid autowah float property 0x%04x", param); } } -void ALautowah_setParamfv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) +void ALautowah_setParamfv(EffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) { ALautowah_setParamf(props, context, param, vals[0]); } -void ALautowah_setParami(ALeffectProps*, ALCcontext *context, ALenum param, ALint) +void ALautowah_setParami(EffectProps*, ALCcontext *context, ALenum param, ALint) { alSetError(context, AL_INVALID_ENUM, "Invalid autowah integer property 0x%04x", param); } -void ALautowah_setParamiv(ALeffectProps*, ALCcontext *context, ALenum param, const ALint*) +void ALautowah_setParamiv(EffectProps*, ALCcontext *context, ALenum param, const ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid autowah integer vector property 0x%04x", param); } -void ALautowah_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) +void ALautowah_getParamf(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) { switch(param) { @@ -265,12 +265,12 @@ void ALautowah_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum } } -void ALautowah_getParamfv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) +void ALautowah_getParamfv(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) { ALautowah_getParamf(props, context, param, vals); } -void ALautowah_getParami(const ALeffectProps*, ALCcontext *context, ALenum param, ALint*) +void ALautowah_getParami(const EffectProps*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid autowah integer property 0x%04x", param); } -void ALautowah_getParamiv(const ALeffectProps*, ALCcontext *context, ALenum param, ALint*) +void ALautowah_getParamiv(const EffectProps*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid autowah integer vector property 0x%04x", param); } DEFINE_ALEFFECT_VTABLE(ALautowah); @@ -278,13 +278,13 @@ DEFINE_ALEFFECT_VTABLE(ALautowah); struct AutowahStateFactory final : public EffectStateFactory { EffectState *create() override { return new ALautowahState{}; } - ALeffectProps getDefaultProps() const noexcept override; + EffectProps getDefaultProps() const noexcept override; const EffectVtable *getEffectVtable() const noexcept override { return &ALautowah_vtable; } }; -ALeffectProps AutowahStateFactory::getDefaultProps() const noexcept +EffectProps AutowahStateFactory::getDefaultProps() const noexcept { - ALeffectProps props{}; + EffectProps props{}; props.Autowah.AttackTime = AL_AUTOWAH_DEFAULT_ATTACK_TIME; props.Autowah.ReleaseTime = AL_AUTOWAH_DEFAULT_RELEASE_TIME; props.Autowah.Resonance = AL_AUTOWAH_DEFAULT_RESONANCE; diff --git a/Alc/effects/base.h b/Alc/effects/base.h index 82b9026a..ba1fbf96 100644 --- a/Alc/effects/base.h +++ b/Alc/effects/base.h @@ -8,19 +8,122 @@ struct ALeffectslot; -union ALeffectProps; + + +union EffectProps { + struct { + // Shared Reverb Properties + ALfloat Density; + ALfloat Diffusion; + ALfloat Gain; + ALfloat GainHF; + ALfloat DecayTime; + ALfloat DecayHFRatio; + ALfloat ReflectionsGain; + ALfloat ReflectionsDelay; + ALfloat LateReverbGain; + ALfloat LateReverbDelay; + ALfloat AirAbsorptionGainHF; + ALfloat RoomRolloffFactor; + ALboolean DecayHFLimit; + + // Additional EAX Reverb Properties + ALfloat GainLF; + ALfloat DecayLFRatio; + ALfloat ReflectionsPan[3]; + ALfloat LateReverbPan[3]; + ALfloat EchoTime; + ALfloat EchoDepth; + ALfloat ModulationTime; + ALfloat ModulationDepth; + ALfloat HFReference; + ALfloat LFReference; + } Reverb; + + struct { + ALfloat AttackTime; + ALfloat ReleaseTime; + ALfloat Resonance; + ALfloat PeakGain; + } Autowah; + + struct { + ALint Waveform; + ALint Phase; + ALfloat Rate; + ALfloat Depth; + ALfloat Feedback; + ALfloat Delay; + } Chorus; /* Also Flanger */ + + struct { + ALboolean OnOff; + } Compressor; + + struct { + ALfloat Edge; + ALfloat Gain; + ALfloat LowpassCutoff; + ALfloat EQCenter; + ALfloat EQBandwidth; + } Distortion; + + struct { + ALfloat Delay; + ALfloat LRDelay; + + ALfloat Damping; + ALfloat Feedback; + + ALfloat Spread; + } Echo; + + struct { + ALfloat LowCutoff; + ALfloat LowGain; + ALfloat Mid1Center; + ALfloat Mid1Gain; + ALfloat Mid1Width; + ALfloat Mid2Center; + ALfloat Mid2Gain; + ALfloat Mid2Width; + ALfloat HighCutoff; + ALfloat HighGain; + } Equalizer; + + struct { + ALfloat Frequency; + ALint LeftDirection; + ALint RightDirection; + } Fshifter; + + struct { + ALfloat Frequency; + ALfloat HighPassCutoff; + ALint Waveform; + } Modulator; + + struct { + ALint CoarseTune; + ALint FineTune; + } Pshifter; + + struct { + ALfloat Gain; + } Dedicated; +}; struct EffectVtable { - void (*const setParami)(ALeffectProps *props, ALCcontext *context, ALenum param, ALint val); - void (*const setParamiv)(ALeffectProps *props, ALCcontext *context, ALenum param, const ALint *vals); - void (*const setParamf)(ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat val); - void (*const setParamfv)(ALeffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals); - - void (*const getParami)(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *val); - void (*const getParamiv)(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *vals); - void (*const getParamf)(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *val); - void (*const getParamfv)(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals); + void (*const setParami)(EffectProps *props, ALCcontext *context, ALenum param, ALint val); + void (*const setParamiv)(EffectProps *props, ALCcontext *context, ALenum param, const ALint *vals); + void (*const setParamf)(EffectProps *props, ALCcontext *context, ALenum param, ALfloat val); + void (*const setParamfv)(EffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals); + + void (*const getParami)(const EffectProps *props, ALCcontext *context, ALenum param, ALint *val); + void (*const getParamiv)(const EffectProps *props, ALCcontext *context, ALenum param, ALint *vals); + void (*const getParamf)(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *val); + void (*const getParamfv)(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals); }; #define DEFINE_ALEFFECT_VTABLE(T) \ @@ -47,7 +150,7 @@ struct EffectState { virtual ~EffectState() = default; virtual ALboolean deviceUpdate(const ALCdevice *device) = 0; - virtual void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) = 0; + virtual void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) = 0; virtual void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], const ALsizei numInput, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], const ALsizei numOutput) = 0; void IncRef() noexcept; @@ -59,7 +162,7 @@ struct EffectStateFactory { virtual ~EffectStateFactory() { } virtual EffectState *create() = 0; - virtual ALeffectProps getDefaultProps() const noexcept = 0; + virtual EffectProps getDefaultProps() const noexcept = 0; virtual const EffectVtable *getEffectVtable() const noexcept = 0; }; diff --git a/Alc/effects/chorus.cpp b/Alc/effects/chorus.cpp index 495a4574..98f01fa7 100644 --- a/Alc/effects/chorus.cpp +++ b/Alc/effects/chorus.cpp @@ -91,7 +91,7 @@ struct ChorusState final : public EffectState { ALboolean deviceUpdate(const ALCdevice *device) override; - void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) override; + void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], const ALsizei numInput, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], const ALsizei numOutput) override; DEF_NEWDEL(ChorusState) @@ -121,7 +121,7 @@ ALboolean ChorusState::deviceUpdate(const ALCdevice *Device) return AL_TRUE; } -void ChorusState::update(const ALCcontext *Context, const ALeffectslot *Slot, const ALeffectProps *props, const EffectTarget target) +void ChorusState::update(const ALCcontext *Context, const ALeffectslot *Slot, const EffectProps *props, const EffectTarget target) { static constexpr ALsizei mindelay = MAX_RESAMPLE_PADDING << FRACTIONBITS; @@ -256,7 +256,7 @@ void ChorusState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesI } -void Chorus_setParami(ALeffectProps *props, ALCcontext *context, ALenum param, ALint val) +void Chorus_setParami(EffectProps *props, ALCcontext *context, ALenum param, ALint val) { switch(param) { @@ -276,9 +276,9 @@ void Chorus_setParami(ALeffectProps *props, ALCcontext *context, ALenum param, A alSetError(context, AL_INVALID_ENUM, "Invalid chorus integer property 0x%04x", param); } } -void Chorus_setParamiv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) +void Chorus_setParamiv(EffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) { Chorus_setParami(props, context, param, vals[0]); } -void Chorus_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat val) +void Chorus_setParamf(EffectProps *props, ALCcontext *context, ALenum param, ALfloat val) { switch(param) { @@ -310,10 +310,10 @@ void Chorus_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param, A alSetError(context, AL_INVALID_ENUM, "Invalid chorus float property 0x%04x", param); } } -void Chorus_setParamfv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) +void Chorus_setParamfv(EffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) { Chorus_setParamf(props, context, param, vals[0]); } -void Chorus_getParami(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *val) +void Chorus_getParami(const EffectProps *props, ALCcontext *context, ALenum param, ALint *val) { switch(param) { @@ -329,9 +329,9 @@ void Chorus_getParami(const ALeffectProps *props, ALCcontext *context, ALenum pa alSetError(context, AL_INVALID_ENUM, "Invalid chorus integer property 0x%04x", param); } } -void Chorus_getParamiv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *vals) +void Chorus_getParamiv(const EffectProps *props, ALCcontext *context, ALenum param, ALint *vals) { Chorus_getParami(props, context, param, vals); } -void Chorus_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) +void Chorus_getParamf(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) { switch(param) { @@ -355,7 +355,7 @@ void Chorus_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum pa alSetError(context, AL_INVALID_ENUM, "Invalid chorus float property 0x%04x", param); } } -void Chorus_getParamfv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) +void Chorus_getParamfv(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) { Chorus_getParamf(props, context, param, vals); } DEFINE_ALEFFECT_VTABLE(Chorus); @@ -363,13 +363,13 @@ DEFINE_ALEFFECT_VTABLE(Chorus); struct ChorusStateFactory final : public EffectStateFactory { EffectState *create() override { return new ChorusState{}; } - ALeffectProps getDefaultProps() const noexcept override; + EffectProps getDefaultProps() const noexcept override; const EffectVtable *getEffectVtable() const noexcept override { return &Chorus_vtable; } }; -ALeffectProps ChorusStateFactory::getDefaultProps() const noexcept +EffectProps ChorusStateFactory::getDefaultProps() const noexcept { - ALeffectProps props{}; + EffectProps props{}; props.Chorus.Waveform = AL_CHORUS_DEFAULT_WAVEFORM; props.Chorus.Phase = AL_CHORUS_DEFAULT_PHASE; props.Chorus.Rate = AL_CHORUS_DEFAULT_RATE; @@ -380,7 +380,7 @@ ALeffectProps ChorusStateFactory::getDefaultProps() const noexcept } -void Flanger_setParami(ALeffectProps *props, ALCcontext *context, ALenum param, ALint val) +void Flanger_setParami(EffectProps *props, ALCcontext *context, ALenum param, ALint val) { switch(param) { @@ -400,9 +400,9 @@ void Flanger_setParami(ALeffectProps *props, ALCcontext *context, ALenum param, alSetError(context, AL_INVALID_ENUM, "Invalid flanger integer property 0x%04x", param); } } -void Flanger_setParamiv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) +void Flanger_setParamiv(EffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) { Flanger_setParami(props, context, param, vals[0]); } -void Flanger_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat val) +void Flanger_setParamf(EffectProps *props, ALCcontext *context, ALenum param, ALfloat val) { switch(param) { @@ -434,10 +434,10 @@ void Flanger_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param, alSetError(context, AL_INVALID_ENUM, "Invalid flanger float property 0x%04x", param); } } -void Flanger_setParamfv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) +void Flanger_setParamfv(EffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) { Flanger_setParamf(props, context, param, vals[0]); } -void Flanger_getParami(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *val) +void Flanger_getParami(const EffectProps *props, ALCcontext *context, ALenum param, ALint *val) { switch(param) { @@ -453,9 +453,9 @@ void Flanger_getParami(const ALeffectProps *props, ALCcontext *context, ALenum p alSetError(context, AL_INVALID_ENUM, "Invalid flanger integer property 0x%04x", param); } } -void Flanger_getParamiv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *vals) +void Flanger_getParamiv(const EffectProps *props, ALCcontext *context, ALenum param, ALint *vals) { Flanger_getParami(props, context, param, vals); } -void Flanger_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) +void Flanger_getParamf(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) { switch(param) { @@ -479,7 +479,7 @@ void Flanger_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum p alSetError(context, AL_INVALID_ENUM, "Invalid flanger float property 0x%04x", param); } } -void Flanger_getParamfv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) +void Flanger_getParamfv(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) { Flanger_getParamf(props, context, param, vals); } DEFINE_ALEFFECT_VTABLE(Flanger); @@ -490,13 +490,13 @@ DEFINE_ALEFFECT_VTABLE(Flanger); */ struct FlangerStateFactory final : public EffectStateFactory { EffectState *create() override { return new ChorusState{}; } - ALeffectProps getDefaultProps() const noexcept override; + EffectProps getDefaultProps() const noexcept override; const EffectVtable *getEffectVtable() const noexcept override { return &Flanger_vtable; } }; -ALeffectProps FlangerStateFactory::getDefaultProps() const noexcept +EffectProps FlangerStateFactory::getDefaultProps() const noexcept { - ALeffectProps props{}; + EffectProps props{}; props.Chorus.Waveform = AL_FLANGER_DEFAULT_WAVEFORM; props.Chorus.Phase = AL_FLANGER_DEFAULT_PHASE; props.Chorus.Rate = AL_FLANGER_DEFAULT_RATE; diff --git a/Alc/effects/compressor.cpp b/Alc/effects/compressor.cpp index 6e5cea9d..2a441b0e 100644 --- a/Alc/effects/compressor.cpp +++ b/Alc/effects/compressor.cpp @@ -51,7 +51,7 @@ struct CompressorState final : public EffectState { ALboolean deviceUpdate(const ALCdevice *device) override; - void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) override; + void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], const ALsizei numInput, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], const ALsizei numOutput) override; DEF_NEWDEL(CompressorState) @@ -74,7 +74,7 @@ ALboolean CompressorState::deviceUpdate(const ALCdevice *device) return AL_TRUE; } -void CompressorState::update(const ALCcontext* UNUSED(context), const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) +void CompressorState::update(const ALCcontext* UNUSED(context), const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) { mEnabled = props->Compressor.OnOff; @@ -159,7 +159,7 @@ void CompressorState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT samp } -void Compressor_setParami(ALeffectProps *props, ALCcontext *context, ALenum param, ALint val) +void Compressor_setParami(EffectProps *props, ALCcontext *context, ALenum param, ALint val) { switch(param) { @@ -174,14 +174,14 @@ void Compressor_setParami(ALeffectProps *props, ALCcontext *context, ALenum para param); } } -void Compressor_setParamiv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) +void Compressor_setParamiv(EffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) { Compressor_setParami(props, context, param, vals[0]); } -void Compressor_setParamf(ALeffectProps*, ALCcontext *context, ALenum param, ALfloat) +void Compressor_setParamf(EffectProps*, ALCcontext *context, ALenum param, ALfloat) { alSetError(context, AL_INVALID_ENUM, "Invalid compressor float property 0x%04x", param); } -void Compressor_setParamfv(ALeffectProps*, ALCcontext *context, ALenum param, const ALfloat*) +void Compressor_setParamfv(EffectProps*, ALCcontext *context, ALenum param, const ALfloat*) { alSetError(context, AL_INVALID_ENUM, "Invalid compressor float-vector property 0x%04x", param); } -void Compressor_getParami(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *val) +void Compressor_getParami(const EffectProps *props, ALCcontext *context, ALenum param, ALint *val) { switch(param) { @@ -194,11 +194,11 @@ void Compressor_getParami(const ALeffectProps *props, ALCcontext *context, ALenu param); } } -void Compressor_getParamiv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *vals) +void Compressor_getParamiv(const EffectProps *props, ALCcontext *context, ALenum param, ALint *vals) { Compressor_getParami(props, context, param, vals); } -void Compressor_getParamf(const ALeffectProps*, ALCcontext *context, ALenum param, ALfloat*) +void Compressor_getParamf(const EffectProps*, ALCcontext *context, ALenum param, ALfloat*) { alSetError(context, AL_INVALID_ENUM, "Invalid compressor float property 0x%04x", param); } -void Compressor_getParamfv(const ALeffectProps*, ALCcontext *context, ALenum param, ALfloat*) +void Compressor_getParamfv(const EffectProps*, ALCcontext *context, ALenum param, ALfloat*) { alSetError(context, AL_INVALID_ENUM, "Invalid compressor float-vector property 0x%04x", param); } DEFINE_ALEFFECT_VTABLE(Compressor); @@ -206,13 +206,13 @@ DEFINE_ALEFFECT_VTABLE(Compressor); struct CompressorStateFactory final : public EffectStateFactory { EffectState *create() override { return new CompressorState{}; } - ALeffectProps getDefaultProps() const noexcept override; + EffectProps getDefaultProps() const noexcept override; const EffectVtable *getEffectVtable() const noexcept override { return &Compressor_vtable; } }; -ALeffectProps CompressorStateFactory::getDefaultProps() const noexcept +EffectProps CompressorStateFactory::getDefaultProps() const noexcept { - ALeffectProps props{}; + EffectProps props{}; props.Compressor.OnOff = AL_COMPRESSOR_DEFAULT_ONOFF; return props; } diff --git a/Alc/effects/dedicated.cpp b/Alc/effects/dedicated.cpp index 7d274ecc..4c528a61 100644 --- a/Alc/effects/dedicated.cpp +++ b/Alc/effects/dedicated.cpp @@ -39,7 +39,7 @@ struct DedicatedState final : public EffectState { ALboolean deviceUpdate(const ALCdevice *device) override; - void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) override; + void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], const ALsizei numInput, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], const ALsizei numOutput) override; DEF_NEWDEL(DedicatedState) @@ -51,7 +51,7 @@ ALboolean DedicatedState::deviceUpdate(const ALCdevice *UNUSED(device)) return AL_TRUE; } -void DedicatedState::update(const ALCcontext* UNUSED(context), const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) +void DedicatedState::update(const ALCcontext* UNUSED(context), const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) { std::fill(std::begin(mTargetGains), std::end(mTargetGains), 0.0f); @@ -97,11 +97,11 @@ void DedicatedState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT sampl } -void Dedicated_setParami(ALeffectProps*, ALCcontext *context, ALenum param, ALint) +void Dedicated_setParami(EffectProps*, ALCcontext *context, ALenum param, ALint) { alSetError(context, AL_INVALID_ENUM, "Invalid dedicated integer property 0x%04x", param); } -void Dedicated_setParamiv(ALeffectProps*, ALCcontext *context, ALenum param, const ALint*) +void Dedicated_setParamiv(EffectProps*, ALCcontext *context, ALenum param, const ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid dedicated integer-vector property 0x%04x", param); } -void Dedicated_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat val) +void Dedicated_setParamf(EffectProps *props, ALCcontext *context, ALenum param, ALfloat val) { switch(param) { @@ -115,14 +115,14 @@ void Dedicated_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param alSetError(context, AL_INVALID_ENUM, "Invalid dedicated float property 0x%04x", param); } } -void Dedicated_setParamfv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) +void Dedicated_setParamfv(EffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) { Dedicated_setParamf(props, context, param, vals[0]); } -void Dedicated_getParami(const ALeffectProps*, ALCcontext *context, ALenum param, ALint*) +void Dedicated_getParami(const EffectProps*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid dedicated integer property 0x%04x", param); } -void Dedicated_getParamiv(const ALeffectProps*, ALCcontext *context, ALenum param, ALint*) +void Dedicated_getParamiv(const EffectProps*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid dedicated integer-vector property 0x%04x", param); } -void Dedicated_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) +void Dedicated_getParamf(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) { switch(param) { @@ -134,7 +134,7 @@ void Dedicated_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum alSetError(context, AL_INVALID_ENUM, "Invalid dedicated float property 0x%04x", param); } } -void Dedicated_getParamfv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) +void Dedicated_getParamfv(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) { Dedicated_getParamf(props, context, param, vals); } DEFINE_ALEFFECT_VTABLE(Dedicated); @@ -142,13 +142,13 @@ DEFINE_ALEFFECT_VTABLE(Dedicated); struct DedicatedStateFactory final : public EffectStateFactory { EffectState *create() override { return new DedicatedState{}; } - ALeffectProps getDefaultProps() const noexcept override; + EffectProps getDefaultProps() const noexcept override; const EffectVtable *getEffectVtable() const noexcept override { return &Dedicated_vtable; } }; -ALeffectProps DedicatedStateFactory::getDefaultProps() const noexcept +EffectProps DedicatedStateFactory::getDefaultProps() const noexcept { - ALeffectProps props{}; + EffectProps props{}; props.Dedicated.Gain = 1.0f; return props; } diff --git a/Alc/effects/distortion.cpp b/Alc/effects/distortion.cpp index 1bc3b626..3639297f 100644 --- a/Alc/effects/distortion.cpp +++ b/Alc/effects/distortion.cpp @@ -49,7 +49,7 @@ struct DistortionState final : public EffectState { ALboolean deviceUpdate(const ALCdevice *device) override; - void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) override; + void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], const ALsizei numInput, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], const ALsizei numOutput) override; DEF_NEWDEL(DistortionState) @@ -62,7 +62,7 @@ ALboolean DistortionState::deviceUpdate(const ALCdevice *UNUSED(device)) return AL_TRUE; } -void DistortionState::update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) +void DistortionState::update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) { const ALCdevice *device{context->Device}; @@ -164,11 +164,11 @@ void DistortionState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT samp } -void Distortion_setParami(ALeffectProps*, ALCcontext *context, ALenum param, ALint) +void Distortion_setParami(EffectProps*, ALCcontext *context, ALenum param, ALint) { alSetError(context, AL_INVALID_ENUM, "Invalid distortion integer property 0x%04x", param); } -void Distortion_setParamiv(ALeffectProps*, ALCcontext *context, ALenum param, const ALint*) +void Distortion_setParamiv(EffectProps*, ALCcontext *context, ALenum param, const ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid distortion integer-vector property 0x%04x", param); } -void Distortion_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat val) +void Distortion_setParamf(EffectProps *props, ALCcontext *context, ALenum param, ALfloat val) { switch(param) { @@ -207,14 +207,14 @@ void Distortion_setParamf(ALeffectProps *props, ALCcontext *context, ALenum para param); } } -void Distortion_setParamfv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) +void Distortion_setParamfv(EffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) { Distortion_setParamf(props, context, param, vals[0]); } -void Distortion_getParami(const ALeffectProps*, ALCcontext *context, ALenum param, ALint*) +void Distortion_getParami(const EffectProps*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid distortion integer property 0x%04x", param); } -void Distortion_getParamiv(const ALeffectProps*, ALCcontext *context, ALenum param, ALint*) +void Distortion_getParamiv(const EffectProps*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid distortion integer-vector property 0x%04x", param); } -void Distortion_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) +void Distortion_getParamf(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) { switch(param) { @@ -243,7 +243,7 @@ void Distortion_getParamf(const ALeffectProps *props, ALCcontext *context, ALenu param); } } -void Distortion_getParamfv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) +void Distortion_getParamfv(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) { Distortion_getParamf(props, context, param, vals); } DEFINE_ALEFFECT_VTABLE(Distortion); @@ -251,13 +251,13 @@ DEFINE_ALEFFECT_VTABLE(Distortion); struct DistortionStateFactory final : public EffectStateFactory { EffectState *create() override { return new DistortionState{}; } - ALeffectProps getDefaultProps() const noexcept override; + EffectProps getDefaultProps() const noexcept override; const EffectVtable *getEffectVtable() const noexcept override { return &Distortion_vtable; } }; -ALeffectProps DistortionStateFactory::getDefaultProps() const noexcept +EffectProps DistortionStateFactory::getDefaultProps() const noexcept { - ALeffectProps props{}; + EffectProps props{}; props.Distortion.Edge = AL_DISTORTION_DEFAULT_EDGE; props.Distortion.Gain = AL_DISTORTION_DEFAULT_GAIN; props.Distortion.LowpassCutoff = AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF; diff --git a/Alc/effects/echo.cpp b/Alc/effects/echo.cpp index 08c0ac39..94971c99 100644 --- a/Alc/effects/echo.cpp +++ b/Alc/effects/echo.cpp @@ -59,7 +59,7 @@ struct EchoState final : public EffectState { ALboolean deviceUpdate(const ALCdevice *device) override; - void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) override; + void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], const ALsizei numInput, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], const ALsizei numOutput) override; DEF_NEWDEL(EchoState) @@ -92,7 +92,7 @@ ALboolean EchoState::deviceUpdate(const ALCdevice *Device) return AL_TRUE; } -void EchoState::update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) +void EchoState::update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) { const ALCdevice *device = context->Device; ALuint frequency = device->Frequency; @@ -175,11 +175,11 @@ void EchoState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn) } -void Echo_setParami(ALeffectProps*, ALCcontext *context, ALenum param, ALint) +void Echo_setParami(EffectProps*, ALCcontext *context, ALenum param, ALint) { alSetError(context, AL_INVALID_ENUM, "Invalid echo integer property 0x%04x", param); } -void Echo_setParamiv(ALeffectProps*, ALCcontext *context, ALenum param, const ALint*) +void Echo_setParamiv(EffectProps*, ALCcontext *context, ALenum param, const ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid echo integer-vector property 0x%04x", param); } -void Echo_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat val) +void Echo_setParamf(EffectProps *props, ALCcontext *context, ALenum param, ALfloat val) { switch(param) { @@ -217,14 +217,14 @@ void Echo_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param, ALf alSetError(context, AL_INVALID_ENUM, "Invalid echo float property 0x%04x", param); } } -void Echo_setParamfv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) +void Echo_setParamfv(EffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) { Echo_setParamf(props, context, param, vals[0]); } -void Echo_getParami(const ALeffectProps*, ALCcontext *context, ALenum param, ALint*) +void Echo_getParami(const EffectProps*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid echo integer property 0x%04x", param); } -void Echo_getParamiv(const ALeffectProps*, ALCcontext *context, ALenum param, ALint*) +void Echo_getParamiv(const EffectProps*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid echo integer-vector property 0x%04x", param); } -void Echo_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) +void Echo_getParamf(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) { switch(param) { @@ -252,7 +252,7 @@ void Echo_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum para alSetError(context, AL_INVALID_ENUM, "Invalid echo float property 0x%04x", param); } } -void Echo_getParamfv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) +void Echo_getParamfv(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) { Echo_getParamf(props, context, param, vals); } DEFINE_ALEFFECT_VTABLE(Echo); @@ -260,13 +260,13 @@ DEFINE_ALEFFECT_VTABLE(Echo); struct EchoStateFactory final : public EffectStateFactory { EffectState *create() override { return new EchoState{}; } - ALeffectProps getDefaultProps() const noexcept override; + EffectProps getDefaultProps() const noexcept override; const EffectVtable *getEffectVtable() const noexcept override { return &Echo_vtable; } }; -ALeffectProps EchoStateFactory::getDefaultProps() const noexcept +EffectProps EchoStateFactory::getDefaultProps() const noexcept { - ALeffectProps props{}; + EffectProps props{}; props.Echo.Delay = AL_ECHO_DEFAULT_DELAY; props.Echo.LRDelay = AL_ECHO_DEFAULT_LRDELAY; props.Echo.Damping = AL_ECHO_DEFAULT_DAMPING; diff --git a/Alc/effects/equalizer.cpp b/Alc/effects/equalizer.cpp index 441d8764..e1524943 100644 --- a/Alc/effects/equalizer.cpp +++ b/Alc/effects/equalizer.cpp @@ -93,7 +93,7 @@ struct EqualizerState final : public EffectState { ALboolean deviceUpdate(const ALCdevice *device) override; - void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) override; + void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], const ALsizei numInput, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], const ALsizei numOutput) override; DEF_NEWDEL(EqualizerState) @@ -110,7 +110,7 @@ ALboolean EqualizerState::deviceUpdate(const ALCdevice *UNUSED(device)) return AL_TRUE; } -void EqualizerState::update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) +void EqualizerState::update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) { const ALCdevice *device = context->Device; auto frequency = static_cast<ALfloat>(device->Frequency); @@ -174,11 +174,11 @@ void EqualizerState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT sampl } -void Equalizer_setParami(ALeffectProps*, ALCcontext *context, ALenum param, ALint) +void Equalizer_setParami(EffectProps*, ALCcontext *context, ALenum param, ALint) { alSetError(context, AL_INVALID_ENUM, "Invalid equalizer integer property 0x%04x", param); } -void Equalizer_setParamiv(ALeffectProps*, ALCcontext *context, ALenum param, const ALint*) +void Equalizer_setParamiv(EffectProps*, ALCcontext *context, ALenum param, const ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid equalizer integer-vector property 0x%04x", param); } -void Equalizer_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat val) +void Equalizer_setParamf(EffectProps *props, ALCcontext *context, ALenum param, ALfloat val) { switch(param) { @@ -246,14 +246,14 @@ void Equalizer_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param alSetError(context, AL_INVALID_ENUM, "Invalid equalizer float property 0x%04x", param); } } -void Equalizer_setParamfv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) +void Equalizer_setParamfv(EffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) { Equalizer_setParamf(props, context, param, vals[0]); } -void Equalizer_getParami(const ALeffectProps*, ALCcontext *context, ALenum param, ALint*) +void Equalizer_getParami(const EffectProps*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid equalizer integer property 0x%04x", param); } -void Equalizer_getParamiv(const ALeffectProps*, ALCcontext *context, ALenum param, ALint*) +void Equalizer_getParamiv(const EffectProps*, ALCcontext *context, ALenum param, ALint*) { alSetError(context, AL_INVALID_ENUM, "Invalid equalizer integer-vector property 0x%04x", param); } -void Equalizer_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) +void Equalizer_getParamf(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) { switch(param) { @@ -301,7 +301,7 @@ void Equalizer_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum alSetError(context, AL_INVALID_ENUM, "Invalid equalizer float property 0x%04x", param); } } -void Equalizer_getParamfv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) +void Equalizer_getParamfv(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) { Equalizer_getParamf(props, context, param, vals); } DEFINE_ALEFFECT_VTABLE(Equalizer); @@ -309,13 +309,13 @@ DEFINE_ALEFFECT_VTABLE(Equalizer); struct EqualizerStateFactory final : public EffectStateFactory { EffectState *create() override { return new EqualizerState{}; } - ALeffectProps getDefaultProps() const noexcept override; + EffectProps getDefaultProps() const noexcept override; const EffectVtable *getEffectVtable() const noexcept override { return &Equalizer_vtable; } }; -ALeffectProps EqualizerStateFactory::getDefaultProps() const noexcept +EffectProps EqualizerStateFactory::getDefaultProps() const noexcept { - ALeffectProps props{}; + EffectProps props{}; props.Equalizer.LowCutoff = AL_EQUALIZER_DEFAULT_LOW_CUTOFF; props.Equalizer.LowGain = AL_EQUALIZER_DEFAULT_LOW_GAIN; props.Equalizer.Mid1Center = AL_EQUALIZER_DEFAULT_MID1_CENTER; diff --git a/Alc/effects/fshifter.cpp b/Alc/effects/fshifter.cpp index 727901b9..4587b721 100644 --- a/Alc/effects/fshifter.cpp +++ b/Alc/effects/fshifter.cpp @@ -82,7 +82,7 @@ struct FshifterState final : public EffectState { ALboolean deviceUpdate(const ALCdevice *device) override; - void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) override; + void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], const ALsizei numInput, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], const ALsizei numOutput) override; DEF_NEWDEL(FshifterState) @@ -107,7 +107,7 @@ ALboolean FshifterState::deviceUpdate(const ALCdevice *UNUSED(device)) return AL_TRUE; } -void FshifterState::update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) +void FshifterState::update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) { const ALCdevice *device{context->Device}; @@ -203,7 +203,7 @@ void FshifterState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT sample } -void Fshifter_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat val) +void Fshifter_setParamf(EffectProps *props, ALCcontext *context, ALenum param, ALfloat val) { switch(param) { @@ -217,10 +217,10 @@ void Fshifter_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param, alSetError(context, AL_INVALID_ENUM, "Invalid frequency shifter float property 0x%04x", param); } } -void Fshifter_setParamfv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) +void Fshifter_setParamfv(EffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) { Fshifter_setParamf(props, context, param, vals[0]); } -void Fshifter_setParami(ALeffectProps *props, ALCcontext *context, ALenum param, ALint val) +void Fshifter_setParami(EffectProps *props, ALCcontext *context, ALenum param, ALint val) { switch(param) { @@ -240,10 +240,10 @@ void Fshifter_setParami(ALeffectProps *props, ALCcontext *context, ALenum param, alSetError(context, AL_INVALID_ENUM, "Invalid frequency shifter integer property 0x%04x", param); } } -void Fshifter_setParamiv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) +void Fshifter_setParamiv(EffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) { Fshifter_setParami(props, context, param, vals[0]); } -void Fshifter_getParami(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *val) +void Fshifter_getParami(const EffectProps *props, ALCcontext *context, ALenum param, ALint *val) { switch(param) { @@ -257,10 +257,10 @@ void Fshifter_getParami(const ALeffectProps *props, ALCcontext *context, ALenum alSetError(context, AL_INVALID_ENUM, "Invalid frequency shifter integer property 0x%04x", param); } } -void Fshifter_getParamiv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *vals) +void Fshifter_getParamiv(const EffectProps *props, ALCcontext *context, ALenum param, ALint *vals) { Fshifter_getParami(props, context, param, vals); } -void Fshifter_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) +void Fshifter_getParamf(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) { switch(param) { @@ -272,7 +272,7 @@ void Fshifter_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum alSetError(context, AL_INVALID_ENUM, "Invalid frequency shifter float property 0x%04x", param); } } -void Fshifter_getParamfv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) +void Fshifter_getParamfv(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) { Fshifter_getParamf(props, context, param, vals); } DEFINE_ALEFFECT_VTABLE(Fshifter); @@ -280,13 +280,13 @@ DEFINE_ALEFFECT_VTABLE(Fshifter); struct FshifterStateFactory final : public EffectStateFactory { EffectState *create() override { return new FshifterState{}; } - ALeffectProps getDefaultProps() const noexcept override; + EffectProps getDefaultProps() const noexcept override; const EffectVtable *getEffectVtable() const noexcept override { return &Fshifter_vtable; } }; -ALeffectProps FshifterStateFactory::getDefaultProps() const noexcept +EffectProps FshifterStateFactory::getDefaultProps() const noexcept { - ALeffectProps props{}; + EffectProps props{}; props.Fshifter.Frequency = AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY; props.Fshifter.LeftDirection = AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION; props.Fshifter.RightDirection = AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION; diff --git a/Alc/effects/modulator.cpp b/Alc/effects/modulator.cpp index c2095192..0ddd0510 100644 --- a/Alc/effects/modulator.cpp +++ b/Alc/effects/modulator.cpp @@ -92,7 +92,7 @@ struct ModulatorState final : public EffectState { ALboolean deviceUpdate(const ALCdevice *device) override; - void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) override; + void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], const ALsizei numInput, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], const ALsizei numOutput) override; DEF_NEWDEL(ModulatorState) @@ -108,7 +108,7 @@ ALboolean ModulatorState::deviceUpdate(const ALCdevice *UNUSED(device)) return AL_TRUE; } -void ModulatorState::update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) +void ModulatorState::update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) { const ALCdevice *device{context->Device}; @@ -174,7 +174,7 @@ void ModulatorState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT sampl } -void Modulator_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat val) +void Modulator_setParamf(EffectProps *props, ALCcontext *context, ALenum param, ALfloat val) { switch(param) { @@ -194,9 +194,9 @@ void Modulator_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param alSetError(context, AL_INVALID_ENUM, "Invalid modulator float property 0x%04x", param); } } -void Modulator_setParamfv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) +void Modulator_setParamfv(EffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) { Modulator_setParamf(props, context, param, vals[0]); } -void Modulator_setParami(ALeffectProps *props, ALCcontext *context, ALenum param, ALint val) +void Modulator_setParami(EffectProps *props, ALCcontext *context, ALenum param, ALint val) { switch(param) { @@ -215,10 +215,10 @@ void Modulator_setParami(ALeffectProps *props, ALCcontext *context, ALenum param alSetError(context, AL_INVALID_ENUM, "Invalid modulator integer property 0x%04x", param); } } -void Modulator_setParamiv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) +void Modulator_setParamiv(EffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) { Modulator_setParami(props, context, param, vals[0]); } -void Modulator_getParami(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *val) +void Modulator_getParami(const EffectProps *props, ALCcontext *context, ALenum param, ALint *val) { switch(param) { @@ -236,9 +236,9 @@ void Modulator_getParami(const ALeffectProps *props, ALCcontext *context, ALenum alSetError(context, AL_INVALID_ENUM, "Invalid modulator integer property 0x%04x", param); } } -void Modulator_getParamiv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *vals) +void Modulator_getParamiv(const EffectProps *props, ALCcontext *context, ALenum param, ALint *vals) { Modulator_getParami(props, context, param, vals); } -void Modulator_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) +void Modulator_getParamf(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) { switch(param) { @@ -253,7 +253,7 @@ void Modulator_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum alSetError(context, AL_INVALID_ENUM, "Invalid modulator float property 0x%04x", param); } } -void Modulator_getParamfv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) +void Modulator_getParamfv(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) { Modulator_getParamf(props, context, param, vals); } DEFINE_ALEFFECT_VTABLE(Modulator); @@ -261,13 +261,13 @@ DEFINE_ALEFFECT_VTABLE(Modulator); struct ModulatorStateFactory final : public EffectStateFactory { EffectState *create() override { return new ModulatorState{}; } - ALeffectProps getDefaultProps() const noexcept override; + EffectProps getDefaultProps() const noexcept override; const EffectVtable *getEffectVtable() const noexcept override { return &Modulator_vtable; } }; -ALeffectProps ModulatorStateFactory::getDefaultProps() const noexcept +EffectProps ModulatorStateFactory::getDefaultProps() const noexcept { - ALeffectProps props{}; + EffectProps props{}; props.Modulator.Frequency = AL_RING_MODULATOR_DEFAULT_FREQUENCY; props.Modulator.HighPassCutoff = AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF; props.Modulator.Waveform = AL_RING_MODULATOR_DEFAULT_WAVEFORM; diff --git a/Alc/effects/null.cpp b/Alc/effects/null.cpp index eff9f930..5a2e4d78 100644 --- a/Alc/effects/null.cpp +++ b/Alc/effects/null.cpp @@ -18,7 +18,7 @@ struct NullState final : public EffectState { ~NullState() override; ALboolean deviceUpdate(const ALCdevice *device) override; - void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) override; + void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], const ALsizei numInput, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], const ALsizei numOutput) override; DEF_NEWDEL(NullState) @@ -47,7 +47,7 @@ ALboolean NullState::deviceUpdate(const ALCdevice* UNUSED(device)) /* This updates the effect state. This is called any time the effect is * (re)loaded into a slot. */ -void NullState::update(const ALCcontext* UNUSED(context), const ALeffectslot* UNUSED(slot), const ALeffectProps* UNUSED(props), const EffectTarget UNUSED(target)) +void NullState::update(const ALCcontext* UNUSED(context), const ALeffectslot* UNUSED(slot), const EffectProps* UNUSED(props), const EffectTarget UNUSED(target)) { } @@ -60,7 +60,7 @@ void NullState::process(ALsizei /*samplesToDo*/, const ALfloat (*RESTRICT /*samp } -void NullEffect_setParami(ALeffectProps *UNUSED(props), ALCcontext *context, ALenum param, ALint UNUSED(val)) +void NullEffect_setParami(EffectProps *UNUSED(props), ALCcontext *context, ALenum param, ALint UNUSED(val)) { switch(param) { @@ -68,7 +68,7 @@ void NullEffect_setParami(ALeffectProps *UNUSED(props), ALCcontext *context, ALe alSetError(context, AL_INVALID_ENUM, "Invalid null effect integer property 0x%04x", param); } } -void NullEffect_setParamiv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) +void NullEffect_setParamiv(EffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) { switch(param) { @@ -76,7 +76,7 @@ void NullEffect_setParamiv(ALeffectProps *props, ALCcontext *context, ALenum par NullEffect_setParami(props, context, param, vals[0]); } } -void NullEffect_setParamf(ALeffectProps *UNUSED(props), ALCcontext *context, ALenum param, ALfloat UNUSED(val)) +void NullEffect_setParamf(EffectProps *UNUSED(props), ALCcontext *context, ALenum param, ALfloat UNUSED(val)) { switch(param) { @@ -84,7 +84,7 @@ void NullEffect_setParamf(ALeffectProps *UNUSED(props), ALCcontext *context, ALe alSetError(context, AL_INVALID_ENUM, "Invalid null effect float property 0x%04x", param); } } -void NullEffect_setParamfv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) +void NullEffect_setParamfv(EffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) { switch(param) { @@ -93,7 +93,7 @@ void NullEffect_setParamfv(ALeffectProps *props, ALCcontext *context, ALenum par } } -void NullEffect_getParami(const ALeffectProps *UNUSED(props), ALCcontext *context, ALenum param, ALint* UNUSED(val)) +void NullEffect_getParami(const EffectProps *UNUSED(props), ALCcontext *context, ALenum param, ALint* UNUSED(val)) { switch(param) { @@ -101,7 +101,7 @@ void NullEffect_getParami(const ALeffectProps *UNUSED(props), ALCcontext *contex alSetError(context, AL_INVALID_ENUM, "Invalid null effect integer property 0x%04x", param); } } -void NullEffect_getParamiv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *vals) +void NullEffect_getParamiv(const EffectProps *props, ALCcontext *context, ALenum param, ALint *vals) { switch(param) { @@ -109,7 +109,7 @@ void NullEffect_getParamiv(const ALeffectProps *props, ALCcontext *context, ALen NullEffect_getParami(props, context, param, vals); } } -void NullEffect_getParamf(const ALeffectProps *UNUSED(props), ALCcontext *context, ALenum param, ALfloat* UNUSED(val)) +void NullEffect_getParamf(const EffectProps *UNUSED(props), ALCcontext *context, ALenum param, ALfloat* UNUSED(val)) { switch(param) { @@ -117,7 +117,7 @@ void NullEffect_getParamf(const ALeffectProps *UNUSED(props), ALCcontext *contex alSetError(context, AL_INVALID_ENUM, "Invalid null effect float property 0x%04x", param); } } -void NullEffect_getParamfv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) +void NullEffect_getParamfv(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) { switch(param) { @@ -131,7 +131,7 @@ DEFINE_ALEFFECT_VTABLE(NullEffect); struct NullStateFactory final : public EffectStateFactory { EffectState *create() override; - ALeffectProps getDefaultProps() const noexcept override; + EffectProps getDefaultProps() const noexcept override; const EffectVtable *getEffectVtable() const noexcept override; }; @@ -142,9 +142,9 @@ EffectState *NullStateFactory::create() /* Returns an ALeffectProps initialized with this effect type's default * property values. */ -ALeffectProps NullStateFactory::getDefaultProps() const noexcept +EffectProps NullStateFactory::getDefaultProps() const noexcept { - ALeffectProps props{}; + EffectProps props{}; return props; } diff --git a/Alc/effects/pshifter.cpp b/Alc/effects/pshifter.cpp index d1d31a66..f95579d7 100644 --- a/Alc/effects/pshifter.cpp +++ b/Alc/effects/pshifter.cpp @@ -152,7 +152,7 @@ struct PshifterState final : public EffectState { ALboolean deviceUpdate(const ALCdevice *device) override; - void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) override; + void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], const ALsizei numInput, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], const ALsizei numOutput) override; DEF_NEWDEL(PshifterState) @@ -181,7 +181,7 @@ ALboolean PshifterState::deviceUpdate(const ALCdevice *device) return AL_TRUE; } -void PshifterState::update(const ALCcontext* UNUSED(context), const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) +void PshifterState::update(const ALCcontext* UNUSED(context), const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) { const float pitch{std::pow(2.0f, static_cast<ALfloat>(props->Pshifter.CoarseTune*100 + props->Pshifter.FineTune) / 1200.0f @@ -326,12 +326,12 @@ void PshifterState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT sample } -void Pshifter_setParamf(ALeffectProps*, ALCcontext *context, ALenum param, ALfloat) +void Pshifter_setParamf(EffectProps*, ALCcontext *context, ALenum param, ALfloat) { alSetError(context, AL_INVALID_ENUM, "Invalid pitch shifter float property 0x%04x", param); } -void Pshifter_setParamfv(ALeffectProps*, ALCcontext *context, ALenum param, const ALfloat*) +void Pshifter_setParamfv(EffectProps*, ALCcontext *context, ALenum param, const ALfloat*) { alSetError(context, AL_INVALID_ENUM, "Invalid pitch shifter float-vector property 0x%04x", param); } -void Pshifter_setParami(ALeffectProps *props, ALCcontext *context, ALenum param, ALint val) +void Pshifter_setParami(EffectProps *props, ALCcontext *context, ALenum param, ALint val) { switch(param) { @@ -351,10 +351,10 @@ void Pshifter_setParami(ALeffectProps *props, ALCcontext *context, ALenum param, alSetError(context, AL_INVALID_ENUM, "Invalid pitch shifter integer property 0x%04x", param); } } -void Pshifter_setParamiv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) +void Pshifter_setParamiv(EffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) { Pshifter_setParami(props, context, param, vals[0]); } -void Pshifter_getParami(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *val) +void Pshifter_getParami(const EffectProps *props, ALCcontext *context, ALenum param, ALint *val) { switch(param) { @@ -369,12 +369,12 @@ void Pshifter_getParami(const ALeffectProps *props, ALCcontext *context, ALenum alSetError(context, AL_INVALID_ENUM, "Invalid pitch shifter integer property 0x%04x", param); } } -void Pshifter_getParamiv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *vals) +void Pshifter_getParamiv(const EffectProps *props, ALCcontext *context, ALenum param, ALint *vals) { Pshifter_getParami(props, context, param, vals); } -void Pshifter_getParamf(const ALeffectProps*, ALCcontext *context, ALenum param, ALfloat*) +void Pshifter_getParamf(const EffectProps*, ALCcontext *context, ALenum param, ALfloat*) { alSetError(context, AL_INVALID_ENUM, "Invalid pitch shifter float property 0x%04x", param); } -void Pshifter_getParamfv(const ALeffectProps*, ALCcontext *context, ALenum param, ALfloat*) +void Pshifter_getParamfv(const EffectProps*, ALCcontext *context, ALenum param, ALfloat*) { alSetError(context, AL_INVALID_ENUM, "Invalid pitch shifter float vector-property 0x%04x", param); } DEFINE_ALEFFECT_VTABLE(Pshifter); @@ -382,16 +382,16 @@ DEFINE_ALEFFECT_VTABLE(Pshifter); struct PshifterStateFactory final : public EffectStateFactory { EffectState *create() override; - ALeffectProps getDefaultProps() const noexcept override; + EffectProps getDefaultProps() const noexcept override; const EffectVtable *getEffectVtable() const noexcept override { return &Pshifter_vtable; } }; EffectState *PshifterStateFactory::create() { return new PshifterState{}; } -ALeffectProps PshifterStateFactory::getDefaultProps() const noexcept +EffectProps PshifterStateFactory::getDefaultProps() const noexcept { - ALeffectProps props{}; + EffectProps props{}; props.Pshifter.CoarseTune = AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE; props.Pshifter.FineTune = AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE; return props; diff --git a/Alc/effects/reverb.cpp b/Alc/effects/reverb.cpp index a32447b2..c0a835fc 100644 --- a/Alc/effects/reverb.cpp +++ b/Alc/effects/reverb.cpp @@ -452,7 +452,7 @@ struct ReverbState final : public EffectState { const ALfloat earlyGain, const ALfloat lateGain, const EffectTarget &target); ALboolean deviceUpdate(const ALCdevice *device) override; - void update(const ALCcontext *context, const ALeffectslot *slot, const ALeffectProps *props, const EffectTarget target) override; + void update(const ALCcontext *context, const ALeffectslot *slot, const EffectProps *props, const EffectTarget target) override; void process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesIn)[BUFFERSIZE], const ALsizei numInput, ALfloat (*RESTRICT samplesOut)[BUFFERSIZE], const ALsizei numOutput) override; DEF_NEWDEL(ReverbState) @@ -912,7 +912,7 @@ void ReverbState::update3DPanning(const ALfloat *ReflectionsPan, const ALfloat * } } -void ReverbState::update(const ALCcontext *Context, const ALeffectslot *Slot, const ALeffectProps *props, const EffectTarget target) +void ReverbState::update(const ALCcontext *Context, const ALeffectslot *Slot, const EffectProps *props, const EffectTarget target) { const ALCdevice *Device{Context->Device}; const ALlistener &Listener = Context->Listener; @@ -1462,7 +1462,7 @@ void ReverbState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT samplesI } -void EAXReverb_setParami(ALeffectProps *props, ALCcontext *context, ALenum param, ALint val) +void EAXReverb_setParami(EffectProps *props, ALCcontext *context, ALenum param, ALint val) { switch(param) { @@ -1477,9 +1477,9 @@ void EAXReverb_setParami(ALeffectProps *props, ALCcontext *context, ALenum param param); } } -void EAXReverb_setParamiv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) +void EAXReverb_setParamiv(EffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) { EAXReverb_setParami(props, context, param, vals[0]); } -void EAXReverb_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat val) +void EAXReverb_setParamf(EffectProps *props, ALCcontext *context, ALenum param, ALfloat val) { switch(param) { @@ -1608,7 +1608,7 @@ void EAXReverb_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param param); } } -void EAXReverb_setParamfv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) +void EAXReverb_setParamfv(EffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) { switch(param) { @@ -1633,7 +1633,7 @@ void EAXReverb_setParamfv(ALeffectProps *props, ALCcontext *context, ALenum para } } -void EAXReverb_getParami(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *val) +void EAXReverb_getParami(const EffectProps *props, ALCcontext *context, ALenum param, ALint *val) { switch(param) { @@ -1646,9 +1646,9 @@ void EAXReverb_getParami(const ALeffectProps *props, ALCcontext *context, ALenum param); } } -void EAXReverb_getParamiv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *vals) +void EAXReverb_getParamiv(const EffectProps *props, ALCcontext *context, ALenum param, ALint *vals) { EAXReverb_getParami(props, context, param, vals); } -void EAXReverb_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) +void EAXReverb_getParamf(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) { switch(param) { @@ -1737,7 +1737,7 @@ void EAXReverb_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum param); } } -void EAXReverb_getParamfv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) +void EAXReverb_getParamfv(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) { switch(param) { @@ -1763,13 +1763,13 @@ DEFINE_ALEFFECT_VTABLE(EAXReverb); struct ReverbStateFactory final : public EffectStateFactory { EffectState *create() override { return new ReverbState{}; } - ALeffectProps getDefaultProps() const noexcept override; + EffectProps getDefaultProps() const noexcept override; const EffectVtable *getEffectVtable() const noexcept override { return &EAXReverb_vtable; } }; -ALeffectProps ReverbStateFactory::getDefaultProps() const noexcept +EffectProps ReverbStateFactory::getDefaultProps() const noexcept { - ALeffectProps props{}; + EffectProps props{}; props.Reverb.Density = AL_EAXREVERB_DEFAULT_DENSITY; props.Reverb.Diffusion = AL_EAXREVERB_DEFAULT_DIFFUSION; props.Reverb.Gain = AL_EAXREVERB_DEFAULT_GAIN; @@ -1801,7 +1801,7 @@ ALeffectProps ReverbStateFactory::getDefaultProps() const noexcept } -void StdReverb_setParami(ALeffectProps *props, ALCcontext *context, ALenum param, ALint val) +void StdReverb_setParami(EffectProps *props, ALCcontext *context, ALenum param, ALint val) { switch(param) { @@ -1815,9 +1815,9 @@ void StdReverb_setParami(ALeffectProps *props, ALCcontext *context, ALenum param alSetError(context, AL_INVALID_ENUM, "Invalid reverb integer property 0x%04x", param); } } -void StdReverb_setParamiv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) +void StdReverb_setParamiv(EffectProps *props, ALCcontext *context, ALenum param, const ALint *vals) { StdReverb_setParami(props, context, param, vals[0]); } -void StdReverb_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat val) +void StdReverb_setParamf(EffectProps *props, ALCcontext *context, ALenum param, ALfloat val) { switch(param) { @@ -1897,10 +1897,10 @@ void StdReverb_setParamf(ALeffectProps *props, ALCcontext *context, ALenum param alSetError(context, AL_INVALID_ENUM, "Invalid reverb float property 0x%04x", param); } } -void StdReverb_setParamfv(ALeffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) +void StdReverb_setParamfv(EffectProps *props, ALCcontext *context, ALenum param, const ALfloat *vals) { StdReverb_setParamf(props, context, param, vals[0]); } -void StdReverb_getParami(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *val) +void StdReverb_getParami(const EffectProps *props, ALCcontext *context, ALenum param, ALint *val) { switch(param) { @@ -1912,9 +1912,9 @@ void StdReverb_getParami(const ALeffectProps *props, ALCcontext *context, ALenum alSetError(context, AL_INVALID_ENUM, "Invalid reverb integer property 0x%04x", param); } } -void StdReverb_getParamiv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALint *vals) +void StdReverb_getParamiv(const EffectProps *props, ALCcontext *context, ALenum param, ALint *vals) { StdReverb_getParami(props, context, param, vals); } -void StdReverb_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) +void StdReverb_getParamf(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *val) { switch(param) { @@ -1970,7 +1970,7 @@ void StdReverb_getParamf(const ALeffectProps *props, ALCcontext *context, ALenum alSetError(context, AL_INVALID_ENUM, "Invalid reverb float property 0x%04x", param); } } -void StdReverb_getParamfv(const ALeffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) +void StdReverb_getParamfv(const EffectProps *props, ALCcontext *context, ALenum param, ALfloat *vals) { StdReverb_getParamf(props, context, param, vals); } DEFINE_ALEFFECT_VTABLE(StdReverb); @@ -1978,13 +1978,13 @@ DEFINE_ALEFFECT_VTABLE(StdReverb); struct StdReverbStateFactory final : public EffectStateFactory { EffectState *create() override { return new ReverbState{}; } - ALeffectProps getDefaultProps() const noexcept override; + EffectProps getDefaultProps() const noexcept override; const EffectVtable *getEffectVtable() const noexcept override { return &StdReverb_vtable; } }; -ALeffectProps StdReverbStateFactory::getDefaultProps() const noexcept +EffectProps StdReverbStateFactory::getDefaultProps() const noexcept { - ALeffectProps props{}; + EffectProps props{}; props.Reverb.Density = AL_REVERB_DEFAULT_DENSITY; props.Reverb.Diffusion = AL_REVERB_DEFAULT_DIFFUSION; props.Reverb.Gain = AL_REVERB_DEFAULT_GAIN; |