From a149c520c62d876f34961262d55c8ec5418d6286 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Fri, 15 Mar 2024 01:36:00 +0300 Subject: [PATCH] ALSpeaker::play fix --- src/audio/AL/ALAudio.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/audio/AL/ALAudio.cpp b/src/audio/AL/ALAudio.cpp index 242b421b..1aa231e0 100644 --- a/src/audio/AL/ALAudio.cpp +++ b/src/audio/AL/ALAudio.cpp @@ -258,7 +258,8 @@ void ALSpeaker::setLoop(bool loop) { void ALSpeaker::play() { paused = false; stopped = false; - AL_CHECK(alSourcef(source, AL_GAIN, 0.0f)); + auto channel = get_channel(this->channel); + AL_CHECK(alSourcef(source, AL_GAIN, volume * channel->getVolume())); AL_CHECK(alSourcePlay(source)); }