1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

Fix possible memory leaks in sound handler, simplify API

This commit is contained in:
Ivan Savenko
2025-04-27 17:06:08 +03:00
parent 5433b07e5f
commit e567e1b820
5 changed files with 91 additions and 61 deletions

View File

@ -312,7 +312,7 @@ void HeroMovementController::updateMovementSound(const CGHeroInstance * h, int3
ENGINE->sound().stopSound(currentMovementSoundChannel);
if(!currentMovementSoundName.empty())
currentMovementSoundChannel = ENGINE->sound().playSound(currentMovementSoundName, -1, true);
currentMovementSoundChannel = ENGINE->sound().playSoundLooped(currentMovementSoundName);
else
currentMovementSoundChannel = -1;
}