From 4cca632532d3e315d68768e00549ac2047232e55 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 24 Nov 2015 09:47:45 +0100 Subject: Improve compilation without JACK --- audio_read.h | 2 ++ common.h | 6 +++++- toolame.c | 8 +++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/audio_read.h b/audio_read.h index ab17a8f..215e89d 100644 --- a/audio_read.h +++ b/audio_read.h @@ -28,8 +28,10 @@ typedef struct IFF_AIFF_struct } IFF_AIFF; +#if defined(JACK_INPUT) void setup_jack(frame_header *header, const char* jackname); int process(jack_nframes_t nframes, void *arg); +#endif void jack_shutdown(void *arg); void parse_input_file (FILE *musicin, char *, frame_header *header, unsigned long *num_samples); diff --git a/common.h b/common.h index 36d65a1..49ef1ae 100644 --- a/common.h +++ b/common.h @@ -89,7 +89,9 @@ #include #include -#include +#if defined(JACK_INPUT) +# include +#endif /* Structure for Reading Layer II Allocation Tables from File */ @@ -169,8 +171,10 @@ typedef struct music_in_s /* Data for the wav input */ FILE* wav_input; +#if defined(JACK_INPUT) /* Data for the jack input */ jack_client_t* jack_client; +#endif const char* jack_name; } music_in_t; diff --git a/toolame.c b/toolame.c index 03d4d95..a651149 100644 --- a/toolame.c +++ b/toolame.c @@ -1,8 +1,10 @@ #include #include #include -#include -#include +#if defined(JACK_INPUT) +# include +# include +#endif #include "common.h" #include "encoder.h" #include "musicin.h" @@ -1052,10 +1054,10 @@ void parse_args (int argc, char **argv, frame_info * frame, int *psy, } if (glopts.input_select == INPUT_SELECT_JACK) { +#if defined(JACK_INPUT) musicin.jack_name = inPath; *num_samples = MAX_U_32_NUM; -#if defined(JACK_INPUT) setup_jack(header, musicin.jack_name); #else fprintf(stderr, "JACK input not compiled in\n"); -- cgit v1.2.3