Sound Bakery  v0.1.0
Open-source audio middleware for games
Loading...
Searching...
No Matches
project.h
1#pragma once
2
3#include "sound_bakery/core/core_include.h"
4#include "sound_bakery/editor/project/project_configuration.h"
5
6#include "yaml-cpp/yaml.h"
7
8namespace sbk::engine
9{
10 class sound_container;
11}
12
13namespace sbk::editor
14{
20 class SB_CLASS project : public sbk::core::object_owner
21 {
22 public:
23 bool open_project(const std::filesystem::path& projectFile);
24 void create_project(const std::filesystem::path& projectFile) {}
25
26 void save_project() const;
27
28 void encode_all_media() const;
29
30 [[nodiscard]] const project_configuration& get_config() const;
31 [[nodiscard]] std::weak_ptr<sbk::engine::sound_container> get_preview_container() const;
32
33 private:
34 void loadSounds();
35 void loadSystem();
36 void loadObjects();
37
38 void createPreviewContainer();
39
40 void buildSoundbanks() const;
41
42 void saveSystem() const;
43 void saveObjects() const;
44 void saveYAML(const YAML::Emitter& emitter, const std::filesystem::path& filePath) const;
45
46 project_configuration m_projectConfig;
47 std::weak_ptr<sbk::engine::sound_container> m_previewSoundContainer;
48 };
49} // namespace sbk::editor
Creates, owns and tracks objects.
Definition object_owner.h:13
Manages a project file and the objects contained within it.
Definition project.h:21
Handles file and folder paths for a project.
Definition project_configuration.h:11