[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.
This commit is contained in:
Herman S.
2025-10-29 17:25:57 +09:00
committed by Radosław Gliński
parent 4af2fd6513
commit 707c79a82f

View File

@@ -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);