diff --git a/ChangeLog b/ChangeLog index 432f51235..335079f07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,11 @@ 2006-09-08 Danny McRae + * configure.in: + fixed check for STK headers and library + + * plugins/stk/mallets/mallets.h: + removed the meaningless index boundary limiter for m_delayRead and + m_delayWrite + * configure.in: * plugins/Makefile.am: * plugins/stk/Makefile.am: diff --git a/configure.in b/configure.in index a39605346..d94226593 100644 --- a/configure.in +++ b/configure.in @@ -216,20 +216,23 @@ fi # check for STK +AC_LANG_PUSH(C++) AC_ARG_WITH(stk, - AS_HELP_STRING([--with-stk], [enable support for STK plugins]), [ with_stk=yes ], [ with_stk=no ]) + AS_HELP_STRING([--with-stk], [enable support for STK plugins]), + [ with_stk=yes ], [ with_stk=no ]) AH_TEMPLATE(HAVE_STK_H, [Define to 1 if you have the header file.]) -#if test "x$with_stk" = "xyes" ; then -# AC_CHECK_HEADER(stk/Stk.h, HAVE_STK_H="true") -# AC_CHECK_LIB([stk], [], HAVE_STK="true", HAVE_STK_H="") -#fi if test "x$with_stk" = "xyes" ; then - HAVE_STK_H="true" + AC_CHECK_HEADER([stk/Stk.h], HAVE_STK_H="true") + AC_CHECK_LIB([stk], [main], HAVE_STK="true", HAVE_STK_H="", + [-ljack -lasound]) fi if test ! -z "$HAVE_STK_H" ; then AC_DEFINE(HAVE_STK_H) + AC_SUBST(stk_includes, [/usr/include/stk]) + AC_SUBST(stk_lib, [/usr/lib]) fi AM_CONDITIONAL(STK_SUPPORT, test ! -z "$HAVE_STK_H") +AC_LANG_POP(C++) # check for vorbis-lib @@ -662,27 +665,6 @@ fi #fi - - -if test -z "$HAVE_SAMPLERATE_H" ; then - echo " ========================" - echo " === LMMS - WARNING =======================================================" - echo " ========================" - echo " =" - echo " = You don't seem to have libsamplerate installed and/or libsamplerate-" - echo " = development-package is missing. This will disable resampling with" - echo " = libsamplerate and results in worse quality! Currently LMMS will also" - echo " = crash more often, because internal sample-rate-converter has some bugs..." - echo " = Consider installing the missing packages for using the full power of LMMS." - echo " =" - with_warnings="true" -else - PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* libsamplerate for internal samplerate-conversion" -fi - - - - if test -z "$HAVE_LADSPA_H" ; then echo " ========================" echo " === LMMS - WARNING =======================================================" @@ -700,6 +682,38 @@ else fi +if test -z "$HAVE_STK_H" ; then + echo " ========================" + echo " === LMMS - WARNING =======================================================" + echo " ========================" + echo " =" + echo " = If you want support for STK based instruments, please pass" + echo " = " + echo " = --with-stk" + echo " = " + echo " = to configure, STK support is still experimental." + echo " =" + with_warnings="true" +else + PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* STK instrument plugins" +fi + + +if test -z "$HAVE_SAMPLERATE_H" ; then + echo " ========================" + echo " === LMMS - WARNING =======================================================" + echo " ========================" + echo " =" + echo " = You don't seem to have libsamplerate installed and/or libsamplerate-" + echo " = development-package is missing. This will disable resampling with" + echo " = libsamplerate and results in worse quality! Currently LMMS will also" + echo " = crash more often, because internal sample-rate-converter has some bugs..." + echo " = Consider installing the missing packages for using the full power of LMMS." + echo " =" + with_warnings="true" +else + PLUGINS_TO_BUILD="$PLUGINS_TO_BUILD\n\t\* libsamplerate for internal samplerate-conversion" +fi if test "x$with_vst" = "xno" ; then diff --git a/plugins/stk/Makefile.am b/plugins/stk/Makefile.am index c615d3acf..243a8fd79 100644 --- a/plugins/stk/Makefile.am +++ b/plugins/stk/Makefile.am @@ -1 +1 @@ -SUBDIRS = mallets \ No newline at end of file +SUBDIRS = mallets diff --git a/plugins/stk/mallets/Makefile.am b/plugins/stk/mallets/Makefile.am index 03b386a60..0fd94cd6c 100644 --- a/plugins/stk/mallets/Makefile.am +++ b/plugins/stk/mallets/Makefile.am @@ -1,7 +1,7 @@ AUTOMAKE_OPTIONS = foreign 1.4 -INCLUDES = -I/usr/include/stk -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. +INCLUDES = -I@stk_includes@ -I$(top_srcdir)/include -I$(top_srcdir)/src/lib -I. AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="malletsstk" @@ -29,6 +29,6 @@ CLEANFILES = $(MOC_FILES) ./embedded_resources.h pkglib_LTLIBRARIES= libmalletsstk.la libmalletsstk_la_SOURCES = mallets.cpp mallets.h -libmalletsstk_la_LDFLAGS = -L/usr/lib -lstk +libmalletsstk_la_LDFLAGS = -L@stk_lib@ -lstk $(libmalletsstk_la_SOURCES): ./embedded_resources.h diff --git a/plugins/stk/mallets/mallets.h b/plugins/stk/mallets/mallets.h index a9586ef92..c48730a8a 100644 --- a/plugins/stk/mallets/mallets.h +++ b/plugins/stk/mallets/mallets.h @@ -96,7 +96,6 @@ public: StkFloat s = m_voice->tick(); m_delay[m_delayWrite] = s; m_delayWrite++; - m_delayWrite %= 256; return( s ); } } @@ -105,7 +104,6 @@ public: { StkFloat s = m_delay[m_delayRead]; m_delayRead++; - m_delayRead %= 256; return( s ); }