[SCM] gsequencer/upstream: bugfixes to ags_channel_set_link() and related

jkraehemann-guest at users.alioth.debian.org jkraehemann-guest at users.alioth.debian.org
Sun Jun 14 16:07:01 UTC 2015


The following commit has been merged in the upstream branch:
commit 5dd9de6c44c479f6d66b54e94e10924f1cd509c9
Author: Joël Krähemann <weedlight at gmail.com>
Date:   Fri Apr 17 12:49:41 2015 +0000

    bugfixes to ags_channel_set_link() and related

diff --git a/autom4te.cache/requests b/autom4te.cache/requests
index ca34314..e8b164b 100644
--- a/autom4te.cache/requests
+++ b/autom4te.cache/requests
@@ -63,106 +63,106 @@
                         'configure.ac'
                       ],
                       {
-                        'AC_' => 1,
-                        'AM_GNU_GETTEXT' => 1,
-                        'AC_LIB_PREPARE_MULTILIB' => 1,
-                        'AC_LIB_HAVE_LINKFLAGS' => 1,
-                        'AC_LIB_FROMPACKAGE' => 1,
-                        'AM_SILENT_RULES' => 1,
-                        '_AM_PROG_TAR' => 1,
-                        'gl_SIZE_MAX' => 1,
-                        'gt_PRINTF_POSIX' => 1,
-                        'AM_CONDITIONAL' => 1,
-                        'AM_RUN_LOG' => 1,
-                        'AC_LIB_PREPARE_PREFIX' => 1,
-                        'AM_SUBST_NOTMAKE' => 1,
-                        'AM_SANITY_CHECK' => 1,
+                        'gl_VISIBILITY' => 1,
+                        'AC_LIB_ARG_WITH' => 1,
+                        'AC_LIB_RPATH' => 1,
+                        'AM_PROG_INSTALL_STRIP' => 1,
+                        'AM_GNU_GETTEXT_NEED' => 1,
+                        'gl_FCNTL_O_FLAGS' => 1,
+                        'AM_XGETTEXT_OPTION' => 1,
+                        '_AM_SUBST_NOTMAKE' => 1,
+                        'm4_include' => 1,
+                        'gt_INTL_SUBDIR_CORE' => 1,
+                        'AM_LANGINFO_CODESET' => 1,
+                        '_AM_AUTOCONF_VERSION' => 1,
                         'AC_LIB_PROG_LD_GNU' => 1,
-                        'AC_LIB_APPENDTOVAR' => 1,
-                        'AC_TYPE_LONG_LONG_INT' => 1,
-                        '_AM_SET_OPTIONS' => 1,
+                        'AM_SUBST_NOTMAKE' => 1,
+                        'AM_SILENT_RULES' => 1,
+                        'gl_THREADLIB' => 1,
+                        'PKG_CHECK_MODULES' => 1,
                         'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
-                        'AC_TYPE_UNSIGNED_LONG_LONG_INT' => 1,
-                        'm4_pattern_forbid' => 1,
-                        'gt_INTDIV0' => 1,
-                        'AM_INTL_SUBDIR' => 1,
-                        'AC_LIB_RPATH' => 1,
-                        'AC_DEFUN' => 1,
-                        'AM_AUTOMAKE_VERSION' => 1,
                         'gl_THREADLIB_EARLY' => 1,
-                        'AM_MISSING_HAS_RUN' => 1,
-                        '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
-                        'AC_LIB_PREFIX' => 1,
-                        'gl_XSIZE' => 1,
-                        '_AM_MANGLE_OPTION' => 1,
-                        'include' => 1,
-                        'gl_PREREQ_LOCK' => 1,
-                        '_AC_AM_CONFIG_HEADER_HOOK' => 1,
                         'AM_AUX_DIR_EXPAND' => 1,
-                        'AC_LIB_ARG_WITH' => 1,
-                        'AC_LIB_LINKFLAGS_BODY' => 1,
-                        'gt_TYPE_INTMAX_T' => 1,
-                        'gt_INTTYPES_PRI' => 1,
-                        'gl_DISABLE_THREADS' => 1,
+                        'AC_LIB_LINKFLAGS' => 1,
                         'AM_ICONV' => 1,
-                        '_AC_TYPE_LONG_LONG_SNIPPET' => 1,
+                        'AC_LIB_LINKFLAGS_FROM_LIBS' => 1,
                         'gt_LC_MESSAGES' => 1,
-                        'AM_LANGINFO_CODESET' => 1,
-                        'AM_SET_DEPDIR' => 1,
-                        'gl_AC_TYPE_UINTMAX_T' => 1,
-                        'AM_PROG_MKDIR_P' => 1,
+                        'AM_GNU_GETTEXT_VERSION' => 1,
+                        'AU_DEFUN' => 1,
+                        'AM_PROG_INSTALL_SH' => 1,
+                        'AC_TYPE_UNSIGNED_LONG_LONG_INT' => 1,
+                        'gl_LOCK' => 1,
+                        'gt_INTTYPES_PRI' => 1,
                         'AM_MAKE_INCLUDE' => 1,
-                        'AM_INIT_AUTOMAKE' => 1,
-                        'AM_DEP_TRACK' => 1,
-                        'gt_GLIBC2' => 1,
+                        'gl_DISABLE_THREADS' => 1,
                         'PKG_CHECK_EXISTS' => 1,
-                        'gl_VISIBILITY' => 1,
-                        '_m4_warn' => 1,
-                        'gl_FCNTL_O_FLAGS' => 1,
-                        '_PKG_SHORT_ERRORS_SUPPORTED' => 1,
-                        '_AM_IF_OPTION' => 1,
-                        'AM_ICONV_LINK' => 1,
+                        'm4_pattern_forbid' => 1,
+                        'AM_PATH_PROG_WITH_TEST' => 1,
+                        'AM_MISSING_PROG' => 1,
+                        'include' => 1,
+                        'AC_TYPE_LONG_LONG_INT' => 1,
+                        'gt_CHECK_DECL' => 1,
+                        'AM_XGETTEXT_OPTION_INIT' => 1,
+                        'gl_AC_TYPE_UINTMAX_T' => 1,
+                        '_AM_SET_OPTIONS' => 1,
                         'gl_GLIBC21' => 1,
-                        'AM_PROG_INSTALL_STRIP' => 1,
-                        'AM_PROG_INSTALL_SH' => 1,
-                        'gt_INTL_SUBDIR_CORE' => 1,
-                        'AC_COMPUTE_INT' => 1,
                         '_AM_DEPENDENCIES' => 1,
-                        'AM_ICONV_LINKFLAGS_BODY' => 1,
-                        'AM_POSTPROCESS_PO_MAKEFILE' => 1,
-                        'AC_LIB_LINKFLAGS_FROM_LIBS' => 1,
-                        'gt_INTL_MACOSX' => 1,
-                        'AC_LIB_WITH_FINAL_PREFIX' => 1,
+                        'AC_LIB_PROG_LD' => 1,
+                        'gl_SIZE_MAX' => 1,
+                        'gl_XSIZE' => 1,
+                        '_AC_AM_CONFIG_HEADER_HOOK' => 1,
+                        '_AM_IF_OPTION' => 1,
+                        'AC_LIB_PREFIX' => 1,
+                        'AM_SANITY_CHECK' => 1,
+                        'AM_CONDITIONAL' => 1,
                         'gl_THREADLIB_EARLY_BODY' => 1,
-                        'AM_XGETTEXT_OPTION' => 1,
-                        'AM_GNU_GETTEXT_NEED' => 1,
-                        'AM_GNU_GETTEXT_VERSION' => 1,
+                        'AC_LIB_PREPARE_MULTILIB' => 1,
+                        'AM_POSTPROCESS_PO_MAKEFILE' => 1,
+                        'AM_INTL_SUBDIR' => 1,
+                        'gl_THREADLIB_BODY' => 1,
+                        '_m4_warn' => 1,
+                        '_AM_SET_OPTION' => 1,
+                        'AM_AUTOMAKE_VERSION' => 1,
+                        'AM_SET_LEADING_DOT' => 1,
+                        'AC_COMPUTE_INT' => 1,
+                        'gt_TYPE_WCHAR_T' => 1,
+                        'gt_GLIBC2' => 1,
+                        'm4_pattern_allow' => 1,
+                        'AM_ICONV_LINKFLAGS_BODY' => 1,
                         'PKG_PROG_PKG_CONFIG' => 1,
+                        'AC_' => 1,
                         'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
+                        'AM_DEP_TRACK' => 1,
+                        'AC_DEFUN_ONCE' => 1,
+                        'AM_INIT_AUTOMAKE' => 1,
+                        'AC_LIB_LINKFLAGS_BODY' => 1,
                         'gl_AC_HEADER_STDINT_H' => 1,
-                        'gl_THREADLIB' => 1,
-                        'gt_TYPE_WINT_T' => 1,
-                        'gt_CHECK_DECL' => 1,
-                        'AM_SET_LEADING_DOT' => 1,
-                        'm4_pattern_allow' => 1,
+                        'gt_PRINTF_POSIX' => 1,
+                        'AM_PROG_MKDIR_P' => 1,
+                        '_AC_TYPE_LONG_LONG_SNIPPET' => 1,
+                        '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+                        'AC_LIB_FROMPACKAGE' => 1,
                         'AM_PO_SUBDIRS' => 1,
-                        '_AM_AUTOCONF_VERSION' => 1,
-                        'gl_THREADLIB_BODY' => 1,
-                        'AC_LIB_LINKFLAGS' => 1,
-                        'AM_PATH_PROG_WITH_TEST' => 1,
-                        'AM_MISSING_PROG' => 1,
+                        'gt_INTDIV0' => 1,
+                        'AM_RUN_LOG' => 1,
+                        'AM_ICONV_LINK' => 1,
+                        'AC_DEFUN' => 1,
+                        '_PKG_SHORT_ERRORS_SUPPORTED' => 1,
+                        'AM_SET_DEPDIR' => 1,
                         'AM_NLS' => 1,
-                        'AC_LIB_PROG_LD' => 1,
-                        'PKG_CHECK_MODULES' => 1,
-                        'm4_include' => 1,
-                        'gt_TYPE_WCHAR_T' => 1,
-                        '_AM_SET_OPTION' => 1,
-                        '_AM_SUBST_NOTMAKE' => 1,
-                        'gl_LOCK' => 1,
                         'gl_AC_HEADER_INTTYPES_H' => 1,
-                        'AM_XGETTEXT_OPTION_INIT' => 1,
-                        'AU_DEFUN' => 1,
-                        'AC_DEFUN_ONCE' => 1
+                        'AM_MISSING_HAS_RUN' => 1,
+                        'gl_PREREQ_LOCK' => 1,
+                        'gt_INTL_MACOSX' => 1,
+                        'AM_GNU_GETTEXT' => 1,
+                        '_AM_MANGLE_OPTION' => 1,
+                        'gt_TYPE_WINT_T' => 1,
+                        'AC_LIB_HAVE_LINKFLAGS' => 1,
+                        'AC_LIB_PREPARE_PREFIX' => 1,
+                        'AC_LIB_WITH_FINAL_PREFIX' => 1,
+                        'AC_LIB_APPENDTOVAR' => 1,
+                        'gt_TYPE_INTMAX_T' => 1,
+                        '_AM_PROG_TAR' => 1
                       }
                     ], 'Autom4te::Request' ),
              bless( [
@@ -177,65 +177,65 @@
                         'configure.ac'
                       ],
                       {
-                        'AC_CONFIG_LIBOBJ_DIR' => 1,
-                        'AC_DEFINE_TRACE_LITERAL' => 1,
-                        'AC_CONFIG_AUX_DIR' => 1,
-                        'AM_PROG_AR' => 1,
+                        'AM_GNU_GETTEXT' => 1,
+                        '_LT_AC_TAGCONFIG' => 1,
+                        'AC_LIBSOURCE' => 1,
+                        'AC_CONFIG_HEADERS' => 1,
+                        'AM_PROG_CXX_C_O' => 1,
+                        'AC_INIT' => 1,
+                        'LT_INIT' => 1,
                         'AM_CONDITIONAL' => 1,
-                        'AM_SILENT_RULES' => 1,
+                        'AM_ENABLE_MULTILIB' => 1,
+                        '_AM_MAKEFILE_INCLUDE' => 1,
+                        'AM_PROG_AR' => 1,
+                        'AM_NLS' => 1,
+                        'AC_CANONICAL_HOST' => 1,
+                        'AC_FC_PP_SRCEXT' => 1,
+                        'AM_MAKEFILE_INCLUDE' => 1,
+                        'AM_PROG_FC_C_O' => 1,
+                        'AC_CANONICAL_TARGET' => 1,
+                        'AC_CANONICAL_SYSTEM' => 1,
+                        'LT_SUPPORTED_TAG' => 1,
+                        'AC_FC_FREEFORM' => 1,
+                        'm4_pattern_forbid' => 1,
+                        'include' => 1,
                         'm4_sinclude' => 1,
+                        'AM_PROG_CC_C_O' => 1,
+                        '_AM_COND_IF' => 1,
                         'AC_CONFIG_LINKS' => 1,
-                        'AM_GNU_GETTEXT' => 1,
-                        '_m4_warn' => 1,
-                        'AM_POT_TOOLS' => 1,
-                        'AM_EXTRA_RECURSIVE_TARGETS' => 1,
-                        'AC_FC_PP_SRCEXT' => 1,
-                        'AM_MAINTAINER_MODE' => 1,
+                        'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
+                        'AM_PROG_F77_C_O' => 1,
                         '_AM_COND_ELSE' => 1,
-                        'AM_XGETTEXT_OPTION' => 1,
-                        'AC_CANONICAL_HOST' => 1,
-                        'AM_PROG_FC_C_O' => 1,
-                        'AM_PROG_CXX_C_O' => 1,
-                        'AC_CONFIG_SUBDIRS' => 1,
+                        'AM_INIT_AUTOMAKE' => 1,
+                        'AC_SUBST_TRACE' => 1,
+                        'AM_PROG_MKDIR_P' => 1,
+                        'AC_PROG_LIBTOOL' => 1,
                         'AC_FC_SRCEXT' => 1,
-                        '_AM_MAKEFILE_INCLUDE' => 1,
+                        'm4_pattern_allow' => 1,
+                        'AC_CONFIG_LIBOBJ_DIR' => 1,
+                        'AM_PATH_GUILE' => 1,
+                        'AC_SUBST' => 1,
+                        'AM_PROG_MOC' => 1,
+                        'LT_CONFIG_LTDL_DIR' => 1,
+                        'AH_OUTPUT' => 1,
+                        'AC_CONFIG_SUBDIRS' => 1,
+                        'AM_EXTRA_RECURSIVE_TARGETS' => 1,
                         '_AM_COND_ENDIF' => 1,
-                        'AC_SUBST_TRACE' => 1,
-                        '_LT_AC_TAGCONFIG' => 1,
-                        'LT_SUPPORTED_TAG' => 1,
-                        'AC_INIT' => 1,
-                        'AC_CONFIG_FILES' => 1,
-                        'm4_pattern_forbid' => 1,
                         'AC_FC_PP_DEFINE' => 1,
-                        'sinclude' => 1,
                         'AC_CANONICAL_BUILD' => 1,
-                        'AM_ENABLE_MULTILIB' => 1,
                         'AM_AUTOMAKE_VERSION' => 1,
-                        'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
+                        'AM_POT_TOOLS' => 1,
                         'AC_REQUIRE_AUX_FILE' => 1,
-                        'AM_PROG_CC_C_O' => 1,
-                        'AC_CONFIG_HEADERS' => 1,
-                        'AM_PROG_F77_C_O' => 1,
-                        'AC_CANONICAL_TARGET' => 1,
-                        'AM_PATH_GUILE' => 1,
-                        'AC_CANONICAL_SYSTEM' => 1,
-                        'LT_INIT' => 1,
-                        'm4_pattern_allow' => 1,
-                        'include' => 1,
+                        'sinclude' => 1,
+                        'AM_SILENT_RULES' => 1,
+                        'AC_CONFIG_AUX_DIR' => 1,
+                        'AC_CONFIG_FILES' => 1,
+                        'AC_DEFINE_TRACE_LITERAL' => 1,
+                        'AM_MAINTAINER_MODE' => 1,
+                        'AM_XGETTEXT_OPTION' => 1,
+                        '_AM_SUBST_NOTMAKE' => 1,
                         'm4_include' => 1,
-                        'AM_MAKEFILE_INCLUDE' => 1,
-                        'AH_OUTPUT' => 1,
-                        '_AM_COND_IF' => 1,
-                        'AM_NLS' => 1,
-                        'AM_PROG_MOC' => 1,
-                        'AC_SUBST' => 1,
-                        'LT_CONFIG_LTDL_DIR' => 1,
-                        'AC_PROG_LIBTOOL' => 1,
-                        'AC_LIBSOURCE' => 1,
-                        'AM_INIT_AUTOMAKE' => 1,
-                        'AM_PROG_MKDIR_P' => 1,
-                        'AC_FC_FREEFORM' => 1,
-                        '_AM_SUBST_NOTMAKE' => 1
+                        '_m4_warn' => 1
                       }
                     ], 'Autom4te::Request' ),
              bless( [
@@ -301,114 +301,114 @@
                         'configure.ac'
                       ],
                       {
-                        'gl_THREADLIB_EARLY_BODY' => 1,
-                        'AC_LIB_WITH_FINAL_PREFIX' => 1,
+                        'AM_SUBST_NOTMAKE' => 1,
+                        'AM_SILENT_RULES' => 1,
+                        'AC_LIB_PROG_LD_GNU' => 1,
+                        '_AM_AUTOCONF_VERSION' => 1,
+                        'AM_LANGINFO_CODESET' => 1,
+                        'gt_INTL_SUBDIR_CORE' => 1,
+                        'm4_include' => 1,
+                        '_AM_SUBST_NOTMAKE' => 1,
                         'AM_XGETTEXT_OPTION' => 1,
-                        'AC_CONFIG_MACRO_DIR_TRACE' => 1,
-                        'gt_INTL_MACOSX' => 1,
-                        'AC_LIB_LINKFLAGS_FROM_LIBS' => 1,
-                        'gl_THREADLIB' => 1,
-                        'gl_AC_HEADER_STDINT_H' => 1,
-                        'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
-                        'gt_TYPE_WINT_T' => 1,
-                        'AM_GNU_GETTEXT_VERSION' => 1,
-                        'AM_GNU_GETTEXT_NEED' => 1,
-                        'PKG_PROG_PKG_CONFIG' => 1,
-                        '_AM_IF_OPTION' => 1,
-                        '_PKG_SHORT_ERRORS_SUPPORTED' => 1,
-                        'PKG_NOARCH_INSTALLDIR' => 1,
-                        '_m4_warn' => 1,
-                        'PKG_CHECK_EXISTS' => 1,
-                        'gl_VISIBILITY' => 1,
-                        'gt_GLIBC2' => 1,
+                        'PKG_CHECK_VAR' => 1,
                         'gl_FCNTL_O_FLAGS' => 1,
-                        '_AM_DEPENDENCIES' => 1,
-                        'PKG_INSTALLDIR' => 1,
-                        'AM_POSTPROCESS_PO_MAKEFILE' => 1,
-                        'AM_ICONV_LINKFLAGS_BODY' => 1,
-                        'gl_GLIBC21' => 1,
-                        'AM_ICONV_LINK' => 1,
-                        'AC_COMPUTE_INT' => 1,
-                        'gt_INTL_SUBDIR_CORE' => 1,
-                        'gl_EXTERN_INLINE' => 1,
+                        'AM_GNU_GETTEXT_NEED' => 1,
                         'AM_PROG_INSTALL_STRIP' => 1,
+                        'AC_LIB_RPATH' => 1,
+                        'AC_LIB_ARG_WITH' => 1,
+                        'gl_VISIBILITY' => 1,
                         'AM_PROG_INSTALL_SH' => 1,
-                        'PKG_CHECK_MODULES' => 1,
-                        'AC_LIB_PROG_LD' => 1,
-                        'AM_NLS' => 1,
-                        'm4_include' => 1,
-                        '_AM_PROG_CC_C_O' => 1,
-                        'AM_MISSING_PROG' => 1,
-                        'gl_AC_HEADER_INTTYPES_H' => 1,
-                        'AM_XGETTEXT_OPTION_INIT' => 1,
-                        'AC_DEFUN_ONCE' => 1,
+                        'AM_GNU_GETTEXT_VERSION' => 1,
                         'AU_DEFUN' => 1,
-                        '_AM_SET_OPTION' => 1,
-                        '_AM_SUBST_NOTMAKE' => 1,
-                        'gt_TYPE_WCHAR_T' => 1,
-                        'gl_LOCK' => 1,
-                        '_AM_CONFIG_MACRO_DIRS' => 1,
-                        'gt_GL_ATTRIBUTE' => 1,
-                        'AM_SET_LEADING_DOT' => 1,
-                        'AC_CONFIG_MACRO_DIR' => 1,
+                        'AC_LIB_LINKFLAGS_FROM_LIBS' => 1,
+                        'AM_ICONV' => 1,
+                        'gt_LC_MESSAGES' => 1,
                         'AC_LIB_LINKFLAGS' => 1,
-                        'AM_PATH_PROG_WITH_TEST' => 1,
-                        'gl_THREADLIB_BODY' => 1,
-                        '_AM_AUTOCONF_VERSION' => 1,
-                        'AM_PO_SUBDIRS' => 1,
-                        'm4_pattern_allow' => 1,
-                        '_AM_SET_OPTIONS' => 1,
+                        'AM_AUX_DIR_EXPAND' => 1,
+                        'gl_THREADLIB_EARLY' => 1,
+                        'PKG_CHECK_MODULES' => 1,
                         'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
-                        'AC_LIB_APPENDTOVAR' => 1,
-                        'AC_LIB_PROG_LD_GNU' => 1,
+                        'gl_THREADLIB' => 1,
+                        'AM_XGETTEXT_OPTION_INIT' => 1,
+                        'include' => 1,
                         'AC_TYPE_LONG_LONG_INT' => 1,
-                        'AC_LIB_RPATH' => 1,
-                        'AM_INTL_SUBDIR' => 1,
-                        'gt_INTDIV0' => 1,
+                        'AM_MISSING_PROG' => 1,
+                        'AM_PATH_PROG_WITH_TEST' => 1,
+                        'PKG_INSTALLDIR' => 1,
                         'm4_pattern_forbid' => 1,
+                        'PKG_CHECK_EXISTS' => 1,
+                        'gl_DISABLE_THREADS' => 1,
+                        'AM_MAKE_INCLUDE' => 1,
+                        'gt_INTTYPES_PRI' => 1,
+                        'gl_LOCK' => 1,
                         'AC_TYPE_UNSIGNED_LONG_LONG_INT' => 1,
-                        'PKG_CHECK_VAR' => 1,
+                        'gl_THREADLIB_EARLY_BODY' => 1,
                         'AM_CONDITIONAL' => 1,
-                        '_AM_PROG_TAR' => 1,
-                        'gt_PRINTF_POSIX' => 1,
+                        'AM_SANITY_CHECK' => 1,
+                        'AC_LIB_PREFIX' => 1,
+                        '_AC_AM_CONFIG_HEADER_HOOK' => 1,
+                        'gl_XSIZE' => 1,
+                        '_AM_IF_OPTION' => 1,
                         'gl_SIZE_MAX' => 1,
-                        'AM_RUN_LOG' => 1,
-                        'AM_GNU_GETTEXT' => 1,
+                        'AC_LIB_PROG_LD' => 1,
+                        'gl_GLIBC21' => 1,
+                        '_AM_DEPENDENCIES' => 1,
+                        '_AM_SET_OPTIONS' => 1,
+                        'gl_AC_TYPE_UINTMAX_T' => 1,
+                        'AC_COMPUTE_INT' => 1,
+                        'AM_AUTOMAKE_VERSION' => 1,
+                        'AM_SET_LEADING_DOT' => 1,
+                        '_AM_SET_OPTION' => 1,
+                        'gl_THREADLIB_BODY' => 1,
+                        'AM_INTL_SUBDIR' => 1,
+                        '_m4_warn' => 1,
+                        'AM_POSTPROCESS_PO_MAKEFILE' => 1,
                         'AC_LIB_PREPARE_MULTILIB' => 1,
-                        'AC_' => 1,
-                        'AM_SILENT_RULES' => 1,
-                        'AC_LIB_HAVE_LINKFLAGS' => 1,
-                        'AC_LIB_FROMPACKAGE' => 1,
-                        'AM_SANITY_CHECK' => 1,
-                        'AC_LIB_PREPARE_PREFIX' => 1,
-                        'AM_SUBST_NOTMAKE' => 1,
-                        'gt_INTTYPES_PRI' => 1,
-                        'gl_DISABLE_THREADS' => 1,
-                        'AM_ICONV' => 1,
+                        'gl_EXTERN_INLINE' => 1,
+                        '_AM_CONFIG_MACRO_DIRS' => 1,
                         '_AC_TYPE_LONG_LONG_SNIPPET' => 1,
-                        'gt_TYPE_INTMAX_T' => 1,
+                        'gt_GL_ATTRIBUTE' => 1,
+                        'gt_PRINTF_POSIX' => 1,
                         'AC_LIB_LINKFLAGS_BODY' => 1,
+                        'gl_AC_HEADER_STDINT_H' => 1,
                         'AM_INIT_AUTOMAKE' => 1,
-                        'AM_MAKE_INCLUDE' => 1,
+                        'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
                         'AM_DEP_TRACK' => 1,
-                        'gl_AC_TYPE_UINTMAX_T' => 1,
-                        'AM_LANGINFO_CODESET' => 1,
-                        'gt_LC_MESSAGES' => 1,
-                        'AM_SET_DEPDIR' => 1,
+                        'AC_DEFUN_ONCE' => 1,
+                        'AC_' => 1,
+                        'PKG_PROG_PKG_CONFIG' => 1,
+                        'AM_ICONV_LINKFLAGS_BODY' => 1,
+                        'm4_pattern_allow' => 1,
+                        'gt_GLIBC2' => 1,
+                        'gt_TYPE_WCHAR_T' => 1,
+                        'AC_CONFIG_MACRO_DIR_TRACE' => 1,
+                        'AM_RUN_LOG' => 1,
+                        '_AM_PROG_CC_C_O' => 1,
+                        'gt_INTDIV0' => 1,
+                        'AM_PO_SUBDIRS' => 1,
                         '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
-                        'gl_XSIZE' => 1,
-                        'AC_LIB_PREFIX' => 1,
-                        'AM_AUTOMAKE_VERSION' => 1,
-                        'gl_THREADLIB_EARLY' => 1,
-                        'AC_DEFUN' => 1,
-                        'AM_MISSING_HAS_RUN' => 1,
-                        'AM_AUX_DIR_EXPAND' => 1,
-                        'AC_LIB_ARG_WITH' => 1,
+                        'AC_LIB_FROMPACKAGE' => 1,
                         'AM_PROG_CC_C_O' => 1,
-                        'gl_PREREQ_LOCK' => 1,
-                        'include' => 1,
+                        'AC_LIB_PREPARE_PREFIX' => 1,
+                        'AC_LIB_HAVE_LINKFLAGS' => 1,
+                        'gt_TYPE_WINT_T' => 1,
+                        'AC_LIB_WITH_FINAL_PREFIX' => 1,
+                        '_AM_PROG_TAR' => 1,
+                        'AC_LIB_APPENDTOVAR' => 1,
+                        'gt_TYPE_INTMAX_T' => 1,
+                        'AC_CONFIG_MACRO_DIR' => 1,
                         '_AM_MANGLE_OPTION' => 1,
-                        '_AC_AM_CONFIG_HEADER_HOOK' => 1
+                        'AM_GNU_GETTEXT' => 1,
+                        'gt_INTL_MACOSX' => 1,
+                        'gl_PREREQ_LOCK' => 1,
+                        'PKG_NOARCH_INSTALLDIR' => 1,
+                        'AM_MISSING_HAS_RUN' => 1,
+                        'AM_NLS' => 1,
+                        'gl_AC_HEADER_INTTYPES_H' => 1,
+                        '_PKG_SHORT_ERRORS_SUPPORTED' => 1,
+                        'AM_SET_DEPDIR' => 1,
+                        'AC_DEFUN' => 1,
+                        'AM_ICONV_LINK' => 1
                       }
                     ], 'Autom4te::Request' )
            );
