]> git.alsa-project.org Git - alsa-utils.git/commitdiff
added -P (--playback) and -C (--capture) options to specify the
authorTakashi Iwai <tiwai@suse.de>
Tue, 27 Aug 2002 16:33:28 +0000 (16:33 +0000)
committerTakashi Iwai <tiwai@suse.de>
Tue, 27 Aug 2002 16:33:28 +0000 (16:33 +0000)
stream explicitly regardless of its program name.

aplay/aplay.c

index beee2a00628cd6393c627c2641b321fc91246643..b27adac505fc01bd49b89d5243684e7b6f245d4d 100644 (file)
@@ -305,6 +305,8 @@ int main(int argc, char *argv[])
                {"buffer-time", 1, 0, 'B'},
                {"verbose", 0, 0, 'v'},
                {"separate-channels", 0, 0, 'I'},
+               {"playback", 0, 0, 'P'},
+               {"capture", 0, 0, 'C'},
                {0, 0, 0, 0}
        };
        char *pcm_name = "default";
@@ -436,6 +438,17 @@ int main(int argc, char *argv[])
                case 'I':
                        interleaved = 0;
                        break;
+               case 'P':
+                       stream = SND_PCM_STREAM_PLAYBACK;
+                       command = "aplay";
+                       break;
+               case 'C':
+                       stream = SND_PCM_STREAM_CAPTURE;
+                       command = "arecord";
+                       start_delay = 1;
+                       if (file_type == FORMAT_DEFAULT)
+                               file_type = FORMAT_WAVE;
+                       break;
                default:
                        fprintf(stderr, "Try `%s --help' for more information.\n", command);
                        return 1;