summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--soundbox/pipewire.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/soundbox/pipewire.go b/soundbox/pipewire.go
index 7ee38a2..02ad1d6 100644
--- a/soundbox/pipewire.go
+++ b/soundbox/pipewire.go
@@ -15,6 +15,7 @@ import (
"os/exec"
"runtime"
"sync"
+ "time"
"unsafe"
)
@@ -54,6 +55,7 @@ func (pwc pwCapture) Read(p []byte) (int, error) {
return 0, io.EOF
}
default:
+ time.Sleep(time.Millisecond) // avoid 100 % busy polling
return 0, nil
}
}