MCPcopy Create free account
hub / github.com/LabSound/LabSound / setImpulse

Method setImpulse

src/core/ConvolverNode.cpp:180–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180void ConvolverNode::setImpulse(std::shared_ptr<AudioBus> bus)
181{
182 if (!bus)
183 return; /// @TODO setting null should turn the convolver into a pass through?
184
185 /// @TODO setImpulse should return a promise of some sort, TBD, and when _activateNewImpulse
186 /// has run, the promise should be fulfilled.
187
188 auto new_bus = AudioBus::createByCloning(bus.get());
189 _impulseResponseClip->setBus(new_bus.get()); // setBus will invoke _activatNewImpulse()
190}
191
192void ConvolverNode::_activateNewImpulse()
193{

Callers 2

playMethod · 0.80
playMethod · 0.80

Calls 2

getMethod · 0.80
setBusMethod · 0.45

Tested by

no test coverage detected