1 #ifndef __AMUSE_EFFECTCHORUS_HPP__ 2 #define __AMUSE_EFFECTCHORUS_HPP__ 4 #include "EffectBase.hpp" 13 #define AMUSE_CHORUS_NUM_BLOCKS 3 18 uint32_t x90_baseDelay;
19 uint32_t x94_variation;
25 EffectChorus(uint32_t baseDelay, uint32_t variation, uint32_t period);
30 void setBaseDelay(uint32_t baseDelay)
32 baseDelay = clamp(5u, baseDelay, 15u);
33 x90_baseDelay = baseDelay;
37 void setVariation(uint32_t variation)
39 variation = clamp(0u, variation, 5u);
40 x94_variation = variation;
44 void setPeriod(uint32_t period)
46 period = clamp(500u, period, 10000u);
56 T* x0_lastChans[8][AMUSE_CHORUS_NUM_BLOCKS];
58 uint8_t x24_currentLast = 1;
59 T x28_oldChans[8][4] = {};
61 uint32_t x58_currentPosLo = 0;
62 uint32_t x5c_currentPosHi = 0;
64 int32_t x60_pitchOffset;
65 uint32_t x64_pitchOffsetPeriodCount;
66 uint32_t x68_pitchOffsetPeriod;
78 uint32_t x8c_target = 0;
80 void doSrc1(
size_t blockSamples,
size_t chanCount);
81 void doSrc2(
size_t blockSamples,
size_t chanCount);
84 uint32_t m_sampsPerMs;
85 uint32_t m_blockSamples;
91 EffectChorusImp(uint32_t baseDelay, uint32_t variation, uint32_t period,
double sampleRate);
92 void applyEffect(T* audio,
size_t frameCount,
const ChannelMap& chanMap);
97 #endif // __AMUSE_EFFECTCHORUS_HPP__