[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
parent c99ef5ab85
commit a2d6e919aa
+3 -1
View File
@@ -249,9 +249,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);