mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-30 23:00:21 -04:00
Set volume on synthesizer rather than player so it works for save as well
This commit is contained in:
parent
6e9c4e0bb9
commit
96de7a653d
@ -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);
|
||||
}
|
||||
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user