Fix regression in CLI

pull/71/head 0.8.2
lawl 4 years ago
parent 8ddee5f4bd
commit 39c1e37dfa

@ -93,6 +93,7 @@ func main() {
ctx.librnnoise = rnnoisefile
paClient, err := pulseaudio.NewClient()
if err != nil {
log.Printf("Couldn't create pulseaudio client: %v\n", err)
os.Exit(1)
@ -122,6 +123,7 @@ func main() {
}
if load {
ctx.paClient = paClient
if sourceName == "" {
fmt.Fprintf(os.Stderr, "No source specified to load.\n")
os.Exit(1)
@ -135,7 +137,11 @@ func main() {
sources := getSources(paClient)
for i := range sources {
if sources[i].ID == sourceName {
loadSupressor(&ctx, sources[i])
err := loadSupressor(&ctx, sources[i])
if err != nil {
fmt.Fprintf(os.Stderr, "Error loading PulseAudio Module: %+v\n", err)
os.Exit(1)
}
os.Exit(0)
}
}

Loading…
Cancel
Save