/*
* jack-director.c - Main Program
*
*
* this file is part of:
*
* JackDirector 0.1 --- Start/Stop Transport by midi command, play a metronome
*
* jack-director - 2014 (C) by Sergio Atzori <sergioatzori [at] gmail.com>
*/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
* my headers and definitions
*/
#include "jack-director.h"
#include "config.h"
#include "jackclient.h"
TCONFIG config;
MIDI_CMD midi_prg[16][128]; /* 16 channels - 128 programs */
unsigned short current_prg = 128;
unsigned short current_midich = 16;
unsigned short current_transport = 0;
unsigned short current_bpm = 0;
unsigned short current_mute = 0;
unsigned short current_stopzero = 0;
unsigned long long current_locate = 0;
int main (int argc, char **argv) {
if ((argc > 2) || ((argc == 2) && ((strcmp(argv[1], PRINT_VERSION) == 0) || (strcmp(argv[1],PRINT_VERSION_LONG) == 0)))) {
printmessage(PROGRAM_VERSION, "");
printmessage(PROGRAM_INFOTEXT, "");
exit(0);
};
SetDefaultValues();
InstallSignalHandler();
if (argc > 1) {
free(config.config_file);
config.config_file = AllocString(argv[1]);
}
ReadConfigFile();
return jackClient();
}