1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Fix playback of looped sounds

This commit is contained in:
Ivan Savenko
2025-06-20 17:23:53 +03:00
parent c041a035c8
commit 2e42d6dd9f

View File

@@ -201,7 +201,7 @@ int CSoundHandler::playSoundImpl(const AudioPath & sound, int repeats, bool useC
if(chunk) if(chunk)
{ {
channel = Mix_PlayChannel(-1, chunk, 0); channel = Mix_PlayChannel(-1, chunk, repeats);
if(channel == -1) if(channel == -1)
{ {
logGlobal->error("Unable to play sound file %s , error %s", sound.getOriginalName(), Mix_GetError()); logGlobal->error("Unable to play sound file %s , error %s", sound.getOriginalName(), Mix_GetError());