]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Capture where the device was never there (ENOENT), as opposed to when it was there...
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Sat, 31 Dec 2022 17:57:25 +0000 (17:57 +0000)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Sat, 31 Dec 2022 17:57:25 +0000 (17:57 +0000)
audio_alsa.c

index 4fb4049c4708f569a26e45e05d126ff078504fd6..bf8d6adacdebd820eac2be8838e06042d8b67544 100644 (file)
@@ -1769,7 +1769,7 @@ static int do_play(void *buf, int samples) {
       debug(1, "alsa: SND_PCM_STATE_* %d, error %d (\"%s\") writing %d samples to alsa device.",
             state, ret, (char *)errorstring, samples);
     }
-    if (ret == -ENODEV) // if the device isn't there...
+    if ((ret == -ENOENT) || (ret == -ENODEV)) // if the device isn't there...
       handle_unfixable_error(-ret);
   }
   return ret;
@@ -1798,7 +1798,7 @@ static int do_open(int do_auto_setup) {
       frames_sent_for_playing = 0;
       alsa_backend_state = abm_connected; // only do this if it really opened it.
     } else {
-      if (ret == -ENODEV) // if the device isn't there...
+      if ((ret == -ENOENT) || (ret == -ENODEV)) // if the device isn't there...
         handle_unfixable_error(-ret);
     }
   } else {