Jack Director Code
Control Jack transport features using MIDI commands.
Brought to you by:
sergioatzori
--- a +++ b/util.c @@ -0,0 +1,56 @@ +/* + * util.c - Utilities + * + * + * 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 + */ + + +/* + * system include files + */ +#include <stdlib.h> +#include <stdio.h> +#include <stdbool.h> + + +/* + * my headers and definitions + */ + +#include "jack-director.h" + +void printerror(char *error, bool verbose, const char *const string2) { + if (verbose && (config.debug > 1)) { + fprintf(stderr, "%s%s\n", error, string2); + fflush(stderr); + } else if (config.debug > 2) { + fprintf(stderr, "%s%s\n", error, string2); + fflush(stderr); + } +} + +void printmessage(char *message, const char *const string2) { + fprintf(stdout, "%s%s\n", message, string2); + fflush(stdout); +} \ No newline at end of file