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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user