diff --git a/config.log b/config.log
index 6a67528..362f90e 100644
--- a/config.log
+++ b/config.log
@@ -10,7 +10,7 @@ generated by GNU Autoconf 2.69.  Invocation command line was
 ## Platform. ##
 ## --------- ##
 
-hostname = Device-03036C
+hostname = localhost
 uname -m = x86_64
 uname -r = 3.14.25-rt22
 uname -s = Linux
@@ -1205,7 +1205,7 @@ configure:8169: result: yes
 configure:8169: checking for pthread.h
 configure:8169: result: yes
 configure:8207: gcc -o conftest -g -O2   conftest.c -lrt -lm -ldl   >&5
-/usr/bin/ld: /tmp/ccZqE2Lq.o: undefined reference to symbol 'pthread_mutexattr_init@@GLIBC_2.2.5'
+/usr/bin/ld: /tmp/ccWrIvtF.o: undefined reference to symbol 'pthread_mutexattr_init@@GLIBC_2.2.5'
 /lib64/libpthread.so.0: error adding symbols: DSO missing from command line
 collect2: error: ld returned 1 exit status
 configure:8207: $? = 1
@@ -2928,7 +2928,7 @@ generated by GNU Autoconf 2.69.  Invocation command line was
   CONFIG_COMMANDS = 
   $ ./config.status 
 
