ALSpeaker::play fix

This commit is contained in:
MihailRis 2024-03-15 01:36:00 +03:00
parent a82476949c
commit a149c520c6

View File

@ -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));
}