Flag fixed latency inputs as likely incompatible in UI

There is currently a bug in PulseAudio that prevents
devices with fixed latency from working. See #30
pull/43/head 0.5.2-beta
lawl 4 years ago
parent 37b35ce1ee
commit 3fc46d2d30

@ -22,10 +22,11 @@ import (
//go:generate go run scripts/embedlicenses.go
type input struct {
ID string
Name string
isMonitor bool
checked bool
ID string
Name string
isMonitor bool
checked bool
dynamicLatency bool
}
func main() {
@ -94,6 +95,9 @@ func main() {
inp.Name = sources[i].PropList["device.description"]
inp.isMonitor = (sources[i].MonitorSourceIndex != 0xffffffff)
//PA_SOURCE_DYNAMIC_LATENCY = 0x0040U
inp.dynamicLatency = sources[i].Flags&uint32(0x0040) != 0
inputs = append(inputs, inp)
}

@ -137,7 +137,11 @@ func updatefn(w *nucular.Window, ui *uistate) {
}
w.LayoutFitWidth(ui.sourceListColdWidthIndex, 0)
w.Label(el.Name, "LC")
if el.dynamicLatency {
w.Label(el.Name, "LC")
} else {
w.LabelColored("(incompatible?) "+el.Name, "LC", orange)
}
}
w.Row(30).Dynamic(1)

Loading…
Cancel
Save