Don't allow negative volumes

Former-commit-id: 35a52235fa4194d40ffc0d8d3243d0653dcca0a5
This commit is contained in:
Imbris 2019-05-19 17:50:20 -04:00
parent 888bd65036
commit 39caf7e51b

View File

@ -78,6 +78,6 @@ impl AudioFrontend {
}
pub fn set_volume(&mut self, volume: f32) {
self.stream.set_volume(volume.min(1.0))
self.stream.set_volume(volume.min(1.0).max(0.0))
}
}