-on Device-03036C
+on localhost
 
 config.status:1089: creating Makefile
 config.status:1089: creating config.h
@@ -2949,7 +2949,7 @@ generated by GNU Autoconf 2.69.  Invocation command line was
   CONFIG_COMMANDS = 
   $ ./config.status config.h
 
-on Device-03036C
+on localhost
 
 config.status:1089: creating config.h
 config.status:1270: config.h is unchanged
diff --git a/src/ags/audio/ags_channel.c b/src/ags/audio/ags_channel.c
index 35f619a..f56313a 100644
--- a/src/ags/audio/ags_channel.c
+++ b/src/ags/audio/ags_channel.c
@@ -943,7 +943,9 @@ ags_channel_add_recall(AgsChannel *channel, GObject *recall, gboolean play)
  * @link: an other #AgsChannel to link with
  * @error: you may retrieve a AGS_CHANNEL_ERROR_LOOP_IN_LINK error
  *
- * Change the linking of #AgsChannel objects.
+ * Change the linking of #AgsChannel objects. Sets link, calls ags_channel_set_recycling()
+ * and ags_channel_recursive_reset_recall_ids(). Further it does loop detection and makes
+ * your machine running. Thus it adds #AgsRecallID.
  *
  * Since: 0.3
  */
@@ -986,31 +988,28 @@ ags_channel_set_link(AgsChannel *channel, AgsChannel *link,
     AgsAudio *audio, *current_audio;
     AgsChannel *current_channel;
 
-    audio = AGS_AUDIO(channel->audio);
-
     if(AGS_IS_OUTPUT(channel)){
-      current_channel = channel->link;
+      audio = AGS_AUDIO(link->audio);
+      current_channel = link;
     }else{
-      if((AGS_AUDIO_ASYNC & (audio->flags)) != 0){
-	current_channel = ags_channel_nth(audio->output, link->audio_channel);
+      audio = AGS_AUDIO(channel->audio);
+      current_channel = channel;
+    }
 
-	if(current_channel != NULL){
-	  current_channel = current_channel->link;
-	}
-      }else{
-	current_channel = ags_channel_nth(audio->output, link->line);
+    if((AGS_AUDIO_ASYNC & (audio->flags)) != 0){
+      current_channel = ags_channel_nth(audio->output, link->audio_channel);
+    }else{
+      current_channel = ags_channel_nth(audio->output, link->line);
+    }
 
-      	if(current_channel != NULL){
-	  current_channel = current_channel->link;
-	}
-      }
+    if(current_channel != NULL){
+      current_channel = current_channel->link;
     }
 
     if(current_channel != NULL){
       current_audio = AGS_AUDIO(current_channel->audio);
 
-      //TODO:JK: buggy
-      while(FALSE){
+      while(current_channel != NULL){
 	if(current_audio == audio){
 	  if(error != NULL){
 	    g_set_error(error,
@@ -1024,23 +1023,18 @@ ags_channel_set_link(AgsChannel *channel, AgsChannel *link,
 	  return;
 	}
 
-	if(current_channel->link == NULL)
-	  break;
-
-	current_audio = AGS_AUDIO(current_channel->link->audio);
-
 	if((AGS_AUDIO_ASYNC & (current_audio->flags)) != 0){
-	  current_channel = ags_channel_nth(current_audio->output, current_channel->audio_channel)->link;
-
-	  if(current_channel != NULL){
-	    current_channel = current_channel->link;
-	  }	  
+	  current_channel = ags_channel_nth(current_audio->output, current_channel->audio_channel);
 	}else{
-	  current_channel = ags_channel_nth(current_audio->output, current_channel->line)->link;
+	  current_channel = ags_channel_nth(current_audio->output, current_channel->line);
+	}
 
-	  if(current_channel != NULL){
-	    current_channel = current_channel->link;
-	  }
+	if(current_channel != NULL){
+	  current_channel = current_channel->link;
+	}	  
+
+	if(current_channel != NULL){
+	  current_audio = AGS_AUDIO(current_channel->audio);
 	}
       }
     }
@@ -1055,13 +1049,8 @@ ags_channel_set_link(AgsChannel *channel, AgsChannel *link,
 			 NULL,
 			 &this_error);
   }
-  
-  /* set link */
-  if(channel != NULL){
-    channel->link = link;
-  }  
 
-  /* only as expected */
+  /* set old input/output to NULL */
   if(old_channel_link != NULL &&
      link != NULL){
     this_error = NULL;
@@ -1071,33 +1060,60 @@ ags_channel_set_link(AgsChannel *channel, AgsChannel *link,
 			 &this_error);
   }
 
+  /* set link */
+  if(channel != NULL){
+    channel->link = link;
+  }  
+
   if(link != NULL){
     link->link = channel;
   }
 
   /* set recycling */
-  if(channel != NULL &&
-     AGS_IS_OUTPUT(channel)){
-    first_recycling = channel->first_recycling;
-    last_recycling = channel->last_recycling;
-    
-    ags_channel_set_recycling(link,
-			      first_recycling, last_recycling,
-			      TRUE, TRUE);
-  }else{
-    if(link != NULL){
-      first_recycling = link->first_recycling;
-      last_recycling = link->last_recycling;
+  if(channel != NULL){    
+    if(AGS_IS_OUTPUT(channel)){
+      first_recycling = channel->first_recycling;
+      last_recycling = channel->last_recycling;
+
+      ags_channel_set_recycling(link,
+				first_recycling, last_recycling,
+				TRUE, TRUE);
     }else{
-      first_recycling = NULL;
-      last_recycling = NULL;
+      if(link != NULL){
+	first_recycling = link->first_recycling;
+	last_recycling = link->last_recycling;
+
+	ags_channel_set_recycling(channel,
+				  first_recycling, last_recycling,
+				  TRUE, TRUE);
+      }else{
+	if((AGS_AUDIO_INPUT_HAS_RECYCLING & (AGS_AUDIO(channel->audio)->flags))){
+	  first_recycling = g_object_new(AGS_TYPE_RECYCLING,
+					 "channel\0", channel,
+					 "devout\0", AGS_AUDIO(channel->audio)->devout,
+					 NULL);
+	  last_recycling = first_recycling;
+
+	  ags_channel_set_recycling(channel,
+				    first_recycling, last_recycling,
+				    TRUE, TRUE);
+	}
+      }
     }
+  }else{
+    if(AGS_IS_INPUT(link)){
+      first_recycling = g_object_new(AGS_TYPE_RECYCLING,
+				     "channel\0", link,
+				     "devout\0", AGS_AUDIO(link->audio)->devout,
+				     NULL);
+      last_recycling = first_recycling;
 
-    ags_channel_set_recycling(channel,
-			      first_recycling, last_recycling,
-			      TRUE, TRUE);
+      ags_channel_set_recycling(link,
+				first_recycling, last_recycling,
+				TRUE, TRUE);
+    }
   }
-
+  
   /* reset recall id */
   ags_channel_recursive_reset_recall_ids(channel, link,
 					 old_channel_link, old_link_link);
@@ -1125,22 +1141,51 @@ ags_channel_set_recycling(AgsChannel *channel,
   AgsRecycling *old_first_recycling, *old_last_recycling;
   AgsRecycling *replace_with_first_recycling, *replace_with_last_recycling;
   AgsRecycling *changed_old_first_recycling, *changed_old_last_recycling;
-  AgsChannel *prev_channel, *next_channel;
+  AgsChannel *prev_channel, *next_channel, *current;
   AgsRecycling *nth_recycling, *next_recycling, *stop_recycling;
   AgsRecycling *parent;
   AgsRecyclingContainer *recycling_container, *old_recycling_container;
+  
   GList *recall_id;
+  
   gboolean replace_first, replace_last;
   gboolean find_prev, find_next;
   gboolean change_old_last, change_old_first;
 
+  auto AgsChannel* ags_channel_find_prev_recycling(AgsChannel *channel);
+  auto AgsChannel* ags_channel_find_next_recycling(AgsChannel *channel);
+  
   auto gboolean ags_channel_set_recycling_recursive_input(AgsChannel *input);
   auto void ags_channel_set_recycling_recursive_output(AgsChannel *output);
   auto void ags_channel_set_recycling_recursive(AgsChannel *input);
+
   auto void ags_channel_set_recycling_emit_changed_input(AgsChannel *input);
   auto void ags_channel_set_recycling_emit_changed_output(AgsChannel *output);
+
   auto gboolean ags_channel_set_recycling_emit_changed(AgsChannel *input);
 
+  AgsChannel* ags_channel_find_prev_recycling(AgsChannel *channel){
+    channel = channel->prev_pad;
+    
+    while(channel != NULL &&
+	  channel->last_recycling == NULL){
+      channel = channel->prev_pad;
+    }
+
+    return(channel);
+  }
+  
+  AgsChannel* ags_channel_find_next_recycling(AgsChannel *channel){
+    channel = channel->next_pad;
+    
+    while(channel != NULL &&
+	  channel->first_recycling == NULL){
+      channel = channel->next_pad;
+    }
+
+    return(channel);
+  }
+ 
   gboolean ags_channel_set_recycling_recursive_input(AgsChannel *input){
     AgsChannel *nth_channel_prev, *nth_channel_next;
 
@@ -1157,13 +1202,8 @@ ags_channel_set_recycling(AgsChannel *channel,
     if((AGS_AUDIO_ASYNC & (AGS_AUDIO(input->audio)->flags)) != 0){
       /* search for neighboor recyclings */
       if(find_prev){
-	nth_channel_prev = input->prev_pad;
-
-	while(nth_channel_prev != NULL &&
-	      nth_channel_prev->last_recycling == NULL){
-	  nth_channel_prev = nth_channel_prev->prev_pad;
-	}
-
+	nth_channel_prev = ags_channel_find_prev_recycling(input);
+	
 	if(nth_channel_prev != NULL){
 	  if(replace_first){
 	    found_prev = audio;
@@ -1175,12 +1215,7 @@ ags_channel_set_recycling(AgsChannel *channel,
       }
 
       if(find_next){
-	nth_channel_next = input->next_pad;
-
-	while(nth_channel_next != NULL &&
-	      nth_channel_next->first_recycling == NULL){
-	  nth_channel_next = nth_channel_next->next_pad;
-	}
+	nth_channel_next = ags_channel_find_next_recycling(input);
 
 	if(nth_channel_next != NULL){
 	  if(replace_last){
@@ -1210,12 +1245,14 @@ ags_channel_set_recycling(AgsChannel *channel,
       if(first_recycling == NULL){
 	/* reset to NULL */
 	replace_with_first_recycling = nth_channel_next->first_recycling;
-      }else
+      }else{
 	find_next = FALSE;
+      }
     }
 
     return(FALSE);
   }
+  
   void ags_channel_set_recycling_recursive_output(AgsChannel *output){
     /* update input AgsRecallIDs */
     //TODO:JK: check for compliance
@@ -1223,43 +1260,45 @@ ags_channel_set_recycling(AgsChannel *channel,
     //				  output->first_recycling,
     //				  replace_with_first_recycling, replace_with_last_recycling);
 
-    if(replace_first)
+    if(replace_first){
       output->first_recycling = replace_with_first_recycling;
-
-    if(replace_last)
+    }
+    
+    if(replace_last){
       output->last_recycling = replace_with_last_recycling;
-
-    if(output->link != NULL)
+    }
+    
+    if(output->link != NULL){
       ags_channel_set_recycling_recursive(output->link);
+    }
   }
+
   void ags_channel_set_recycling_recursive(AgsChannel *input){
     AgsAudio *audio;
     AgsChannel *output;
-
+    gboolean completed;
+    
     audio = AGS_AUDIO(input->audio);
 
     /* AgsInput */
-    if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
-      gboolean abort;
-      
-      abort = ags_channel_set_recycling_recursive_input(input);
-      
-      if(abort){
-	return;
-      }
-    }else
-      return;
+    completed = ags_channel_set_recycling_recursive_input(input);
 
+    if(completed){
+      return;
+    }
+    
     /* AgsOutput */
     if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) == 0){
-      if((AGS_AUDIO_ASYNC & (audio->flags)) != 0)
+      if((AGS_AUDIO_ASYNC & (audio->flags)) != 0){
 	output = ags_channel_nth(audio->output, input->audio_channel);
-      else
+      }else{
 	output = ags_channel_nth(audio->output, input->line);
-
+      }
+      
       ags_channel_set_recycling_recursive_output(output);
     }
   }
+  
   void ags_channel_set_recycling_emit_changed_input(AgsChannel *input){
     AgsChannel *nth_channel;
     AgsAudio *audio;
@@ -1300,6 +1339,7 @@ ags_channel_set_recycling(AgsChannel *channel,
       changed_old_last_recycling = nth_channel->last_recycling;
     }
   }
+
   void ags_channel_set_recycling_emit_changed_output(AgsChannel *output){
     ags_channel_recycling_changed(output,
 				  changed_old_first_recycling, changed_old_last_recycling,
@@ -1307,12 +1347,15 @@ ags_channel_set_recycling(AgsChannel *channel,
 				  old_first_recycling, old_last_recycling,
 				  first_recycling, last_recycling);
 
-    if(output->link != NULL)
-      if(ags_channel_set_recycling_emit_changed(output->link))
+    if(output->link != NULL){
+      if(ags_channel_set_recycling_emit_changed(output->link)){
 	parent = output->first_recycling;
-      else
+      }else{
 	parent = output->first_recycling;
+      }
+    }
   }
+
   gboolean ags_channel_set_recycling_emit_changed(AgsChannel *input){
     AgsAudio *audio;
     AgsChannel *output;
@@ -1320,21 +1363,17 @@ ags_channel_set_recycling(AgsChannel *channel,
     audio = AGS_AUDIO(input->audio);
 
     /* AgsInput */
-    if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0)
-      ags_channel_set_recycling_emit_changed_input(input);
-    else
-      return(TRUE);
-
+    ags_channel_set_recycling_emit_changed_input(input);
+    
     if((AGS_AUDIO_ASYNC & (audio->flags)) != 0){
       output = ags_channel_nth(audio->output, input->audio_channel);
     }else{
       output = ags_channel_nth(audio->output, input->line);
     }
       
-    if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) == 0)
+    if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) == 0){
       ags_channel_set_recycling_emit_changed_output(output);
-    else
-      parent = output->first_recycling;
+    }
 
     return(FALSE);
   }
@@ -1346,18 +1385,23 @@ ags_channel_set_recycling(AgsChannel *channel,
 
   audio = AGS_AUDIO(channel->audio);
 
-  if(first_recycling == NULL && last_recycling != NULL)
+  /* fix first or last recycling if needed */
+  if(first_recycling == NULL && last_recycling != NULL){
     first_recycling = last_recycling;
+  }
 
-  if(last_recycling == NULL && first_recycling != NULL)
+  if(last_recycling == NULL && first_recycling != NULL){
     last_recycling = first_recycling;
+  }
 
+  /* set old recycling */
   old_first_recycling = channel->first_recycling;
   old_last_recycling = channel->last_recycling;
 
   if(!update && old_first_recycling == first_recycling && old_last_recycling == last_recycling)
     return;
 
+  /* initialising */
   found_prev = NULL;
   found_next = NULL;
 
@@ -1383,8 +1427,9 @@ ags_channel_set_recycling(AgsChannel *channel,
 
   if((old_first_recycling == first_recycling)){
     if(!update){
-      if(old_last_recycling == last_recycling)
+      if(old_last_recycling == last_recycling){
 	return;
+      }
 
       replace_first = FALSE;
     }
@@ -1435,16 +1480,18 @@ ags_channel_set_recycling(AgsChannel *channel,
     gboolean link_next, link_prev;
 
     if(prev_channel != NULL &&
-       prev_channel->last_recycling != NULL)
+       prev_channel->last_recycling != NULL){
       link_next = TRUE;
-    else
+    }else{
       link_next = FALSE;
-
+    }
+    
     if(next_channel != NULL &&
-       next_channel->first_recycling != NULL)
+       next_channel->first_recycling != NULL){
       link_prev = TRUE;
-    else
+    }else{
       link_prev = FALSE;
+    }
     
     if(link_next){
       if(link_prev){
@@ -1471,23 +1518,52 @@ ags_channel_set_recycling(AgsChannel *channel,
     }
   }
   
-  /* set parent */
   if(first_recycling != NULL){
-    if(AGS_IS_INPUT(channel)){
-      AgsChannel *output;
+    AgsAudio *audio;
 
-      ags_channel_set_recycling_emit_changed_input(channel);
+    /* find parent */
+    parent = NULL;
+    
+    current = channel->link;
+    
+    if(AGS_IS_OUTPUT(channel)){
+      audio = current->audio;
+      
+      if((AGS_AUDIO_ASYNC & (audio->flags)) != 0){
+	current = ags_channel_nth(audio->output,
+				  current->audio_channel);
+      }else{
+	current = ags_channel_nth(audio->output,
+				  current->line);	
+      }
+
+      if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){
+	parent = current->first_recycling;
+      }
 
-      output = ags_channel_nth(audio->output, (((AGS_AUDIO_ASYNC & (audio->flags)) == 0) ? channel->line: channel->audio_channel));
+      current = current->link;
+    }
     
-      if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) == 0)
-	ags_channel_set_recycling_emit_changed_output(output);
-      else
-	parent = output->first_recycling;
-    }else{
-      ags_channel_set_recycling_emit_changed_output(channel);
+    while(current != NULL &&
+	  parent == NULL){
+      audio = current->audio;
+      
+      if((AGS_AUDIO_ASYNC & (audio->flags)) != 0){
+	current = ags_channel_nth(audio->output,
+				  current->audio_channel);
+      }else{
+	current = ags_channel_nth(audio->output,
+				  current->line);	
+      }
+
+      if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){
+	parent = current->first_recycling;
+      }
+      
+      current = current->link;      
     }
-  
+    
+    /* set parent */
     if(update){
       nth_recycling = first_recycling;
       stop_recycling = last_recycling->next;
@@ -1507,13 +1583,11 @@ ags_channel_set_recycling(AgsChannel *channel,
       nth_recycling = nth_recycling->next;
     }
   }
-
+  
   /* update recycling container */
   recall_id = audio->recall_id;
     
   while(recall_id != NULL){
-    guint length;
-
     if(AGS_IS_OUTPUT(channel)){
       if(AGS_RECALL_ID(recall_id->data)->recycling != NULL &&
 	 AGS_IS_INPUT(AGS_RECYCLING(AGS_RECALL_ID(recall_id->data)->recycling)->channel)){
@@ -1523,8 +1597,6 @@ ags_channel_set_recycling(AgsChannel *channel,
       }
 
       old_recycling_container = (AgsRecyclingContainer *) AGS_RECALL_ID(recall_id->data)->recycling_container;
-      length = recycling_container->length;
-
     }else{
       if(AGS_RECALL_ID(recall_id->data)->recycling != NULL &&
 	 AGS_IS_OUTPUT(AGS_RECYCLING(AGS_RECALL_ID(recall_id->data)->recycling)->channel)){
@@ -1535,11 +1607,11 @@ ags_channel_set_recycling(AgsChannel *channel,
     }
 
     old_recycling_container = (AgsRecyclingContainer *) AGS_RECALL_ID(recall_id->data)->recycling_container;
-    length = recycling_container->length;
         
     recycling_container = ags_recycling_container_reset_recycling(old_recycling_container,
 								  old_first_recycling, old_last_recycling,
 								  first_recycling, last_recycling);
+
     g_object_set(recall_id->data,
 		 "recycling-container\0", recycling_container,
 		 NULL);
@@ -1555,6 +1627,21 @@ ags_channel_set_recycling(AgsChannel *channel,
     
     recall_id = recall_id->next;
   }
+    
+  /* emit changed */
+  if(AGS_IS_INPUT(channel)){
+    AgsChannel *output;
+
+    ags_channel_set_recycling_emit_changed_input(channel);
+
+    output = ags_channel_nth(audio->output, (((AGS_AUDIO_ASYNC & (audio->flags)) == 0) ? channel->line: channel->audio_channel));
+    
+    if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) == 0){
+      ags_channel_set_recycling_emit_changed_output(output);
+    }
+  }else{
+    ags_channel_set_recycling_emit_changed_output(channel);
+  }
 }
 
 /**
@@ -1865,6 +1952,10 @@ ags_channel_play(AgsChannel *channel,
   AgsRecall *recall;
   GList *list, *list_next;
 
+  if(recall_id == NULL || recall_id->recycling_container == NULL){
+    return;
+  }
+  
   if(recall_id->recycling_container->parent != NULL){
     list = channel->recall;
   }else{
@@ -2367,7 +2458,7 @@ ags_channel_recursive_play(AgsChannel *channel,
 
     audio = AGS_AUDIO(output->audio);
 
-    if(audio->input == NULL){
+    if(audio->input == NULL || default_recall_id == NULL){
       return;
     }
 
@@ -2435,7 +2526,7 @@ ags_channel_recursive_play(AgsChannel *channel,
     AgsRecallID *audio_recall_id, *default_recall_id;
     GList *list;
 
-    if(output == NULL){
+    if(output == NULL || recall_id == NULL){
       return;
     }
 
@@ -4920,6 +5011,13 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
   auto void ags_channel_tillrecycling_unset_recall_id_up(AgsChannel *channel,
 							 GList *invalid_recall_id_list);
 
+  auto void ags_channel_recursive_set_recall_id_down_input(AgsChannel *output,
+							   GList *invalid_recall_id_list);
+  auto void ags_channel_recursive_set_recall_id_down(AgsChannel *current,
+						     GList *invalid_recall_id_list);
+  auto void ags_channel_tillrecycling_set_recall_id_up(AgsChannel *channel,
+						       GList *invalid_recall_id_list);
+
   auto void ags_channel_recursive_duplicate_recall_down_input(AgsChannel *output,
 							      GList *recall_id_list);
   auto void ags_channel_recursive_duplicate_recall_down(AgsChannel *channel,
@@ -5074,6 +5172,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
       }
     }
   }
+
   void ags_channel_reset_recall_id(AgsChannel *channel,
 				   GList *recall_id_list, GList *devout_play_list,
 				   GList *invalid_recall_id_list){
@@ -5203,6 +5302,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
       recall_id_list = recall_id_list->next;
     }
   }
+
   void ags_channel_recursive_reset_channel_duplicate_recall(AgsChannel *channel,
 							    GList *recall_id_list){
     AgsRecallID *recall_id;
@@ -5232,6 +5332,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
       recall_id_list = recall_id_list->next;
     }
   }
+
   void ags_channel_recursive_reset_channel_resolve_recall(AgsChannel *channel,
 							  GList *recall_id_list){
     AgsRecallID *recall_id;
@@ -5261,6 +5362,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
       recall_id_list = recall_id_list->next;
     } 
   }
+
   void ags_channel_recursive_reset_channel_init_recall(AgsChannel *channel,
 						       GList *recall_id_list){
     AgsAudio *audio;
@@ -5276,6 +5378,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
       recall_id_list = recall_id_list->next;
     } 
   }
+
   GList* ags_channel_tillrecycling_collect_devout_play_down_input(AgsChannel *output,
 								  GList *list, gboolean collect_recall_id){
     AgsAudio *audio;
@@ -5377,6 +5480,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 
     return(list);
   }
+
   GList* ags_channel_tillrecycling_collect_devout_play_down(AgsChannel *current,
 							    GList *list, gboolean collect_recall_id){
     AgsAudio *audio;
@@ -5402,7 +5506,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
       if((AGS_DEVOUT_PLAY_SEQUENCER & (AGS_DEVOUT_PLAY(current->devout_play)->flags)) != 0 &&
 	 AGS_DEVOUT_PLAY(current->devout_play)->recall_id[1] != NULL){
 #ifdef AGS_DEBUG
-	g_message("recall id collect: sequencer - a\0");
+	g_message("recall id collect: sequencer\0");
 #endif
 
 	list = g_list_prepend(list,
@@ -5429,6 +5533,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 
     return(list);
   }
+
   GList* ags_channel_recursive_collect_devout_play_up(AgsChannel *channel,
 						      gboolean collect_recall_id){
     AgsAudio *audio;
@@ -5484,7 +5589,8 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 	}
       }
 
-      if(audio->output == NULL){
+      if(audio->output == NULL ||
+	 (AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){
 	break;
       }
       
@@ -5535,6 +5641,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 
     return(list);
   }
+
   void ags_channel_recursive_reset_recall_id_down_input(AgsChannel *output,
 							GList *recall_id_list, GList *devout_play_list,
 							GList *invalid_recall_id_list)
@@ -5552,9 +5659,9 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
       while(current != NULL){
 	/* reset AgsInput */
 	ags_channel_reset_recall_id(current,
-				   recall_id_list, devout_play_list,
-				   invalid_recall_id_list);
-
+				    recall_id_list, devout_play_list,
+				    invalid_recall_id_list);
+	
 	/* retrieve next recall id list */
 	if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
 	  next_recall_id_list = recall_id_list;
@@ -5563,8 +5670,12 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 	  next_recall_id_list = NULL;
 
 	  while(recall_id_list != NULL){
-	    next_recall_id_list = g_list_concat(next_recall_id_list,
-						ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list)->recycling_container));
+	    if(next_recall_id_list == NULL){
+	      next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
+	    }else{
+	      next_recall_id_list = g_list_concat(next_recall_id_list,
+						  ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
+	    }
 
 	    recall_id_list = recall_id_list->next;
 	  }
@@ -5572,8 +5683,12 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 	  next_invalid_recall_id_list = NULL;
 
 	  while(invalid_recall_id_list != NULL){
-	    next_invalid_recall_id_list = g_list_concat(next_invalid_recall_id_list,
-							ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list)->recycling_container));
+	    if(next_invalid_recall_id_list == NULL){
+	      next_invalid_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container);
+	    }else{
+	      next_invalid_recall_id_list = g_list_concat(next_invalid_recall_id_list,
+							  ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container));
+	    }
 
 	    invalid_recall_id_list = invalid_recall_id_list->next;
 	  }
@@ -5609,8 +5724,12 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 	next_recall_id_list = NULL;
 
 	while(recall_id_list != NULL){
-	  next_recall_id_list = g_list_concat(next_recall_id_list,
-					      ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list)->recycling_container));
+	  if(next_recall_id_list == NULL){
+	    next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
+	  }else{
+	    next_recall_id_list = g_list_concat(next_recall_id_list,
+						ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
+	  }
 
 	  recall_id_list = recall_id_list->next;
 	}
@@ -5618,8 +5737,12 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 	next_invalid_recall_id_list = NULL;
 
 	while(invalid_recall_id_list != NULL){
-	  next_invalid_recall_id_list = g_list_concat(next_invalid_recall_id_list,
-						      ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list)->recycling_container));
+	  if(next_invalid_recall_id_list == NULL){
+	    next_invalid_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container);
+	  }else{
+	    next_invalid_recall_id_list = g_list_concat(next_invalid_recall_id_list,
+							ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container));
+	  }
 
 	  invalid_recall_id_list = invalid_recall_id_list->next;
 	}
