Shkyera Engine
Easy to use, game engine for Python
Loading...
Searching...
No Matches
AudioSystem.hpp
Go to the documentation of this file.
1#pragma once
2
6
7#include <memory>
8
9class ma_engine;
10
11namespace shkyera {
12
15 public:
17 explicit AudioSystem(std::shared_ptr<Registry> registry);
19
21 void update();
22
23 private:
27
30
32 void handleVolume();
33
35 void handleSpatiality();
36
38 std::unique_ptr<ma_engine> _engine;
39};
40
41} // namespace shkyera
Component that enables audio playback for an entity.
Definition AudioSourceComponent.hpp:13
System that manages audio playback and spatial audio.
Definition AudioSystem.hpp:14
void handlePlayback(AudioSourceComponent &audioSource)
Definition AudioSystem.cpp:107
bool ensureLoaded(AudioSourceComponent &audioSource)
Definition AudioSystem.cpp:50
void handleVolume()
Updates volume for all audio sources.
Definition AudioSystem.cpp:65
void update()
Updates audio playback state and spatial audio.
Definition AudioSystem.cpp:35
void handleSpatiality()
Updates spatial audio based on camera position.
Definition AudioSystem.cpp:130
std::unique_ptr< ma_engine > _engine
Miniaudio engine instance.
Definition AudioSystem.hpp:38
~AudioSystem()
Definition AudioSystem.cpp:29
Definition RegistryViewer.hpp:51
Definition Asset.hpp:6
Definition Clock.hpp:9