Set volume on synthesizer rather than player so it works for save as well

This commit is contained in:
Kovid Goyal 2023-01-28 12:44:42 +05:30
parent 6e9c4e0bb9
commit 96de7a653d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -442,10 +442,10 @@ class Synthesizer {
}
}
double volume() const { return player.Volume(); }
double volume() const { return synth.Options().AudioVolume(); }
void volume(double val) {
if (val < 0 || val > 1) throw std::out_of_range("Invalid volume value must be between 0 and 1");
player.Volume(val);
synth.Options().AudioVolume(val);
}
};