VIDEO: Stop mixer handle before deleting audio stream in VMDDecoder::seek

Fix a crash when playing looping ambient sounds in Adi4
This commit is contained in:
Simon Delamarre
2026-03-28 22:58:38 +01:00
parent e8456b1b6f
commit d4f2b85229
+3
View File
@@ -1771,6 +1771,9 @@ bool VMDDecoder::seek(int32 frame, int whence, bool restart) {
if (_hasSound && (frame == -1) && if (_hasSound && (frame == -1) &&
((_soundStage == kSoundNone) || (_soundStage == kSoundFinished))) { ((_soundStage == kSoundNone) || (_soundStage == kSoundFinished))) {
if (_soundStage == kSoundFinished)
_mixer->stopHandle(_audioHandle);
delete _audioStream; delete _audioStream;
_soundStage = kSoundLoaded; _soundStage = kSoundLoaded;