3#include "sound_bakery/core/core_include.h"
4#include "sound_bakery/system.h"
22 bool initNodeGroup(
const NodeBase& node);
25 sc_dsp* highpass =
nullptr;
26 std::unique_ptr<sc_node_group, SC_NODE_GROUP_DELETER> nodeGroup;
34 bool createParent(
const NodeBase& thisNode,
Voice* owningVoice);
36 std::shared_ptr<NodeInstance> parent;
44 bool createChildren(
const NodeBase& thisNode,
47 unsigned int numTimesPlayed);
49 std::vector<std::shared_ptr<NodeInstance>> childrenNodes;
52 enum class NodeInstanceType
59 enum class NodeInstanceState
84 NodeInstanceType type = NodeInstanceType::MAIN;
113 bool isPlaying()
const
115 return m_state == NodeInstanceState::PLAYING || m_state == NodeInstanceState::STOPPING;
118 std::shared_ptr<Node> getReferencingNode()
const noexcept {
return m_referencingNode; }
119 NodeInstance* getParent()
const noexcept {
return m_parent.parent.get(); }
120 sc_node_group* getBus()
const noexcept {
return m_nodeGroup.nodeGroup.get(); }
123 void setVolume(
float oldVolume,
float newVolume);
124 void setPitch(
float oldPitch,
float newPitch);
125 void setLowpass(
float oldLowpass,
float newLowpass);
126 void setHighpass(
float oldHighpass,
float newHighpass);
128 std::shared_ptr<Node> m_referencingNode =
nullptr;
129 Voice* m_owningVoice =
nullptr;
130 NodeInstanceState m_state = NodeInstanceState::UNINIT;
134 std::unique_ptr<sc_sound_instance, SC_SOUND_INSTANCE_DELETER> m_soundInstance;
135 unsigned int m_numTimesPlayed = 0;
Definition database_ptr.h:23
Simple base Object that all Sound Bakery objects should inherit from.
Definition object.h:33
NodeInstances represent runtime versions of Nodes, either containers or busses.
Definition node_instance.h:104
A runtime graph of nodes and busses, playing a sound or many.
Definition voice.h:17
Owns a list of child node instances.
Definition node_instance.h:43
Definition node_instance.h:72
SB::Core::DatabasePtr< NodeBase > refNode
Node to reference.
Definition node_instance.h:76
Owns a node group and applies DSP effects to it.
Definition node_instance.h:21
Owns a parent node instance.
Definition node_instance.h:33
ma_node with an additional enum descriptor.
Definition sound_chef_common.h:152
Groups nodes/DSPs together into one.
Definition sound_chef_common.h:177