@@ -5627,8 +5750,8 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 
       /* follow the links */
       ags_channel_recursive_reset_recall_id_down(current->link,
-						recall_id_list, devout_play_list,
-						next_invalid_recall_id_list);
+						 recall_id_list, devout_play_list,
+						 next_invalid_recall_id_list);
 
       /* free allocated lists */
       if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
@@ -5637,6 +5760,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
       }
     }
   }
+
   void ags_channel_recursive_reset_recall_id_down(AgsChannel *current,
 						  GList *recall_id_list, GList *devout_play_list,
 						  GList *invalid_recall_id_list)
@@ -5656,15 +5780,19 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 				invalid_recall_id_list);
 
     /* retrieve next recall id list */
-    if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) != 0){
+    if((AGS_AUDIO_OUTPUT_HAS_RECYCLING & (audio->flags)) == 0){
       next_recall_id_list = recall_id_list;
       next_invalid_recall_id_list = invalid_recall_id_list;
     }else{
       next_recall_id_list = NULL;
 
       while(recall_id_list != NULL){
-	next_recall_id_list = g_list_concat(next_recall_id_list,
-					    ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list)->recycling_container));
+	if(next_recall_id_list == NULL){
+	  next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
+	}else{
+	  next_recall_id_list = g_list_concat(next_recall_id_list,
+					      ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
+	}
 
 	recall_id_list = recall_id_list->next;
       }
@@ -5672,8 +5800,12 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
       next_invalid_recall_id_list = NULL;
 
       while(invalid_recall_id_list != NULL){
-	next_invalid_recall_id_list = g_list_concat(next_invalid_recall_id_list,
-						    ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list)->recycling_container));
+	if(next_invalid_recall_id_list == NULL){
+	  next_invalid_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container);
+	}else{
+	  next_invalid_recall_id_list = g_list_concat(next_invalid_recall_id_list,
+						      ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container));
+	}
 
 	invalid_recall_id_list = invalid_recall_id_list->next;
       }
