From 9e1afb41c73cd37d9ec1f06df9661f7495ec98ef Mon Sep 17 00:00:00 2001
From: Oleg Derevenetz <[EMAIL REDACTED]>
Date: Tue, 1 Aug 2023 13:07:36 +0300
Subject: [PATCH] Prevent a double call to Mix_ChannelFinished() when using
Mix_FadeOutChannel()
(cherry picked from commit ba783cf9f14c2e97e12c28b10c6fb917099eae64)
---
src/mixer.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mixer.c b/src/mixer.c
index 03ea759f..fd2111be 100644
--- a/src/mixer.c
+++ b/src/mixer.c
@@ -403,6 +403,8 @@ mix_channels(void *udata, Uint8 *stream, int len)
/* rcg06072001 Alert app if channel is done playing. */
if (!mix_channel[i].playing && !mix_channel[i].looping) {
+ mix_channel[i].fading = MIX_NO_FADING;
+ mix_channel[i].expire = 0;
_Mix_channel_done_playing(i);
/* Update the volume after the application callback */