mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 00:55:42 +01:00
added -P (--playback) and -C (--capture) options to specify the
stream explicitly regardless of its program name.
This commit is contained in:
parent
a07a85bf5e
commit
a00e467d67
1 changed files with 13 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue