From 35cc2ccd7a3018c400c107ae7e66ac749951be78 Mon Sep 17 00:00:00 2001 From: Gliniak Date: Sat, 2 Nov 2024 18:51:15 +0100 Subject: [PATCH] [XMP] Fixed issues with lack of state change and premature audio cut --- src/xenia/apu/audio_media_player.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xenia/apu/audio_media_player.cc b/src/xenia/apu/audio_media_player.cc index 6c11f2f8e..035b8ec36 100644 --- a/src/xenia/apu/audio_media_player.cc +++ b/src/xenia/apu/audio_media_player.cc @@ -255,7 +255,7 @@ void AudioMediaPlayer::Play() { // We need to stop playback only if it wasn't if (result != ProcessAudioResult::ForcedFinish) { - Stop(); + Stop(true, true); } // We're waiting for dangling samples to finish playing. @@ -270,10 +270,10 @@ void AudioMediaPlayer::Play() { avio_context_free(&formatContext->pb); avformat_close_input(&formatContext); - DeleteDriver(); processing_end_fence_.Signal(); if (result == ProcessAudioResult::ForcedFinish) { + DeleteDriver(); return; }