Monitor MPD FIFO output status for audio sources
This commit is contained in:
9 files changed
+159
-1
No files matched your search
@@ -30,6 +30,10 @@ type Controller struct {
|
||||
recorderPalette color.Palette
|
||||
}
|
||||
|
||||
type audioSourceConfigurator interface {
|
||||
SetAudioSource(config.Audio)
|
||||
}
|
||||
|
||||
func New(config *config.Config) (*Controller, error) {
|
||||
log := logrus.NewEntry(logrus.StandardLogger())
|
||||
|
||||
@@ -59,6 +63,9 @@ func New(config *config.Config) (*Controller, error) {
|
||||
c.teardown(log)
|
||||
return nil, err
|
||||
}
|
||||
if p, ok := c.ctx.player.(audioSourceConfigurator); ok {
|
||||
p.SetAudioSource(config.Audio)
|
||||
}
|
||||
if err := c.configureInputs(log, &config.Input); err != nil {
|
||||
log.WithError(err).Error("fatal error setting up inputs")
|
||||
c.teardown(log)
|
||||
|
||||
Reference in new issue
Block a user