Sound Bakery  v0.1.0
Open-source audio middleware for games
Loading...
Searching...
No Matches
bus.h
1#pragma once
2
3#include "sound_bakery/node/node.h"
4
5namespace sbk::engine
6{
7 class node_instance;
8
9 class SB_CLASS bus : public node
10 {
11 REGISTER_REFLECTION(bus, node)
12 LEAK_DETECTOR(bus)
13
14 public:
15 bus() : node(), m_masterBus(false) {}
16
17 bool can_add_child_type(const rttr::type& childType) const override;
18
19 bool can_add_parent() const override;
20 bool can_add_parent_type(const rttr::type& parentType) const override;
21
22 void setMasterBus(bool isMaster);
23
24 bool isMasterBus() const { return m_masterBus; }
25
26 std::shared_ptr<node_instance> lockAndCopy();
27
28 protected:
29 std::weak_ptr<node_instance> m_busInstance;
30
31 private:
32 bool m_masterBus;
33 };
34} // namespace sbk::engine
Definition bus.h:10
Root node that builds the core graph of sounds and busses.
Definition node.h:65