DIRECTOR: Don't repeat sound if playback ends

We should only check if the last sound we saw in this channel is the
same, not if playback of the sound has ended. Otherwise, this can cause
a sound to incorrectly loop like in Meet Mediaband.
This commit is contained in:
djsrv 2021-07-16 11:52:08 -04:00
parent acc14ba30e
commit 8e5af4d295

View File

@ -104,7 +104,7 @@ void DirectorSound::playCastMember(CastMemberID memberID, uint8 soundChannel, bo
if (soundCast->_type != kCastSound) {
warning("DirectorSound::playCastMember: attempted to play a non-SoundCastMember %s", memberID.asString().c_str());
} else {
if (!allowRepeat && lastPlayingCast(soundChannel) == memberID && isChannelActive(soundChannel))
if (!allowRepeat && lastPlayingCast(soundChannel) == memberID)
return;
bool looping = ((SoundCastMember *)soundCast)->_looping;
AudioDecoder *ad = ((SoundCastMember *)soundCast)->_audio;