]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Small cleanups
authorJaroslav Kysela <perex@perex.cz>
Wed, 19 Feb 2003 21:15:59 +0000 (21:15 +0000)
committerJaroslav Kysela <perex@perex.cz>
Wed, 19 Feb 2003 21:15:59 +0000 (21:15 +0000)
test/code.c

index 1d4e0acc4a424960f7dc7b0e2d45df6b78134eee..a9f527f2c7d570f1e9efa447a4cb76e9daf6c9db 100644 (file)
@@ -1,5 +1,5 @@
 #include <stdlib.h>
-#include <stdlib.h>
+#include <stdio.h>
 #include <string.h>
 
 #define rdtscll(val) \
@@ -309,11 +309,15 @@ void mix_areas2(unsigned int size,
 
 int main(int argc, char **argv)
 {
-       int size = atoi(argv[1]);
-       int n = atoi(argv[2]);
-       int max = atoi(argv[3]);
+       int size = 2048, n = 4, max = 0x7fff;
        int i;
        unsigned long long begin, end;
+
+       if (argc == 4) {
+               size = atoi(argv[1]);
+               n = atoi(argv[2]);
+               max = atoi(argv[3]);
+       }
        s16 *dst = malloc(sizeof(*dst) * size);
        s32 *sum = calloc(size, sizeof(*sum));
        s16 **srcs = malloc(sizeof(*srcs) * n);
@@ -349,4 +353,5 @@ int main(int argc, char **argv)
        }
        rdtscll(end);
        printf("mix_areas2    : %lld\n", end - begin);
+       return 0;
 }