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

◆ setup()

void MayaFlux::Nodes::Network::DuctNetwork::setup ( double length,
Profile profile,
double sample_rate )
private

Definition at line 55 of file DuctNetwork.cpp.

56{
57 m_sample_rate = static_cast<uint32_t>(sample_rate);
60
61 std::scoped_lock lock(m_producer_mutex);
62 m_length = length;
63 m_rate = sample_rate;
64 m_profile = std::move(profile);
65 m_mouth = std::make_shared<ReedOperator>();
66 m_bell = std::make_shared<RadiationOperator>();
67
70
71 if (auto prepared = build(m_length, m_profile, m_losses, m_mouth_volume, m_mouth, m_bell)) {
72 m_applied_friction = prepared->friction;
73 m_applied_viscosity = prepared->viscosity;
74 m_intervals = prepared->grid.intervals;
75 m_courant = prepared->grid.courant;
76 m_bandwidth = prepared->grid.bandwidth;
77 m_field_points.store(prepared->grid.intervals + 1, std::memory_order_relaxed);
78 m_field.reserve(prepared->grid.intervals + 1);
79 m_active = std::move(prepared);
80 }
81}
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
std::shared_ptr< Prepared > m_active
std::shared_ptr< TerminationOperator > m_bell
virtual void set_topology(Topology topology)
Set the network's topology.
std::shared_ptr< OperatorChain > m_operator_chain
void set_output_mode(OutputMode mode)
Set the network's output routing mode.
@ CHAIN
Linear sequence: node[i] → node[i+1].
@ AUDIO_SINK
Aggregated audio samples sent to output.

References MayaFlux::Nodes::Network::AUDIO_SINK, build(), MayaFlux::Nodes::Network::CHAIN, m_active, m_applied_friction, m_applied_viscosity, m_bandwidth, m_bell, m_courant, m_field, m_field_points, m_intervals, m_length, m_losses, m_mouth, m_mouth_volume, MayaFlux::Nodes::Network::NodeNetwork::m_operator_chain, m_producer_mutex, m_profile, m_rate, MayaFlux::Nodes::Network::NodeNetwork::m_sample_rate, MayaFlux::Nodes::Network::NodeNetwork::set_output_mode(), and MayaFlux::Nodes::Network::NodeNetwork::set_topology().

Referenced by DuctNetwork(), and DuctNetwork().

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