From a00e467d6736105623037eb58219d0f9059840f5 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 27 Aug 2002 16:33:28 +0000 Subject: [PATCH] added -P (--playback) and -C (--capture) options to specify the stream explicitly regardless of its program name. --- aplay/aplay.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/aplay/aplay.c b/aplay/aplay.c index beee2a0..b27adac 100644 --- a/aplay/aplay.c +++ b/aplay/aplay.c @@ -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;