mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-26 13:20:52 +00:00
- let the ANM player wait until the sound has finished if it has reached the last frame before the sound ends.
In Shadow Warrior there's a few where the sound plays a bit longer than the video. Fixes #341
This commit is contained in:
parent
607d30ef8e
commit
443ddf670b
2 changed files with 11 additions and 0 deletions
|
@ -1071,6 +1071,16 @@ int SoundEngine::GetSoundPlayingInfo (int sourcetype, const void *source, int so
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (FSoundChan* chan = Channels; chan != NULL; chan = chan->NextChan)
|
||||||
|
{
|
||||||
|
if ((sourcetype == SOURCE_Any || (chan->SourceType == sourcetype && chan->Source == source)))
|
||||||
|
{
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -175,6 +175,7 @@ public:
|
||||||
soundEngine->StartSound(SOURCE_None, nullptr, nullptr, CHAN_AUTO, CHANF_UI, sound, 1.f, ATTN_NONE);
|
soundEngine->StartSound(SOURCE_None, nullptr, nullptr, CHAN_AUTO, CHANF_UI, sound, 1.f, ATTN_NONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!skiprequest && !nostopsound && curframe == numframes && soundEngine->GetSoundPlayingInfo(SOURCE_None, nullptr, -1)) return 1;
|
||||||
curframe++;
|
curframe++;
|
||||||
if (skiprequest && !nostopsound) soundEngine->StopAllChannels();
|
if (skiprequest && !nostopsound) soundEngine->StopAllChannels();
|
||||||
return skiprequest ? -1 : curframe < numframes? 1 : 0;
|
return skiprequest ? -1 : curframe < numframes? 1 : 0;
|
||||||
|
|
Loading…
Reference in a new issue