1 #ifndef __AMUSE_EFFECTDELAY_HPP__ 2 #define __AMUSE_EFFECTDELAY_HPP__ 4 #include "EffectBase.hpp" 26 void setDelay(uint32_t delay)
28 delay = clamp(10u, delay, 5000u);
29 for (
int i=0 ; i<8 ; ++i)
33 void setChanDelay(
int chanIdx, uint32_t delay)
35 delay = clamp(10u, delay, 5000u);
36 x3c_delay[chanIdx] = delay;
40 void setFeedback(uint32_t feedback)
42 feedback = clamp(0u, feedback, 100u);
43 for (
int i=0 ; i<8 ; ++i)
44 x48_feedback[i] = feedback;
48 void setChanFeedback(
int chanIdx, uint32_t feedback)
50 feedback = clamp(0u, feedback, 100u);
51 x48_feedback[chanIdx] = feedback;
55 void setOutput(uint32_t output)
57 output = clamp(0u, output, 100u);
58 for (
int i=0 ; i<8 ; ++i)
59 x54_output[i] = output;
62 void setChanOutput(
int chanIdx, uint32_t output)
64 output = clamp(0u, output, 100u);
65 x54_output[chanIdx] = output;
74 uint32_t x0_currentSize[8];
75 uint32_t xc_currentPos[8];
76 uint32_t x18_currentFeedback[8];
77 uint32_t x24_currentOutput[8];
79 std::unique_ptr<T[]> x30_chanLines[8];
81 uint32_t m_sampsPerMs;
82 uint32_t m_blockSamples;
85 EffectDelayImp(uint32_t initDelay, uint32_t initFeedback, uint32_t initOutput,
double sampleRate);
86 void applyEffect(T* audio,
size_t frameCount,
const ChannelMap& chanMap);
91 #endif // __AMUSE_EFFECTDELAY_HPP__