From 707c79a82f4914b029640bfed1dec42519a6531f Mon Sep 17 00:00:00 2001 From: "Herman S." <429230+has207@users.noreply.github.com> Date: Wed, 29 Oct 2025 17:25:57 +0900 Subject: [PATCH] [XMP] Ensure volume always set when driver created. Fixes the issue of the volume starting at default and abruptly adjusting to the game setting as it changes. --- src/xenia/apu/audio_media_player.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xenia/apu/audio_media_player.cc b/src/xenia/apu/audio_media_player.cc index 76e460c9e..fdbd2e14a 100644 --- a/src/xenia/apu/audio_media_player.cc +++ b/src/xenia/apu/audio_media_player.cc @@ -245,9 +245,11 @@ void AudioMediaPlayer::Play() { if (volume_ == 0.0f) { volume_ = cvars::xmp_default_volume / 100.0f; - SetVolume(volume_); } + // Always apply the stored volume to the newly created driver + driver_->SetVolume(volume_); + auto result = ProcessAudioLoop(this, driver_.get(), formatContext, codecContext, 0);