aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-07-04 06:32:30 +0200
committerAnton Khirnov <anton@khirnov.net>2012-07-28 14:32:48 +0200
commit67ef5f4eb54297cb0448653ee59993c790c4cd3e (patch)
tree0a74326edde7eeb04bae9452ecea854672f1ad8b
parent45838561f2f14339acdf53ffa3adbfe8e6db7514 (diff)
downloadffmpeg-67ef5f4eb54297cb0448653ee59993c790c4cd3e.tar.gz
audiogen: allow specifying random seed as a commandline parameter.
-rw-r--r--tests/audiogen.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/audiogen.c b/tests/audiogen.c
index 8d27dc2632..acb380da50 100644
--- a/tests/audiogen.c
+++ b/tests/audiogen.c
@@ -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]);