diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-30 17:27:16 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-30 17:27:16 +0100 |
commit | b8194e02679dc88f5c0a240da83a4700ec5200cf (patch) | |
tree | 216e2e28793fce2d468b23fa9b5d2a17db32012b /src/crepe/facade/SoundContext.cpp | |
parent | 9eff2e24fa4cf0ffad2b47cc922a6558bc1a9fa1 (diff) |
add doxygen comments + clean up
Diffstat (limited to 'src/crepe/facade/SoundContext.cpp')
-rw-r--r-- | src/crepe/facade/SoundContext.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/crepe/facade/SoundContext.cpp b/src/crepe/facade/SoundContext.cpp index 470b3cc..8bd7e74 100644 --- a/src/crepe/facade/SoundContext.cpp +++ b/src/crepe/facade/SoundContext.cpp @@ -17,17 +17,16 @@ SoundContext::~SoundContext() { Sound::Handle SoundContext::play(Sound & resource) { return { - .handle = this->engine.play(resource.sample, this->default_volume), + .handle = this->engine.play(resource.sample, 1.0f), }; } void SoundContext::stop(Sound::Handle & handle) { this->engine.stop(handle.handle); } -void SoundContext::set_volume(Sound & resource, Sound::Handle & handle, float volume) { +void SoundContext::set_volume(Sound::Handle & handle, float volume) { this->engine.setVolume(handle.handle, volume); - this->default_volume = volume; } -void SoundContext::set_loop(Sound & resource, Sound::Handle & handle, bool loop) { +void SoundContext::set_loop(Sound::Handle & handle, bool loop) { this->engine.setLooping(handle.handle, loop); } |