3#include "sound_bakery/core/core_include.h"
4#include "sound_bakery/system.h"
14 class sound_container;
25 sc_dsp* highpass =
nullptr;
26 std::unique_ptr<sc_node_group, SC_NODE_GROUP_DELETER> nodeGroup;
36 std::shared_ptr<node_instance> parent;
44 bool createChildren(
const node_base& thisNode,
47 unsigned int numTimesPlayed);
49 std::vector<std::shared_ptr<node_instance>> 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 node_instance* get_parent()
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
Base object that all sound Bakery objects should inherit from.
Definition object.h:21
Generic node that can have a get_parent and own children.
Definition node.h:23
NodeInstances represent runtime versions of Nodes, either containers or busses.
Definition node_instance.h:104
Root node that builds the core graph of sounds and busses.
Definition node.h:64
A runtime graph of nodes and busses, playing a sound or many.
Definition voice.h:16
Owns a list of child node instances.
Definition node_instance.h:43
Definition node_instance.h:72
sbk::core::database_ptr< node_base > 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 get_parent node instance.
Definition node_instance.h:33
ma_node with an additional enum descriptor.
Definition sound_chef_common.h:179
Groups nodes/DSPs together into one.
Definition sound_chef_common.h:205