mirror of
https://github.com/gopher64/gopher64.git
synced 2026-11-11 00:29:02 +01:00
allow up to 200% audio volume (#331)
This commit is contained in:
1 parent
e48ad9bdff
commit
ea6f203e33
1 file changed
+2
-2
+2
-2
@@ -100,8 +100,8 @@ pub fn lower_audio_volume(ui: &ui::Ui) {
|
||||
pub fn raise_audio_volume(ui: &ui::Ui) {
|
||||
unsafe {
|
||||
let mut gain = sdl3_sys::audio::SDL_GetAudioStreamGain(ui.audio.audio_stream) + 0.05;
|
||||
if gain > 1.0 {
|
||||
gain = 1.0;
|
||||
if gain > 2.0 {
|
||||
gain = 2.0;
|
||||
}
|
||||
sdl3_sys::audio::SDL_SetAudioStreamGain(ui.audio.audio_stream, gain);
|
||||
sdl3_sys::audio::SDL_SetAudioStreamGain(ui.audio.event_audio_stream, gain);
|
||||
|
||||
Reference in new issue
Block a user