Set default volume to MAX

Set MAX volume for SDL2 Mixer, as well as the volume for all audio sinks via wpctl to 1.0.
This forces the computer to always be at absolute max volume, without creating scripts on the machine to run wpctl commands. Leaving the display or connected speakers to be in full control over the volume of music.
This commit is contained in:
NeilClack
2026-03-30 00:08:52 -05:00
parent 6e28b90ee8
commit aea646f788
3 changed files with 176 additions and 47 deletions
-9
View File
@@ -120,7 +120,6 @@ func Run() {
InitialFontSize: 128,
StandardFontSize: 32,
LinePattern: "fibonacci",
LastVolume: 128,
AudioEnabled: true,
}
if err := DB.Create(&initialConfig).Error; err != nil {
@@ -443,14 +442,6 @@ func (app *Application) initKeybinds() {
keybinds.Register(sdl.K_q, sdl.KMOD_RCTRL, func() {
app.Stop()
})
keybinds.Register(sdl.K_UP, sdl.KMOD_SHIFT, func() {
mixer.SetVolume128(volumeStepSize, app.Config.Load())
})
keybinds.Register(sdl.K_DOWN, sdl.KMOD_SHIFT, func() {
mixer.SetVolume128(-volumeStepSize, app.Config.Load())
})
}
func (app *Application) Stop() {