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

◆ set_every_n_blocks()

void MayaFlux::Nodes::Network::WalkOperator::set_every_n_blocks ( uint32_t  every_n_blocks)
noexcept

Change or disable the self-contained step rate.

Parameters
every_n_blocks0 disables self-stepping; a positive value steps that often, resetting the internal block counter
Note
The block counter itself is not atomic. Calling this concurrently with process() (i.e. while the owning network is being processed on another thread, such as the audio thread) is a data race. Call it from the same thread that drives process_batch(), or before the network is registered for processing.

Definition at line 48 of file WalkOperator.cpp.

49{
50 m_every_n_blocks.store(every_n_blocks, std::memory_order_relaxed);
51 m_blocks_until = every_n_blocks;
52}
std::atomic< uint32_t > m_every_n_blocks