add equalizer UI in settings dialog
This commit is contained in:
@@ -185,6 +185,12 @@ func (a *App) setupMPV() error {
|
||||
})
|
||||
a.Player.SetAudioExclusive(a.Config.LocalPlayback.AudioExclusive)
|
||||
|
||||
eq := &player.ISO15BandEqualizer{
|
||||
Disabled: !a.Config.LocalPlayback.EqualizerEnabled,
|
||||
}
|
||||
copy(eq.BandGains[:], a.Config.LocalPlayback.GraphicEqualizerBands)
|
||||
a.Player.SetEqualizer(eq)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
+12
-8
@@ -70,10 +70,12 @@ type TracksPageConfig struct {
|
||||
}
|
||||
|
||||
type LocalPlaybackConfig struct {
|
||||
AudioDeviceName string
|
||||
AudioExclusive bool
|
||||
InMemoryCacheSizeMB int
|
||||
Volume int
|
||||
AudioDeviceName string
|
||||
AudioExclusive bool
|
||||
InMemoryCacheSizeMB int
|
||||
Volume int
|
||||
EqualizerEnabled bool
|
||||
GraphicEqualizerBands []float64
|
||||
}
|
||||
|
||||
type ScrobbleConfig struct {
|
||||
@@ -151,10 +153,12 @@ func DefaultConfig(appVersionTag string) *Config {
|
||||
},
|
||||
LocalPlayback: LocalPlaybackConfig{
|
||||
// "auto" is the name to pass to MPV for autoselecting the output device
|
||||
AudioDeviceName: "auto",
|
||||
AudioExclusive: false,
|
||||
InMemoryCacheSizeMB: 30,
|
||||
Volume: 100,
|
||||
AudioDeviceName: "auto",
|
||||
AudioExclusive: false,
|
||||
InMemoryCacheSizeMB: 30,
|
||||
Volume: 100,
|
||||
EqualizerEnabled: false,
|
||||
GraphicEqualizerBands: make([]float64, 15),
|
||||
},
|
||||
Scrobbling: ScrobbleConfig{
|
||||
Enabled: true,
|
||||
|
||||
Reference in New Issue
Block a user