Store the per-version EAX effect state in the base class
commit5b3c27ea587d84c2a49150b032f5d4dec5eb50b9
authorChris Robinson <chris.kcat@gmail.com>
Fri, 10 Mar 2023 03:58:42 +0000 (9 19:58 -0800)
committerChris Robinson <chris.kcat@gmail.com>
Fri, 10 Mar 2023 03:58:42 +0000 (9 19:58 -0800)
tree76c8dfe3bf3a9a30d0d08ebb730bcf9fd5b5bdd4
parent869778979787320bf254942936f7fb1e951e57ed
Store the per-version EAX effect state in the base class

This is the start of the refactoring for holding separable per-version EAX
effects. Currently the effect state is stored in the effect object, which is
instantiated per-type. This makes it impossible for different effects to be
assigned on different EAX versions for a given effect slot (e.g. if the app
sets a Chorus effect on EAX4 Slot0, it would fail to get or set the EAX1/2/3
reverb properties since it's a Chorus effect object).

Seperate per-version effects will allow for switching the OpenAL effect by
switching versions. This will provide an extra benefit in being able to delay
OpenAL effect initialization until some EAX version has been set, avoiding an
extraneous reverb and/or chorus processor for apps that only query some EAX
properties but don't set anything (or which only use Slot0, leaving Slot1 with
a defaulted Chorus effect running).
14 files changed:
al/eax/effect.h
al/effects/autowah.cpp
al/effects/chorus.cpp
al/effects/compressor.cpp
al/effects/distortion.cpp
al/effects/echo.cpp
al/effects/effects.cpp
al/effects/equalizer.cpp
al/effects/fshifter.cpp
al/effects/modulator.cpp
al/effects/null.cpp
al/effects/pshifter.cpp
al/effects/reverb.cpp
al/effects/vmorpher.cpp