[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:
committed by
Radosław Gliński
parent
4af2fd6513
commit
707c79a82f
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user