@@ -5707,6 +5839,7 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
       g_list_free(next_invalid_recall_id_list);
     }
   }
+
   void ags_channel_tillrecycling_reset_recall_id_up(AgsChannel *channel,
 						    GList *recall_id_list, GList *devout_play_list,
 						    GList *invalid_recall_id_list)
@@ -5795,8 +5928,12 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 	  next_invalid_recall_id_list = NULL;
 
 	  while(invalid_recall_id_list != NULL){
-	    next_invalid_recall_id_list = g_list_concat(next_invalid_recall_id_list,
-							ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list)->recycling_container));
+	    if(next_invalid_recall_id_list == NULL){
+	      next_invalid_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container);
+	    }else{
+	      next_invalid_recall_id_list = g_list_concat(next_invalid_recall_id_list,
+							  ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container));
+	    }
 
 	    invalid_recall_id_list = invalid_recall_id_list->next;
 	  }
@@ -5829,8 +5966,12 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 	next_invalid_recall_id_list = NULL;
 
 	while(invalid_recall_id_list != NULL){
-	  next_invalid_recall_id_list = g_list_concat(next_invalid_recall_id_list,
-						      ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list)->recycling_container));
+	  if(next_invalid_recall_id_list != NULL){
+	    next_invalid_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container);
+	  }else{
+	    next_invalid_recall_id_list = g_list_concat(next_invalid_recall_id_list,
+							ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container));
+	  }
 
 	  invalid_recall_id_list = invalid_recall_id_list->next;
 	}
