MCPcopy Create free account
hub / github.com/FastLED/FastLED / SynthOscillatorImpl

Method SynthOscillatorImpl

src/fl/audio/synth.cpp.hpp:150–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148//////////////////////////////////////////////////////////////////////////////
149
150SynthOscillatorImpl::SynthOscillatorImpl(fl::shared_ptr<SynthEngineImpl> engine, const SynthParams& params)
151 : mEngine(engine), mCurrentParams(params) {
152 // Allocate HexWave structure
153 mHexWave = static_cast<hw::HexWave*>(fl::malloc(sizeof(hw::HexWave)));
154 fl::memset(mHexWave, 0, sizeof(hw::HexWave));
155
156 // Initialize the oscillator with the engine
157 hw::hexwave_create(
158 mHexWave,
159 engine->getEngineInternal(),
160 params.reflect,
161 params.peakTime,
162 params.halfHeight,
163 params.zeroWait
164 );
165}
166
167SynthOscillatorImpl::~SynthOscillatorImpl() FL_NOEXCEPT {
168 if (mHexWave) {

Callers

nothing calls this directly

Calls 3

memsetFunction · 0.85
getEngineInternalMethod · 0.80
mallocFunction · 0.50

Tested by

no test coverage detected