Checkpoint
This commit is contained in:
160 files changed
+76293
-387
No files matched your search
+43
-7
@@ -1,12 +1,16 @@
|
||||
// Package config contains the configuration structure and parser.
|
||||
package config
|
||||
|
||||
import "image"
|
||||
|
||||
// Config structure.
|
||||
type Config struct {
|
||||
Display Display `hcl:"display,block"`
|
||||
Input Input `hcl:"input,block"`
|
||||
Audio Audio `hcl:"audio,block"`
|
||||
Mixer Mixer `hcl:"mixer,block"`
|
||||
Player Player `hcl:"player,block"`
|
||||
Screen Screen `hcl:"screen,block"`
|
||||
}
|
||||
|
||||
// Display configuration for OLED and TFT screens.
|
||||
@@ -15,7 +19,7 @@ type Display struct {
|
||||
Main *DisplayConfig `hcl:"main,block"`
|
||||
Left *DisplayConfig `hcl:"left,block"`
|
||||
Right *DisplayConfig `hcl:"right,block"`
|
||||
Color *DisplayConfig `hcl:"color,block"`
|
||||
Meta *DisplayConfig `hcl:"meta,block"`
|
||||
}
|
||||
|
||||
// DisplayConfig is the configuration for one display.
|
||||
@@ -84,12 +88,19 @@ type Encoder struct {
|
||||
|
||||
// Audio source provides PCM samples.
|
||||
type Audio struct {
|
||||
Type string `hcl:"type"`
|
||||
Path string `hcl:"path,optional"`
|
||||
Host string `hcl:"host,optional"`
|
||||
Rate float64 `hcl:"rate,optional"`
|
||||
Channels int `hcl:"channels,optional"`
|
||||
Bits int `hcl:"bits,optional"`
|
||||
Type string `hcl:"type"`
|
||||
Path string `hcl:"path,optional"`
|
||||
Host string `hcl:"host,optional"`
|
||||
Rate int `hcl:"rate,optional"`
|
||||
Channels int `hcl:"channels,optional"`
|
||||
Bits int `hcl:"bits,optional"`
|
||||
BigEndian bool `hcl:"be,optional"`
|
||||
Delay string `hcl:"delay,optional"`
|
||||
}
|
||||
|
||||
type Mixer struct {
|
||||
Type string `hcl:"type"`
|
||||
Card int `hcl:"card,optional"`
|
||||
}
|
||||
|
||||
// Player controls the audio.
|
||||
@@ -98,3 +109,28 @@ type Player struct {
|
||||
Host string `hcl:"host,optional"`
|
||||
Password string `hcl:"password,optional"`
|
||||
}
|
||||
|
||||
type Screen struct {
|
||||
Playing *ScreenPlaying `hcl:"playing,block"`
|
||||
Spectrum *ScreenSpectrum `hcl:"spectrum,block"`
|
||||
VUMeter *ScreenVUMeter `hcl:"vumeter,block"`
|
||||
}
|
||||
|
||||
type ScreenPlaying struct {
|
||||
Track *Style `hcl:"track,block"`
|
||||
Format *Style `hcl:"format,block"`
|
||||
Spectrum *ScreenSpectrum `hcl:"spectrum,block"`
|
||||
}
|
||||
type ScreenSpectrum struct {
|
||||
Style *Style `hcl:"style"`
|
||||
MinFrequency int `hcl:"min,optional"`
|
||||
MaxFrequency int `hcl:"max,optional"`
|
||||
Hold int `hcl:"hold,optional"`
|
||||
Window string `hcl:"window,optional"`
|
||||
Waterfall bool `hcl:"waterfall,optional"`
|
||||
Move image.Point
|
||||
}
|
||||
|
||||
type ScreenVUMeter struct {
|
||||
Style *Style `hcl:"style"`
|
||||
}
|
||||
Reference in new issue
Block a user