1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

audiogen: allow specifying random seed as a commandline parameter.

This commit is contained in:
Anton Khirnov 2012-07-04 06:32:30 +02:00
parent 45838561f2
commit 67ef5f4eb5

View File

@ -144,8 +144,8 @@ int main(int argc, char **argv)
int nb_channels = 2;
char *ext;
if (argc < 2 || argc > 4) {
printf("usage: %s file [<sample rate> [<channels>]]\n"
if (argc < 2 || argc > 5) {
printf("usage: %s file [<sample rate> [<channels>] [<random seed>]]\n"
"generate a test raw 16 bit audio stream\n"
"If the file extension is .wav a WAVE header will be added.\n"
"default: 44100 Hz stereo\n", argv[0]);
@ -168,6 +168,9 @@ int main(int argc, char **argv)
}
}
if (argc > 4)
seed = atoi(argv[4]);
outfile = fopen(argv[1], "wb");
if (!outfile) {
perror(argv[1]);