aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorlawl <github@dumbinter.net>2020-07-20 19:09:12 +0200
committerlawl <github@dumbinter.net>2020-07-20 19:09:12 +0200
commit3fc46d2d30ca26eaece8d1dac15d556b0a6f1f7f (patch)
tree76753a2ef738f09257c6ecdc5312083bcb340f37 /main.go
parent37b35ce1eed438adee42e50d0cc0ddf48375846e (diff)
downloadnoisetorch-3fc46d2d30ca26eaece8d1dac15d556b0a6f1f7f.tar.gz
noisetorch-3fc46d2d30ca26eaece8d1dac15d556b0a6f1f7f.zip
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
Diffstat (limited to 'main.go')
-rw-r--r--main.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/main.go b/main.go
index c756fe8..39cd8f7 100644
--- a/main.go
+++ b/main.go
@@ -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)
}