+if HAVE_JACK
+JACK_LIB = -ljack
+else
+JACK_LIB =
+endif
bin_PROGRAMS = aserver
aserver_SOURCES = aserver.c
# aserver_LDADD = -lasound
-aserver_LDADD = ../src/libasound.la
+aserver_LDADD = ../src/libasound.la $(JACK_LIB)
all: aserver
AC_MSG_RESULT(no)
fi
+dnl Check for jack...
+AC_MSG_CHECKING(for jack)
+AC_ARG_WITH(jack,
+ [ --with-jack do you have installed Jack Audio Connection Kit (optional)],
+ [ AC_DEFINE(HAVE_JACK, "1", [enabled])
+ jack=yes ],)
+if test "$jack" = "yes" ; then
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+fi
+AM_CONDITIONAL(HAVE_JACK, test x$jack = xyes)
+
dnl Check for architecture
AC_MSG_CHECKING(for architecture)
case "$target" in
/** LADSPA integration plugin */
SND_PCM_TYPE_LADSPA,
/** Direct Mixing plugin */
- SND_PCM_TYPE_DMIX
+ SND_PCM_TYPE_DMIX,
+ /** Jack Audio Connection Kit plugin */
+ SND_PCM_TYPE_JACK,
};
/** PCM type */
snd_config_t *root, snd_config_t *conf,
snd_pcm_stream_t stream, int mode);
+/*
+ * Jack plugin
+ */
+int snd_pcm_jack_open(snd_pcm_t **pcmp, const char *name,
+ snd_pcm_stream_t stream, int mode);
+int _snd_pcm_jack_open(snd_pcm_t **pcmp, const char *name,
+ snd_config_t *root, snd_config_t *conf,
+ snd_pcm_stream_t stream, int mode);
+
+
/** \} */
#endif /* __ALSA_PCM_PLUGIN_H */
EXTRA_DIST=Versions
COMPATNUM=@LIBTOOL_VERSION_INFO@
+if HAVE_JACK
+JACK_LIB = -ljack
+else
+JACK_LIB =
+endif
+
lib_LTLIBRARIES = libasound.la
libasound_la_SOURCES = conf.c confmisc.c input.c output.c async.c error.c dlmisc.c
libasound_la_LIBADD = control/libcontrol.la mixer/libmixer.la pcm/libpcm.la \
rawmidi/librawmidi.la timer/libtimer.la \
hwdep/libhwdep.la seq/libseq.la instr/libinstr.la \
- compat/libcompat.la -lm -ldl -lpthread
+ compat/libcompat.la -lm -ldl -lpthread $(JACK_LIB)
libasound_la_LDFLAGS = -version-info $(COMPATNUM)
LDFLAGS = -Wl,--version-script=Versions
#ifndef PIC
extern void *snd_control_open_symbols(void);
#endif
- void *h;
+ void *h = NULL;
if (snd_config_get_type(ctl_conf) != SND_CONFIG_TYPE_COMPOUND) {
if (name)
SNDERR("Invalid type for CTL %s definition", name);
static int snd_pcm_plug_hw_refine_sprepare(snd_pcm_t *pcm, snd_pcm_hw_params_t *sparams)
{
snd_pcm_plug_t *plug = pcm->private_data;
- _snd_pcm_hw_params_any(sparams);
int err;
+ _snd_pcm_hw_params_any(sparams);
if (plug->sformat >= 0) {
_snd_pcm_hw_params_set_format(sparams, plug->sformat);
_snd_pcm_hw_params_set_subformat(sparams, SND_PCM_SUBFORMAT_STD);