MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ notify_tick()

void MayaFlux::Nodes::Generator::Impulse::notify_tick ( double  value)
overrideprotectedvirtual

Notifies all registered callbacks about a new sample.

Parameters
valueThe newly generated sample

This method is called internally whenever a new sample is generated, creating the appropriate context and invoking all registered callbacks that should receive notification about this sample.

Reimplemented from MayaFlux::Nodes::Generator::Generator.

Definition at line 176 of file Impulse.cpp.

177{
179
180 auto& ctx = get_last_context();
181
182 m_callbacks.fire(ctx);
184 if (m_impulse_occurred) {
186 }
187}
glm::vec3 value
NodeContext & get_last_context() override
Gets the last created context object.
Definition Generator.cpp:37
virtual void update_context(double value) override
Updates the context object for callbacks.
Definition Generator.cpp:7
HookList m_impulse_callbacks
Collection of impulse-specific callback functions.
Definition Impulse.hpp:251
void fire(NodeContext &ctx) const
Calls every entry whose condition, if any, holds.
Definition NodeUtils.cpp:68
HookList m_conditional_callbacks
Hooks fired on a tick only while their condition holds.
Definition Node.hpp:485
HookList m_callbacks
Hooks fired on every tick.
Definition Node.hpp:478

References MayaFlux::Nodes::HookList::fire(), MayaFlux::Nodes::Generator::Generator::get_last_context(), MayaFlux::Nodes::Node::m_callbacks, MayaFlux::Nodes::Node::m_conditional_callbacks, m_impulse_callbacks, m_impulse_occurred, MayaFlux::Nodes::Generator::Generator::update_context(), and value.

Referenced by process_sample().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: