Skip to content

Commit

Permalink
fix type
Browse files Browse the repository at this point in the history
  • Loading branch information
noriah committed Mar 25, 2023
1 parent ea1368b commit eb6d142
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions input/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func GetAllBackendNames() []string {
return out
}

// Get the default backend depending on
// Get the default backend depending on runtime.GOOS
func DefaultBackend() string {
switch runtime.GOOS {
case "windows":
Expand All @@ -52,25 +52,23 @@ func DefaultBackend() string {
}

case "darwin":
if backend := FindBackend("portaudio"); backend != nil {
if HasBackend("portaudio") {
return "portaudio"
}
if HasBackend("portaudio") {
return "portaudio"
}

if HasBackend("ffmpeg-avfoundation") {
return "ffmpeg-avfoundation"
}

case "linux":
if path, _ := exec.LookPath("pw-cat"); path != "" {
if HasBackend("pipewire") {
if HasBackend("pipewire") {
if path, _ := exec.LookPath("pw-cat"); path != "" {
return "pipewire"
}
}

if path, _ := exec.LookPath("parec"); path != "" {
if HasBackend("parec") {
if HasBackend("parec") {
if path, _ := exec.LookPath("parec"); path != "" {
return "parec"
}
}
Expand Down

0 comments on commit eb6d142

Please sign in to comment.