DD2-monitor/audio/t.c

51 lines
1.0 KiB
C
Raw Normal View History

2019-04-13 20:43:33 +11:00
/*
* Audio player for the phytotron
*/
#include <stdio.h>
2019-05-28 00:15:48 +11:00
#include <stdlib.h>
2019-05-28 00:36:22 +11:00
#include <unistd.h>
2019-04-13 20:43:33 +11:00
#include "player.h"
/* --------------------------------------------------------------------- */
2019-05-28 00:36:22 +11:00
int verbosity;
/* --------------------------------------------------------------------- */
void help(int v)
{
2019-05-28 23:10:39 +11:00
puts("Options :");
puts("\t-w filename.wav");
exit(0);
2019-05-28 00:36:22 +11:00
}
/* --------------------------------------------------------------------- */
2019-04-13 20:43:33 +11:00
int main(int argc, char *argv[])
{
char *wavname = "1337.wav";
2019-05-28 00:36:22 +11:00
int foo, opt, K;
printf("\n**** %s **** compiled the %s at %s ***\n",
argv[0], __DATE__, __TIME__);
while ((opt = getopt(argc, argv, "hK:vw:")) != -1) {
switch (opt) {
case 'h': help(0); break;
case 'K': K = atoi(optarg); break;
case 'v': verbosity++; break;
case 'w': wavname = optarg; break;
default: break;
}
}
2019-04-13 20:43:33 +11:00
foo = blast_this_file(wavname);
fprintf(stderr, "audio blaster -> %d\n", foo);
return 0;
}
/* --------------------------------------------------------------------- */