From 8c5cd2f30387efb25fa21d6ba876f499a804e572 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Fri, 23 Oct 2020 21:04:52 +1100 Subject: [PATCH] fix android version freezing when you try to quit game and music is enabled --- src/Audio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Audio.c b/src/Audio.c index c3b676ac8..6e157a208 100644 --- a/src/Audio.c +++ b/src/Audio.c @@ -510,6 +510,9 @@ cc_result Audio_Play(struct AudioContext* ctx) { cc_result Audio_Stop(struct AudioContext* ctx) { if (!ctx->bqPlayerPlayer) return 0; + + /* According to OpenSL ES spec, Clear can never fail anyways */ + (*ctx->bqPlayerQueue)->Clear(ctx->bqPlayerQueue); return (*ctx->bqPlayerPlayer)->SetPlayState(ctx->bqPlayerPlayer, SL_PLAYSTATE_STOPPED); }