Merge pull request #207 from dweymouth/feature/equalizer
Add 15 band graphic equalizer in Settings dialog
This commit is contained in:
@@ -192,6 +192,13 @@ func (a *App) setupMPV() error {
|
||||
})
|
||||
a.Player.SetAudioExclusive(a.Config.LocalPlayback.AudioExclusive)
|
||||
|
||||
eq := &player.ISO15BandEqualizer{
|
||||
EQPreamp: a.Config.LocalPlayback.EqualizerPreamp,
|
||||
Disabled: !a.Config.LocalPlayback.EqualizerEnabled,
|
||||
}
|
||||
copy(eq.BandGains[:], a.Config.LocalPlayback.GraphicEqualizerBands)
|
||||
a.Player.SetEqualizer(eq)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
+14
-8
@@ -70,10 +70,13 @@ type TracksPageConfig struct {
|
||||
}
|
||||
|
||||
type LocalPlaybackConfig struct {
|
||||
AudioDeviceName string
|
||||
AudioExclusive bool
|
||||
InMemoryCacheSizeMB int
|
||||
Volume int
|
||||
AudioDeviceName string
|
||||
AudioExclusive bool
|
||||
InMemoryCacheSizeMB int
|
||||
Volume int
|
||||
EqualizerEnabled bool
|
||||
EqualizerPreamp float64
|
||||
GraphicEqualizerBands []float64
|
||||
}
|
||||
|
||||
type ScrobbleConfig struct {
|
||||
@@ -151,10 +154,13 @@ 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,
|
||||
EqualizerPreamp: 0,
|
||||
GraphicEqualizerBands: make([]float64, 15),
|
||||
},
|
||||
Scrobbling: ScrobbleConfig{
|
||||
Enabled: true,
|
||||
|
||||
Reference in New Issue
Block a user