| 178 | } |
| 179 | |
| 180 | void 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 | |
| 192 | void ConvolverNode::_activateNewImpulse() |
| 193 | { |