aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/AudioSystem.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2025-01-11 21:32:30 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2025-01-11 21:32:30 +0100
commita6803980f1e74ecf1abb007b7c77f00d2cd92c43 (patch)
tree425ca961b27117d6e5d5fa0ae5cfca93351e0b33 /src/crepe/system/AudioSystem.cpp
parent6bc0025e4c24ed6659d993f3469c10615fb0e273 (diff)
parent525636bb2158ecea68ebb9d6b8d2dc722524c5e5 (diff)
merge master into loek/doxygen
Diffstat (limited to 'src/crepe/system/AudioSystem.cpp')
-rw-r--r--src/crepe/system/AudioSystem.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/crepe/system/AudioSystem.cpp b/src/crepe/system/AudioSystem.cpp
index b1aa0f8..3c2232f 100644
--- a/src/crepe/system/AudioSystem.cpp
+++ b/src/crepe/system/AudioSystem.cpp
@@ -7,7 +7,7 @@
using namespace crepe;
using namespace std;
-void AudioSystem::update() {
+void AudioSystem::fixed_update() {
ComponentManager & component_manager = this->mediator.component_manager;
ResourceManager & resource_manager = this->mediator.resource_manager;
RefVector<AudioSource> components
@@ -36,6 +36,8 @@ void AudioSystem::diff_update(AudioSource & component, Sound & resource) {
if (component.oneshot_play) {
component.voice = context.play(resource);
+ context.set_loop(component.voice, component.loop);
+ context.set_volume(component.voice, component.volume);
component.oneshot_play = false;
}
if (component.oneshot_stop) {