diff --git a/src/tmrd.c b/src/tmrd.c index 3748bc7..50a5637 100644 --- a/src/tmrd.c +++ b/src/tmrd.c @@ -39,9 +39,12 @@ unsigned int delay_time = 25; /* in tenths of seconds */ int new_delay; jack_default_audio_sample_t **buffer; /* the buffers */ +char VERSION[4] = "2.0"; void run_ui(); void sig_handler(int signum); void attach_sig_handler(); +void parseArgs(); +void printHelp(); int process (jack_nframes_t nframes, void *arg) { @@ -99,6 +102,9 @@ void jack_shutdown (void *arg) int main (int argc, char *argv[]) { + fprintf(stderr, "tmrd v%s\n", VERSION); + parseArgs(argc, argv); + attach_sig_handler(); jack_client_t *client; @@ -203,6 +209,48 @@ void run_ui() endwin(); /* End curses mode */ } +/* + parse command line args + */ +void parseArgs(int argc, char *argv[]) +{ + int ii = 1; + while( ii set maximum delay to arg seconds\n"); + fprintf(stderr, "-d set initial delay to arg seconds\n"); + fprintf(stderr, "-h display this help text and exit\n"); + fprintf(stderr, "-v display version and exit\n"); +} + /* increase delay on sigusr1 decrease on sigusr2 diff --git a/tmrd b/tmrd index d9fd6b0..e63ce2a 100755 Binary files a/tmrd and b/tmrd differ