@@ -5869,8 +6010,12 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
       next_invalid_recall_id_list = NULL;
 
       while(invalid_recall_id_list != NULL){
-	next_invalid_recall_id_list = g_list_concat(next_invalid_recall_id_list,
-						    ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list)->recycling_container));
+	if(next_invalid_recall_id_list){
+	  next_invalid_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container);
+	}else{
+	  next_invalid_recall_id_list = g_list_concat(next_invalid_recall_id_list,
+						      ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(invalid_recall_id_list->data)->recycling_container));
+	}
 
 	invalid_recall_id_list = invalid_recall_id_list->next;
       }
@@ -5967,6 +6112,24 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
     }
   }
 
+  void ags_channel_recursive_set_recall_id_down_input(AgsChannel *output,
+						      GList *invalid_recall_id_list)
+  {
+    //TODO:JK: implement me
+  }
+  
+  void ags_channel_recursive_set_recall_id_down(AgsChannel *current,
+						GList *invalid_recall_id_list)
+  {
+    //TODO:JK: implement me
+  }
+  
+  void ags_channel_tillrecycling_set_recall_id_up(AgsChannel *channel,
+						  GList *invalid_recall_id_list)
+  {
+    //TODO:JK: implement me
+  }
+
   void ags_channel_recursive_duplicate_recall_down_input(AgsChannel *output,
 							 GList *recall_id_list){
 
@@ -5993,16 +6156,22 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 	    next_recall_id_list = NULL;
 
 	    while(recall_id_list != NULL){
-	      next_recall_id_list = g_list_concat(next_recall_id_list,
-						  ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list)->recycling_container));
+	      if(next_recall_id_list == NULL){
+		next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
+	      }else{
+		next_recall_id_list = g_list_concat(next_recall_id_list,
+						    ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
+	      }
 
 	      recall_id_list = recall_id_list->next;
 	    }
 	  }
 
 	  /* follow the links */
