aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/compressor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Alc/effects/compressor.cpp')
-rw-r--r--Alc/effects/compressor.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/Alc/effects/compressor.cpp b/Alc/effects/compressor.cpp
index 12a8c886..d6cb3f4a 100644
--- a/Alc/effects/compressor.cpp
+++ b/Alc/effects/compressor.cpp
@@ -30,6 +30,8 @@
#include "vecmat.h"
+namespace {
+
#define AMP_ENVELOPE_MIN 0.5f
#define AMP_ENVELOPE_MAX 2.0f
@@ -159,11 +161,21 @@ void ALcompressorState::process(ALsizei samplesToDo, const ALfloat (*RESTRICT sa
struct CompressorStateFactory final : public EffectStateFactory {
EffectState *create() override;
+ ALeffectProps getDefaultProps() const noexcept override;
};
EffectState *CompressorStateFactory::create()
{ return new ALcompressorState{}; }
+ALeffectProps CompressorStateFactory::getDefaultProps() const noexcept
+{
+ ALeffectProps props{};
+ props.Compressor.OnOff = AL_COMPRESSOR_DEFAULT_ONOFF;
+ return props;
+}
+
+} // namespace
+
EffectStateFactory *CompressorStateFactory_getFactory()
{
static CompressorStateFactory CompressorFactory{};