Adds intermediate message for unsupported pipewire

This should be removed, when pipewire is supported - progress is currently tracked in the issue
https://github.com/lawl/NoiseTorch/issues/63
pull/128/head
Lars Kumbier 3 years ago
parent 8b11b649ee
commit 2df9d3b003

@ -186,6 +186,21 @@ func paConnectionWatchdog(ctx *ntcontext) {
fmt.Fprintf(os.Stderr, "Couldn't create pulseaudio client: %v\n", err)
}
// This searches for the pipewire server, which is not supported yet. In order to reduce support requests
// due to missing modules, we inform the user in the UI. Remove when Pipewire is supported:
// cf. https://github.com/lawl/NoiseTorch/issues/63
info, err := paClient.ServerInfo()
if err != nil {
log.Printf("Couldn't fetch pulse server info: %v\n", err)
fmt.Fprintf(os.Stderr, "Couldn't fetch pulse server info: %v\n", err)
}
ctx.isPipewire = strings.Contains(info.PackageName, "PipeWire")
if ctx.isPipewire {
msg := "Found Pipewire, which is not yet supported. Check the implementation issue for progress and help: https://github.com/lawl/NoiseTorch/issues/63\n"
log.Printf(msg, err)
fmt.Fprintf(os.Stderr, msg)
}
ctx.paClient = paClient
go updateNoiseSupressorLoaded(ctx)

@ -33,6 +33,7 @@ type ntcontext struct {
haveCapabilities bool
capsMismatch bool
views *ViewStack
isPipewire bool
}
var green = color.RGBA{34, 187, 69, 255}
@ -78,6 +79,8 @@ func mainView(ctx *ntcontext, w *nucular.Window) {
if ctx.noiseSupressorState == loaded {
w.LabelColored("NoiseTorch active", "RC", green)
} else if ctx.isPipewire { // intermediate warning - remove when resolved: https://github.com/lawl/NoiseTorch/issues/63
w.LabelColored("Unfortunately, Pipewire is not supported yet :/", "RC", red)
} else if ctx.noiseSupressorState == unloaded {
w.LabelColored("NoiseTorch inactive", "RC", red)
} else if ctx.noiseSupressorState == inconsistent {

Loading…
Cancel
Save