]> git.alsa-project.org Git - alsa-utils.git/commitdiff
Small '-l' fixes...
authorJaroslav Kysela <perex@perex.cz>
Thu, 29 Jul 1999 18:00:14 +0000 (18:00 +0000)
committerJaroslav Kysela <perex@perex.cz>
Thu, 29 Jul 1999 18:00:14 +0000 (18:00 +0000)
aplay/aplay.c

index 91f2036272cd4977f04eed142471fc6dffd3f839..4b8b983560ac7b648745d1b230a44a68af05b9c5 100644 (file)
@@ -200,34 +200,34 @@ static void device_list(void)
                               pcminfo.flags & SND_PCM_INFO_PLAYBACK ? "playback " : "",
                               pcminfo.flags & SND_PCM_INFO_CAPTURE ? "capture " : "",
                               pcminfo.flags & SND_PCM_INFO_DUPLEX ? "duplex " : "");
-                       if ((err = snd_ctl_pcm_playback_info(handle, dev, &playinfo)) < 0) {
-                               printf("Error: control digital audio playback info (%i): %s\n", card, snd_strerror(err));
-                               continue;
-                       }
                        if (pcminfo.flags & SND_PCM_INFO_PLAYBACK) {
-                               printf("  Playback:\n");
-                               printf("    Rate range: %iHz-%iHz\n", playinfo.min_rate, playinfo.max_rate);
-                               printf("    Voices range: %i-%i\n", playinfo.min_channels, playinfo.max_channels);
-                               printf("    Formats:\n");
-                               for (idx = 0; idx < SND_PCM_SFMT_GSM; idx++) {
-                                       if (playinfo.formats & (1 << idx))
-                                               printf("      %s%s\n", get_format(idx),
-                                                      playinfo.hw_formats & (1 << idx) ? " [hardware]" : "");
-                               }
-                               if ((err = snd_ctl_pcm_capture_info(handle, dev, &recinfo)) < 0) {
-                                       printf("Error: control digital audio capture info (%i): %s\n", card, snd_strerror(err));
-                                       continue;
+                               if ((err = snd_ctl_pcm_playback_info(handle, dev, &playinfo)) < 0) {
+                                       printf("Error: control digital audio playback info (%i): %s\n", card, snd_strerror(err));
+                               } else {
+                                       printf("  Playback:\n");
+                                       printf("    Rate range: %iHz-%iHz\n", playinfo.min_rate, playinfo.max_rate);
+                                       printf("    Voices range: %i-%i\n", playinfo.min_channels, playinfo.max_channels);
+                                       printf("    Formats:\n");
+                                       for (idx = 0; idx < SND_PCM_SFMT_GSM; idx++) {
+                                               if (playinfo.formats & (1 << idx))
+                                                       printf("      %s%s\n", get_format(idx),
+                                                              playinfo.hw_formats & (1 << idx) ? " [hardware]" : "");
+                                       }
                                }
                        }
                        if (pcminfo.flags & SND_PCM_INFO_CAPTURE) {
-                               printf("  Record:\n");
-                               printf("    Rate range: %iHz-%iHz\n", recinfo.min_rate, recinfo.max_rate);
-                               printf("    Voices range: %i-%i\n", recinfo.min_channels, recinfo.max_channels);
-                               printf("    Formats:\n");
-                               for (idx = 0; idx < SND_PCM_SFMT_GSM; idx++) {
-                                       if (recinfo.formats & (1 << idx))
-                                               printf("      %s%s\n", get_format(idx),
-                                                      recinfo.hw_formats & (1 << idx) ? " [hardware]" : "");
+                               if ((err = snd_ctl_pcm_capture_info(handle, dev, &recinfo)) < 0) {
+                                       printf("Error: control digital audio capture info (%i): %s\n", card, snd_strerror(err));
+                               } else {
+                                       printf("  Record:\n");
+                                       printf("    Rate range: %iHz-%iHz\n", recinfo.min_rate, recinfo.max_rate);
+                                       printf("    Voices range: %i-%i\n", recinfo.min_channels, recinfo.max_channels);
+                                       printf("    Formats:\n");
+                                       for (idx = 0; idx < SND_PCM_SFMT_GSM; idx++) {
+                                               if (recinfo.formats & (1 << idx))
+                                                       printf("      %s%s\n", get_format(idx),
+                                                              recinfo.hw_formats & (1 << idx) ? " [hardware]" : "");
+                                       }
                                }
                        }
                }