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 event;
9 class sound;
10 class node_base;
11
15 struct SB_CLASS soundbank_dependencies
16 {
17 std::vector<std::shared_ptr<sbk::engine::event>> events;
18 std::vector<std::shared_ptr<sbk::engine::sound>> sounds;
19 std::vector<std::shared_ptr<sbk::engine::node_base>> nodes;
20
21 // The following properties are sent straight to Sound Chef
22 // for soundbank generation.
23 std::vector<const char*> encodedSoundPaths;
24 std::vector<sc_encoding_format> encodingFormats;
25
26 std::vector<std::string> encodedSoundPathsStrings; //< used to keep sound paths alive while passing to Sound Chef
27 };
28
32 class SB_CLASS soundbank : public sbk::core::database_object
33 {
34 REGISTER_REFLECTION(soundbank, sbk::core::database_object)
35
36 public:
37 std::vector<sbk::core::database_ptr<event>> get_events() const { return m_events; }
38
39 soundbank_dependencies gather_dependencies() const;
40
41 private:
42 std::vector<sbk::core::database_ptr<event>> m_events;
43 };
44} // 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:33
Provides extensions to miniaudio's encoding API.
Wraps all events, objects, and sounds needed to package a soundbank.
Definition soundbank.h:16