Sound Bakery  v0.1.0
Open-source audio middleware for games
Loading...
Searching...
No Matches
soundbank.h
1#pragma once
2
3#include "sound_bakery/core/core_include.h"
5
6namespace sbk::engine
7{
8 class bus;
9 class event;
10 class sound;
11 class node_base;
12 class int_parameter;
13 class float_parameter;
14 class named_parameter;
15
19 struct SB_CLASS soundbank_dependencies
20 {
21 std::vector<std::shared_ptr<sbk::engine::event>> events;
22 std::vector<std::shared_ptr<sbk::engine::sound>> sounds;
23 std::vector<std::shared_ptr<sbk::engine::node_base>> nodes;
24
25 std::vector<std::shared_ptr<sbk::engine::bus>> busses;
26 std::vector<std::shared_ptr<sbk::engine::int_parameter>> intParameters;
27 std::vector<std::shared_ptr<sbk::engine::float_parameter>> floatParameters;
28 std::vector<std::shared_ptr<sbk::engine::named_parameter>> namedParameters;
29 };
30
34 class SB_CLASS soundbank : public sbk::core::database_object
35 {
36 REGISTER_REFLECTION(soundbank, sbk::core::database_object)
37
38 public:
39 std::vector<sbk::core::database_ptr<event>> get_events() const { return m_events; }
40
41 soundbank_dependencies gather_dependencies() const;
42
43 auto set_master_soundbank(bool master) -> void { m_masterSoundbank = master; }
44 auto get_master_soundbank() const -> bool { return m_masterSoundbank; }
45
46 private:
47 std::vector<sbk::core::database_ptr<event>> m_events;
48 bool m_masterSoundbank = false; //< Determines whether we package bussess, parameters, etc.
49 };
50} // namespace sbk::engine
Base object type for any object that can exist in the editor/database. Holds an ID and name.
Definition database_object.h:12
Packages events and dependent objects and sounds.
Definition soundbank.h:35
Provides extensions to miniaudio's encoding API.
Wraps all events, objects, and sounds needed to package a soundbank.
Definition soundbank.h:20