DD2-monitor/audio/t.c

51 lines
1.0 KiB
C
Raw Permalink Normal View History

2019-04-13 11:43:33 +02:00
/*
* Audio player for the phytotron
*/
#include <stdio.h>
2019-05-27 15:15:48 +02:00
#include <stdlib.h>
2019-05-27 15:36:22 +02:00
#include <unistd.h>
2019-04-13 11:43:33 +02:00
#include "player.h"
/* --------------------------------------------------------------------- */
2019-05-27 15:36:22 +02:00
int verbosity;
/* --------------------------------------------------------------------- */
void help(int v)
{
2019-05-28 14:10:39 +02:00
puts("Options :");
puts("\t-w filename.wav");
exit(0);
2019-05-27 15:36:22 +02:00
}
/* --------------------------------------------------------------------- */
2019-04-13 11:43:33 +02:00
int main(int argc, char *argv[])
{
char *wavname = "1337.wav";
2019-05-27 15:36:22 +02: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 11:43:33 +02:00
foo = blast_this_file(wavname);
fprintf(stderr, "audio blaster -> %d\n", foo);
return 0;
}
/* --------------------------------------------------------------------- */