-	  ags_channel_recursive_duplicate_recall_down(current->link,
-						      next_recall_id_list);
+	  if(next_recall_id_list != NULL){
+	    ags_channel_recursive_duplicate_recall_down(current->link,
+							next_recall_id_list);
+	  }
 
 	  if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
 	    g_list_free(next_recall_id_list);
@@ -6026,17 +6195,23 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 	next_recall_id_list = NULL;
 
 	while(recall_id_list != NULL){
-	  next_recall_id_list = g_list_concat(next_recall_id_list,
-					      ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list)->recycling_container));
+	  if(next_recall_id_list == NULL){
+	    next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
+	  }else{
+	    next_recall_id_list = g_list_concat(next_recall_id_list,
+						ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
+	  }
 
 	  recall_id_list = recall_id_list->next;
 	}
       }
 
       /* follow the links */
-      ags_channel_recursive_duplicate_recall_down(current->link,
-						  next_recall_id_list);
-
+      if(next_recall_id_list != NULL){
+	ags_channel_recursive_duplicate_recall_down(current->link,
+						    next_recall_id_list);
+      }
+      
       if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
 	g_list_free(next_recall_id_list);
       }
@@ -6064,8 +6239,12 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
       next_recall_id_list = NULL;
 
       while(recall_id_list != NULL){
-	next_recall_id_list = g_list_concat(next_recall_id_list,
-					    ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list)->recycling_container));
+	if(next_recall_id_list == NULL){
+	  next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
+	}else{
+	  next_recall_id_list = g_list_concat(next_recall_id_list,
+					      ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
+	}
 
 	recall_id_list = recall_id_list->next;
       }
@@ -6075,15 +6254,19 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
     ags_channel_recursive_reset_audio_duplicate_recall(audio,
 						       recall_id_list);
     
-    if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
-      ags_channel_recursive_reset_audio_duplicate_recall(audio,
-							 next_recall_id_list);
+    if(next_recall_id_list != NULL){
+      if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) != 0){
+	ags_channel_recursive_reset_audio_duplicate_recall(audio,
+							   next_recall_id_list);
+      }
     }
 
     /* go down */
-    ags_channel_recursive_duplicate_recall_down_input(current,
-						      next_recall_id_list);
-
+    if(next_recall_id_list != NULL){
+      ags_channel_recursive_duplicate_recall_down_input(current,
+							next_recall_id_list);
+    }
+    
     if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
       g_list_free(next_recall_id_list);
     }
@@ -6169,16 +6352,22 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 	    next_recall_id_list = NULL;
 
 	    while(recall_id_list != NULL){
-	      next_recall_id_list = g_list_concat(next_recall_id_list,
-						  ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list)->recycling_container));
+	      if(next_recall_id_list == NULL){
+		next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
+	      }else{
+		next_recall_id_list = g_list_concat(next_recall_id_list,
+						    ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
+	      }
 
 	      recall_id_list = recall_id_list->next;
 	    }
 	  }
 
 	  /* follow the links */
-	  ags_channel_recursive_resolve_recall_down(current->link,
-						    next_recall_id_list);
+	  if(next_recall_id_list != NULL){
+	    ags_channel_recursive_resolve_recall_down(current->link,
+						      next_recall_id_list);
+	  }
 
 	  if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
 	    g_list_free(next_recall_id_list);
@@ -6202,16 +6391,22 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 	next_recall_id_list = NULL;
 
 	while(recall_id_list != NULL){
-	  next_recall_id_list = g_list_concat(next_recall_id_list,
-					      ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list)->recycling_container));
+	  if(next_recall_id_list == NULL){
+	    next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
+	  }else{
+	    next_recall_id_list = g_list_concat(next_recall_id_list,
+						ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
+	  }
 
 	  recall_id_list = recall_id_list->next;
 	}
       }
 
       /* follow the links */
-      ags_channel_recursive_resolve_recall_down(current->link,
-						next_recall_id_list);
+      if(next_recall_id_list != NULL){
+	ags_channel_recursive_resolve_recall_down(current->link,
+						  next_recall_id_list);
+      }
 
       if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
 	g_list_free(next_recall_id_list);
@@ -6240,8 +6435,12 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
       next_recall_id_list = NULL;
 
       while(recall_id_list != NULL){
-	next_recall_id_list = g_list_concat(next_recall_id_list,
-					    ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list)->recycling_container));
+	if(next_recall_id_list != NULL){
+	  next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
+	}else{
+	  next_recall_id_list = g_list_concat(next_recall_id_list,
+					      ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
+	}
 
 	recall_id_list = recall_id_list->next;
       }
@@ -6251,15 +6450,19 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
     ags_channel_recursive_reset_audio_resolve_recall(audio,
 						     recall_id_list);
     
-    if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
-      ags_channel_recursive_reset_audio_resolve_recall(audio,
-						       next_recall_id_list);
+    if(next_recall_id_list != NULL){
+      if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
+	ags_channel_recursive_reset_audio_resolve_recall(audio,
+							 next_recall_id_list);
+      }
     }
 
     /* go down */
-    ags_channel_recursive_resolve_recall_down_input(current,
-						    next_recall_id_list);
-
+    if(next_recall_id_list != NULL){
+      ags_channel_recursive_resolve_recall_down_input(current,
+						      next_recall_id_list);
+    }
+    
     if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
       g_list_free(next_recall_id_list);
     }
@@ -6339,17 +6542,23 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 	  next_recall_id_list = NULL;
 
 	  while(recall_id_list != NULL){
-	    next_recall_id_list = g_list_concat(next_recall_id_list,
-						ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list)->recycling_container));
+	    if(next_recall_id_list == NULL){
+	      next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
+	    }else{
+	      next_recall_id_list = g_list_concat(next_recall_id_list,
+						  ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
+	    }
 
 	    recall_id_list = recall_id_list->next;
 	  }
 	}
 
 	/* follow the links */
