aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tinyplay.c')
-rw-r--r--tinyplay.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tinyplay.c b/tinyplay.c
index f52d76a..915a1ea 100644
--- a/tinyplay.c
+++ b/tinyplay.c
@@ -76,9 +76,12 @@ int main(int argc, char **argv)
76 76
77 /* parse command line arguments */ 77 /* parse command line arguments */
78 argv += 2; 78 argv += 2;
79 if (strcmp(*argv, "-d") == 0) { 79 while (*argv) {
80 if (strcmp(*argv, "-d") == 0) {
81 argv++;
82 device = atoi(*argv);
83 }
80 argv++; 84 argv++;
81 device = atoi(*argv);
82 } 85 }
83 86
84 fread(&header, sizeof(struct wav_header), 1, file); 87 fread(&header, sizeof(struct wav_header), 1, file);