fix android version freezing when you try to quit game and music is enabled

This commit is contained in:
UnknownShadow200 2020-10-23 21:04:52 +11:00
parent 9688c2ebd2
commit 8c5cd2f303

View File

@ -510,6 +510,9 @@ cc_result Audio_Play(struct AudioContext* ctx) {
cc_result Audio_Stop(struct AudioContext* ctx) { cc_result Audio_Stop(struct AudioContext* ctx) {
if (!ctx->bqPlayerPlayer) return 0; 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); return (*ctx->bqPlayerPlayer)->SetPlayState(ctx->bqPlayerPlayer, SL_PLAYSTATE_STOPPED);
} }