-	ags_channel_recursive_init_recall_down(current->link,
-					       next_recall_id_list);
-
+	if(next_recall_id_list != NULL){
+	  ags_channel_recursive_init_recall_down(current->link,
+						 next_recall_id_list);
+	}
+	
 	/* init AgsInput */
 	ags_channel_recursive_reset_channel_init_recall(current,
 							recall_id_list);
@@ -6372,16 +6581,18 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
 
 	while(recall_id_list != NULL){
 	  next_recall_id_list = g_list_concat(next_recall_id_list,
-					      ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list)->recycling_container));
+					      ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
 
 	  recall_id_list = recall_id_list->next;
 	}
       }
       
       /* follow the links */
-      ags_channel_recursive_init_recall_down(current->link,
-					     next_recall_id_list);
-
+      if(next_recall_id_list != NULL){
+	ags_channel_recursive_init_recall_down(current->link,
+					       next_recall_id_list);
+      }
+      
       /* init AgsInput */
       ags_channel_recursive_reset_channel_init_recall(current,
 						      recall_id_list);
@@ -6410,26 +6621,37 @@ ags_channel_recursive_reset_recall_ids(AgsChannel *channel, AgsChannel *link,
       next_recall_id_list = NULL;
 
       while(recall_id_list != NULL){
-	next_recall_id_list = g_list_concat(next_recall_id_list,
-					    ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list)->recycling_container));
+	if(next_recall_id_list == NULL){
+	  next_recall_id_list = ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container);
+	}else{
+	  next_recall_id_list = g_list_concat(next_recall_id_list,
+					      ags_recycling_container_get_child_recall_id(AGS_RECALL_ID(recall_id_list->data)->recycling_container));
+	}
 
 	recall_id_list = recall_id_list->next;
       }
     }
     
     /* follow the links */
-    ags_channel_recursive_resolve_recall_down_input(current,
-						    next_recall_id_list);
-
+    if(next_recall_id_list != NULL){
+      ags_channel_recursive_resolve_recall_down_input(current,
+						      next_recall_id_list);
+    }
+    
     /* init audio */
     if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
       ags_channel_recursive_reset_audio_init_recall(audio,
 						    next_recall_id_list);
     }
 
-    ags_channel_recursive_reset_audio_init_recall(audio,
-						  next_recall_id_list);
 
+    if(next_recall_id_list != NULL){
+      if((AGS_AUDIO_INPUT_HAS_RECYCLING & (audio->flags)) == 0){
+	ags_channel_recursive_reset_audio_init_recall(audio,
+						      next_recall_id_list);
+      }
+    }
+    
     /* init output */
     ags_channel_recursive_reset_channel_init_recall(current,
 						    recall_id_list);
diff --git a/src/ags/audio/ags_recycling.c b/src/ags/audio/ags_recycling.c
index 0e4405f..2546895 100644
--- a/src/ags/audio/ags_recycling.c
+++ b/src/ags/audio/ags_recycling.c
@@ -64,6 +64,7 @@ void ags_recycling_real_remove_audio_signal(AgsRecycling *recycling,
 
 enum{
   PROP_0,
+  PROP_CHANNEL,
   PROP_DEVOUT,
 };
 
@@ -135,6 +136,22 @@ ags_recycling_class_init(AgsRecyclingClass *recycling)
 
   /* properties */
   /**
+   * AgsRecycling:channel:
+   *
+   * The assigned #AgsChannel.
+   * 
+   * Since: 0.4.0
+   */
+  param_spec = g_param_spec_object("channel\0",
+				   "assigned channel\0",
+				   "The channel it is assigned with\0",
+				   AGS_TYPE_CHANNEL,
+				   G_PARAM_READABLE | G_PARAM_WRITABLE);
+  g_object_class_install_property(gobject,
+				  PROP_CHANNEL,
+				  param_spec);
+
+  /**
    * AgsRecycling:devout:
    *
    * The assigned #AgsDevout acting as default sink.
@@ -226,6 +243,27 @@ ags_recycling_set_property(GObject *gobject,
   recycling = AGS_RECYCLING(gobject);
 
   switch(prop_id){
+  case PROP_CHANNEL:
+    {
+      AgsChannel *channel;
+
+      channel = (AgsChannel *) g_value_get_object(value);
+
+      if(channel == recycling->channel){
+	return;
+      }
+
+      if(recycling->channel != NULL){
+	g_object_unref(recycling->channel);
+      }
+
+      if(channel != NULL){
+	g_object_ref(channel);
+      }
+
+      recycling->channel = channel;
+    }
+    break;
   case PROP_DEVOUT:
     {
       AgsDevout *devout;
@@ -252,6 +290,9 @@ ags_recycling_get_property(GObject *gobject,
   recycling = AGS_RECYCLING(gobject);
 
   switch(prop_id){
+  case PROP_CHANNEL:
+    g_value_set_object(value, recycling->channel);
+    break;
   case PROP_DEVOUT:
     g_value_set_object(value, recycling->devout);
     break;
@@ -614,7 +655,7 @@ ags_recycling_position(AgsRecycling *start_recycling, AgsRecycling *end_region,
 
   while(current != NULL && current != end_region){
     position++;
-
+    
     if(current == recycling){
       return(position);
     }
diff --git a/src/ags/audio/ags_recycling_container.c b/src/ags/audio/ags_recycling_container.c
index 0ec2808..4ee31f1 100644
--- a/src/ags/audio/ags_recycling_container.c
+++ b/src/ags/audio/ags_recycling_container.c
@@ -581,9 +581,11 @@ ags_recycling_container_get_child_recall_id(AgsRecyclingContainer *recycling_con
   recall_id_list = NULL;
   
   while(child != NULL){
-    recall_id_list = g_list_append(recall_id_list,
-				   AGS_RECYCLING_CONTAINER(child->data)->recall_id);
-
+    if(AGS_RECYCLING_CONTAINER(child->data)->recall_id != NULL){
+      recall_id_list = g_list_append(recall_id_list,
+				     AGS_RECYCLING_CONTAINER(child->data)->recall_id);
+    }
+    
     child = child->next;
   }
 
@@ -609,9 +611,23 @@ ags_recycling_container_reset_recycling(AgsRecyclingContainer *recycling_contain
 {
   AgsRecyclingContainer *new_recycling_container;
   AgsRecycling *recycling;
-  guint new_length;
+  gint new_length;
   gint first_index, last_index;
   guint i;
+  gboolean new_context;
+
+  if(ags_recycling_position(old_first_recycling, old_last_recycling->next,
+			    new_first_recycling) == -1){
+    if(old_first_recycling->prev == new_last_recycling){
+      new_context = FALSE;
+    }else if(old_first_recycling->next == new_first_recycling){
+      new_context = FALSE;
+    }else{
+      new_context = TRUE;
+    }
+  }else{
+    new_context = FALSE;
+  }
   
   /* retrieve new length of recycling array */
   new_length = ags_recycling_position(new_first_recycling, new_last_recycling->next,
@@ -619,10 +635,13 @@ ags_recycling_container_reset_recycling(AgsRecyclingContainer *recycling_contain
   new_length++;
   
   /* retrieve indices to replace */
-  if(old_first_recycling != NULL){
+  if(new_context){
+    first_index = 0;
+    last_index = 0;
+  }else if(old_first_recycling != NULL){
     first_index = ags_recycling_container_find(recycling_container,
 					       old_first_recycling);
-
+    
     last_index = ags_recycling_container_find(recycling_container,
 					      old_last_recycling);
   }else{
@@ -640,12 +659,18 @@ ags_recycling_container_reset_recycling(AgsRecyclingContainer *recycling_contain
   }
   
   /* instantiate */
-  new_recycling_container = g_object_new(AGS_TYPE_RECYCLING_CONTAINER,
-					 "length\0", (recycling_container->length -
-						      (last_index - first_index) +
-						      new_length),
-					 NULL);
-
+  if(new_context){
+    new_recycling_container = g_object_new(AGS_TYPE_RECYCLING_CONTAINER,
+					   "length\0", new_length,
+					   NULL);
+  }else{
+    new_recycling_container = g_object_new(AGS_TYPE_RECYCLING_CONTAINER,
+					   "length\0", (recycling_container->length -
+							(last_index - first_index) +
+							new_length),
+					   NULL);
+  }
+  
   new_recycling_container->children = g_list_copy(recycling_container->children);
   g_object_set(new_recycling_container,
 	       "parent\0", recycling_container->parent,
@@ -656,10 +681,12 @@ ags_recycling_container_reset_recycling(AgsRecyclingContainer *recycling_contain
 
   
   /* copy heading */
-  if(first_index > 0){
-    memcpy(new_recycling_container->recycling,
-	   recycling_container->recycling,
-	   first_index * sizeof(AgsRecycling *));
+  if(!new_context){
+    if(first_index > 0){
+      memcpy(new_recycling_container->recycling,
+	     recycling_container->recycling,
+	     first_index * sizeof(AgsRecycling *));
+    }
   }
   
   /* insert new */
@@ -673,12 +700,14 @@ ags_recycling_container_reset_recycling(AgsRecyclingContainer *recycling_contain
   }
 
   /* copy trailing */
-  if(last_index + 1 != recycling_container->length){
-    memcpy(&(new_recycling_container->recycling[first_index + new_length]),
-	   recycling_container->recycling,
-	   (new_recycling_container->length - first_index - new_length) * sizeof(AgsRecycling *));
+  if(!new_context){
+    if(new_recycling_container->length - first_index > 0){
+      memcpy(&(new_recycling_container->recycling[first_index + new_length]),
+	     &(recycling_container->recycling[first_index]),
+	     (new_recycling_container->length - first_index - new_length) * sizeof(AgsRecycling *));
+    }
   }
-
+  
   return(new_recycling_container);
 }
 

-- 
gsequencer packaging



More information about the pkg-multimedia-commits mailing list