aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--audio_read.h2
-rw-r--r--common.h6
-rw-r--r--toolame.c19
-rw-r--r--vlc_input.h2
4 files changed, 25 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 <stdio.h>
#include <stdlib.h>
-#include <jack/jack.h>
+#if defined(JACK_INPUT)
+# include <jack/jack.h>
+#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 1acde80..5d522df 100644
--- a/toolame.c
+++ b/toolame.c
@@ -1,8 +1,10 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <jack/jack.h>
-#include <jack/ringbuffer.h>
+#if defined(JACK_INPUT)
+# include <jack/jack.h>
+# include <jack/ringbuffer.h>
+#endif
#include "common.h"
#include "encoder.h"
#include "musicin.h"
@@ -737,7 +739,18 @@ void short_usage (void)
fprintf (stderr, "Toolame-DAB version %s\n (http://opendigitalradio.org)\n",
toolameversion);
fprintf (stderr, "MPEG Audio Layer II encoder for DAB\n\n");
+#if defined(JACK_INPUT) && defined(VLC_INPUT)
fprintf (stderr, "USAGE: %s [options] (<infile>|-j <jackname>|-V <libvlc url>) [output]\n\n", programName);
+#elif defined(JACK_INPUT)
+ fprintf (stderr, "USAGE: %s [options] (<infile>|-j <jackname>) [output]\n\n", programName);
+ fprintf (stderr, "VLC input not compiled in\n");
+#elif defined(VLC_INPUT)
+ fprintf (stderr, "USAGE: %s [options] (<infile>|-V <libvlc url>) [output]\n\n", programName);
+ fprintf (stderr, "JACK input not compiled in\n");
+#else
+ fprintf (stderr, "USAGE: %s [options] <infile> [output]\n\n", programName);
+ fprintf (stderr, "Neither JACK nor libVLC input compiled in\n");
+#endif
fprintf (stderr, "Try \"%s -h\" for more information.\n", programName);
exit (0);
}
@@ -1047,10 +1060,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");
diff --git a/vlc_input.h b/vlc_input.h
index f2b78c6..a2ecefa 100644
--- a/vlc_input.h
+++ b/vlc_input.h
@@ -4,6 +4,8 @@
# if defined(VLC_INPUT)
#include <stdint.h>
+#include <stddef.h>
+#include <sys/types.h>
#include <vlc/vlc.h>