🎨 Make JSON keys lowercase

This commit is contained in:
2024-02-28 11:03:53 +01:00
parent 4bdeb3a666
commit dd665d9443
2 changed files with 28 additions and 28 deletions

View File

@ -7,35 +7,35 @@ import (
)
type PortState struct {
Mute bool
Volume float32
Balance float32
Mute bool `json:"mute"`
Volume float32 `json:"volume"`
Balance float32 `json:"balance"`
}
type PortProperties struct {
Backend string
Channels uint8
Backend string `json:"backend"`
Channels uint8 `json:"channels"`
}
type PortRoute struct {
ToUUID string
Mute bool
Volume float32
Balance float32
ToUUID string `json:"toUUID"`
Mute bool `json:"mute"`
Volume float32 `json:"volume"`
Balance float32 `json:"balance"`
}
type Port struct {
UUID string
Name string
Properties PortProperties
State PortState
Route []PortRoute
UUID string `json:"UUID"`
Name string `json:"name"`
Properties PortProperties `json:"properties"`
State PortState `json:"state"`
Route []PortRoute `json:"route"`
object []*jack.Port
}
var portConfig struct {
Input []Port
Output []Port
Input []Port `json:"input"`
Output []Port `json:"output"`
}
var portsInited bool = false
@ -124,7 +124,7 @@ func addToBuffer(src *[]jack.AudioSample, dst *[]jack.AudioSample, volume float3
}
func multiplyBuffer(dst *[]jack.AudioSample, factor float32) {
for i, _ := range *dst {
for i := range *dst {
(*dst)[i] *= jack.AudioSample(factor)
}
}