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

◆ set_profile() [2/2]

bool MayaFlux::Nodes::Network::DuctNetwork::set_profile ( std::function< double(double)> radius)
nodiscard

Replace the profile with a radius function of distance from the mouth.

Definition at line 267 of file DuctNetwork.cpp.

268{
269 std::scoped_lock lock(m_producer_mutex);
270 Profile profile { .radii = {}, .function = std::move(radius) };
271 auto next = build(m_length, profile, m_losses, m_mouth_volume, m_mouth, m_bell);
272 if (!next) {
273 return false;
274 }
275
276 next->keep_state = true;
277
278 m_profile = std::move(profile);
279 publish(std::move(next));
280 return true;
281}
std::shared_ptr< Prepared > build(double length, const Profile &profile, const Losses &losses, double mouth_volume, const std::shared_ptr< TerminationOperator > &mouth, const std::shared_ptr< TerminationOperator > &bell) const
std::shared_ptr< TerminationOperator > m_mouth
void publish(std::shared_ptr< Prepared > next)
std::shared_ptr< TerminationOperator > m_bell

References build(), m_bell, m_length, m_losses, m_mouth, m_mouth_volume, m_producer_mutex, m_profile, and publish().

Here is the call graph for this function: