Removes one inherited use added by add_channel_usage.
97{
98 if (channel_id >= 32)
99 return;
100
102 uint32_t current =
count.load(std::memory_order_acquire);
103 do {
104 if (current == 0)
105 return;
106 }
while (!
count.compare_exchange_weak(current, current - 1, std::memory_order_acq_rel));
107
110 modulator->remove_channel_usage(channel_id);
111 }
112}
void refresh_channel_bit(uint32_t channel_id)
Recomputes one channel's bit in the active mask from direct and counted usage.
virtual std::vector< std::pair< ModulatorRole, std::shared_ptr< Node > > > get_modulators() const
Returns direct modulator nodes and their roles.
std::array< std::atomic< uint32_t >, 32 > m_channel_usage_counts
Per channel count of consumer paths held through add_channel_usage.
std::vector< double > count(std::span< const double > data, size_t n_windows, uint32_t hop_size, uint32_t window_size)
Sample count per window (as double for pipeline uniformity).