]> git.alsa-project.org Git - alsa-utils.git/commitdiff
speaker-test: Don't retry after fatal errors
authorDavid Henningsson <david.henningsson@canonical.com>
Fri, 15 Oct 2010 10:30:44 +0000 (12:30 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sun, 17 Oct 2010 08:17:14 +0000 (10:17 +0200)
Fixup commit 9b1a2566: Remove error loop

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
speaker-test/speaker-test.c

index 458a8d74d66d327a2ff5ceab85b350eee69c4088..3029110221d44ee0982cfec90efebcc5bf985c45 100644 (file)
@@ -993,9 +993,9 @@ int main(int argc, char *argv[]) {
 
   }
 
-  while ((err = snd_pcm_open(&handle, device, SND_PCM_STREAM_PLAYBACK, 0)) < 0) {
+  if ((err = snd_pcm_open(&handle, device, SND_PCM_STREAM_PLAYBACK, 0)) < 0) {
     printf(_("Playback open error: %d,%s\n"), err,snd_strerror(err));
-    sleep(1);
+    exit(EXIT_FAILURE);
   }
 
   if ((err = set_hwparams(handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED)) < 0) {