HPL1: fix bug in sound channel class

This commit is contained in:
grisenti 2022-08-05 17:24:54 +02:00 committed by Eugene Sandulenko
parent 29b490a6d9
commit 0a4d20e13e
No known key found for this signature in database
GPG Key ID: 014D387312D34F08

View File

@ -135,12 +135,13 @@ void cOpenALSoundChannel::SetVolume(float volume) {
//-----------------------------------------------------------------------
void cOpenALSoundChannel::SetLooping(bool abLoop) {
mbLooping = abLoop;
if (abLoop)
mixer->loopChannel(_handle);
else if (_playing)
void cOpenALSoundChannel::SetLooping(bool loop) {
Hpl1::logInfo(Hpl1::kDebugAudio, "%slooping audio from source %s\n", loop ? "" : "un", mpData->GetName().c_str());
mbLooping = loop;
if (!_playing)
restart();
if (loop)
mixer->loopChannel(_handle);
}
//-----------------------------------------------------------------------