File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ func GetAllBackendNames() []string {
4343 return out
4444}
4545
46- // Get the default backend depending on
46+ // Get the default backend depending on runtime.GOOS
4747func DefaultBackend () string {
4848 switch runtime .GOOS {
4949 case "windows" :
@@ -52,25 +52,23 @@ func DefaultBackend() string {
5252 }
5353
5454 case "darwin" :
55- if backend := FindBackend ("portaudio" ); backend != nil {
56- if HasBackend ("portaudio" ) {
57- return "portaudio"
58- }
55+ if HasBackend ("portaudio" ) {
56+ return "portaudio"
5957 }
6058
6159 if HasBackend ("ffmpeg-avfoundation" ) {
6260 return "ffmpeg-avfoundation"
6361 }
6462
6563 case "linux" :
66- if path , _ := exec . LookPath ( "pw-cat" ); path != "" {
67- if HasBackend ( "pipewire" ) {
64+ if HasBackend ( "pipewire" ) {
65+ if path , _ := exec . LookPath ( "pw-cat" ); path != "" {
6866 return "pipewire"
6967 }
7068 }
7169
72- if path , _ := exec . LookPath ("parec" ); path != "" {
73- if HasBackend ("parec" ) {
70+ if HasBackend ("parec" ) {
71+ if path , _ := exec . LookPath ("parec" ); path != "" {
7472 return "parec"
7573 }
7674 }
You can’t perform that action at this time.
0 commit comments