[SCM] gsequencer/master: New upstream version 0.5.10
jkraehemann-guest at users.alioth.debian.org
jkraehemann-guest at users.alioth.debian.org
Tue Jul 28 23:01:45 UTC 2015
The following commit has been merged in the master branch:
commit 92c8bdc1e768485e5b01dfaf4dd0954f7ac2b915
Author: Joël Krähemann <jkraehemann-guest at users.alioth.debian.org>
Date: Tue Jul 28 18:57:05 2015 +0200
New upstream version 0.5.10
diff --git a/ChangeLog b/ChangeLog
index 354f577..17498da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+ags (0.5.10)
+
+ [ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ]
+ * fixed grained control range
+ * fixed more precise time calculation
+ * fixed AgsDial wrong arithmetic expression
+ * fixed time calculation
+ * fixed crash while open unsupported files
+ * implemented AgsAsyncQueue interface in ags_task_thread.c to avoid race-conditions
+ * fixed AgsDrumInputPad playback
+
ags (0.5.9)
[ Joël Krähemann (Maintainer of Advanced Gtk+ Sequencer) ]
diff --git a/Makefile.am b/Makefile.am
index 1932459..1514773 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -240,6 +240,7 @@ gsequencerheaders = \
src/ags/lib/ags_parameter.h \
src/ags/main.h \
src/ags/object/ags_applicable.h \
+ src/ags/object/ags_async_queue.h \
src/ags/object/ags_countable.h \
src/ags/object/ags_dynamic_connectable.h \
src/ags/object/ags_effect.h \
@@ -263,7 +264,6 @@ gsequencerheaders = \
src/ags/server/ags_registry.h \
src/ags/server/ags_remote_task.h \
src/ags/server/ags_server.h \
- src/ags/thread/ags_async_queue.h \
src/ags/thread/ags_audio_loop.h \
src/ags/thread/ags_audio_thread.h \
src/ags/thread/ags_autosave_thread.h \
@@ -571,6 +571,7 @@ gsequencer_SOURCES = \
src/ags/lib/ags_parameter.c \
src/ags/main.c \
src/ags/object/ags_applicable.c \
+ src/ags/object/ags_async_queue.c \
src/ags/object/ags_countable.c \
src/ags/object/ags_dynamic_connectable.c \
src/ags/object/ags_effect.c \
@@ -593,7 +594,6 @@ gsequencer_SOURCES = \
src/ags/server/ags_registry.c \
src/ags/server/ags_remote_task.c \
src/ags/server/ags_server.c \
- src/ags/thread/ags_async_queue.c \
src/ags/thread/ags_audio_loop.c \
src/ags/thread/ags_audio_thread.c \
src/ags/thread/ags_autosave_thread.c \
diff --git a/Makefile.in b/Makefile.in
index 83459ca..0b68aa7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2013 Free Software Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -17,7 +17,17 @@
VPATH = @srcdir@
-am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
@@ -80,15 +90,12 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
bin_PROGRAMS = gsequencer$(EXEEXT) midi2xml$(EXEEXT)
subdir = .
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/configure $(am__configure_deps) \
- $(srcdir)/config.h.in depcomp AUTHORS COPYING ChangeLog \
- INSTALL NEWS README compile config.guess config.rpath \
- config.sub install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(install_sh) -d
@@ -259,6 +266,7 @@ am_gsequencer_OBJECTS = $(am__objects_1) \
gsequencer-ags_list.$(OBJEXT) gsequencer-ags_log.$(OBJEXT) \
gsequencer-ags_parameter.$(OBJEXT) gsequencer-main.$(OBJEXT) \
gsequencer-ags_applicable.$(OBJEXT) \
+ gsequencer-ags_async_queue.$(OBJEXT) \
gsequencer-ags_countable.$(OBJEXT) \
gsequencer-ags_dynamic_connectable.$(OBJEXT) \
gsequencer-ags_effect.$(OBJEXT) \
@@ -281,7 +289,6 @@ am_gsequencer_OBJECTS = $(am__objects_1) \
gsequencer-ags_registry.$(OBJEXT) \
gsequencer-ags_remote_task.$(OBJEXT) \
gsequencer-ags_server.$(OBJEXT) \
- gsequencer-ags_async_queue.$(OBJEXT) \
gsequencer-ags_audio_loop.$(OBJEXT) \
gsequencer-ags_audio_thread.$(OBJEXT) \
gsequencer-ags_autosave_thread.$(OBJEXT) \
@@ -523,6 +530,9 @@ ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
AM_RECURSIVE_TARGETS = cscope
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \
+ COPYING ChangeLog INSTALL NEWS README compile config.guess \
+ config.rpath config.sub depcomp install-sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -884,6 +894,7 @@ gsequencerheaders = \
src/ags/lib/ags_parameter.h \
src/ags/main.h \
src/ags/object/ags_applicable.h \
+ src/ags/object/ags_async_queue.h \
src/ags/object/ags_countable.h \
src/ags/object/ags_dynamic_connectable.h \
src/ags/object/ags_effect.h \
@@ -907,7 +918,6 @@ gsequencerheaders = \
src/ags/server/ags_registry.h \
src/ags/server/ags_remote_task.h \
src/ags/server/ags_server.h \
- src/ags/thread/ags_async_queue.h \
src/ags/thread/ags_audio_loop.h \
src/ags/thread/ags_audio_thread.h \
src/ags/thread/ags_autosave_thread.h \
@@ -1215,6 +1225,7 @@ gsequencer_SOURCES = \
src/ags/lib/ags_parameter.c \
src/ags/main.c \
src/ags/object/ags_applicable.c \
+ src/ags/object/ags_async_queue.c \
src/ags/object/ags_countable.c \
src/ags/object/ags_dynamic_connectable.c \
src/ags/object/ags_effect.c \
@@ -1237,7 +1248,6 @@ gsequencer_SOURCES = \
src/ags/server/ags_registry.c \
src/ags/server/ags_remote_task.c \
src/ags/server/ags_server.c \
- src/ags/thread/ags_async_queue.c \
src/ags/thread/ags_audio_loop.c \
src/ags/thread/ags_audio_thread.c \
src/ags/thread/ags_autosave_thread.c \
@@ -1401,7 +1411,6 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -4135,6 +4144,20 @@ gsequencer-ags_applicable.obj: src/ags/object/ags_applicable.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsequencer_CFLAGS) $(CFLAGS) -c -o gsequencer-ags_applicable.obj `if test -f 'src/ags/object/ags_applicable.c'; then $(CYGPATH_W) 'src/ags/object/ags_applicable.c'; else $(CYGPATH_W) '$(srcdir)/src/ags/object/ags_applicable.c'; fi`
+gsequencer-ags_async_queue.o: src/ags/object/ags_async_queue.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsequencer_CFLAGS) $(CFLAGS) -MT gsequencer-ags_async_queue.o -MD -MP -MF $(DEPDIR)/gsequencer-ags_async_queue.Tpo -c -o gsequencer-ags_async_queue.o `test -f 'src/ags/object/ags_async_queue.c' || echo '$(srcdir)/'`src/ags/object/ags_async_queue.c
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsequencer-ags_async_queue.Tpo $(DEPDIR)/gsequencer-ags_async_queue.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ags/object/ags_async_queue.c' object='gsequencer-ags_async_queue.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsequencer_CFLAGS) $(CFLAGS) -c -o gsequencer-ags_async_queue.o `test -f 'src/ags/object/ags_async_queue.c' || echo '$(srcdir)/'`src/ags/object/ags_async_queue.c
+
+gsequencer-ags_async_queue.obj: src/ags/object/ags_async_queue.c
+ at am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsequencer_CFLAGS) $(CFLAGS) -MT gsequencer-ags_async_queue.obj -MD -MP -MF $(DEPDIR)/gsequencer-ags_async_queue.Tpo -c -o gsequencer-ags_async_queue.obj `if test -f 'src/ags/object/ags_async_queue.c'; then $(CYGPATH_W) 'src/ags/object/ags_async_queue.c'; else $(CYGPATH_W) '$(srcdir)/src/ags/object/ags_async_queue.c'; fi`
+ at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsequencer-ags_async_queue.Tpo $(DEPDIR)/gsequencer-ags_async_queue.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ags/object/ags_async_queue.c' object='gsequencer-ags_async_queue.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsequencer_CFLAGS) $(CFLAGS) -c -o gsequencer-ags_async_queue.obj `if test -f 'src/ags/object/ags_async_queue.c'; then $(CYGPATH_W) 'src/ags/object/ags_async_queue.c'; else $(CYGPATH_W) '$(srcdir)/src/ags/object/ags_async_queue.c'; fi`
+
gsequencer-ags_countable.o: src/ags/object/ags_countable.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsequencer_CFLAGS) $(CFLAGS) -MT gsequencer-ags_countable.o -MD -MP -MF $(DEPDIR)/gsequencer-ags_countable.Tpo -c -o gsequencer-ags_countable.o `test -f 'src/ags/object/ags_countable.c' || echo '$(srcdir)/'`src/ags/object/ags_countable.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsequencer-ags_countable.Tpo $(DEPDIR)/gsequencer-ags_countable.Po
@@ -4443,20 +4466,6 @@ gsequencer-ags_server.obj: src/ags/server/ags_server.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsequencer_CFLAGS) $(CFLAGS) -c -o gsequencer-ags_server.obj `if test -f 'src/ags/server/ags_server.c'; then $(CYGPATH_W) 'src/ags/server/ags_server.c'; else $(CYGPATH_W) '$(srcdir)/src/ags/server/ags_server.c'; fi`
-gsequencer-ags_async_queue.o: src/ags/thread/ags_async_queue.c
- at am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsequencer_CFLAGS) $(CFLAGS) -MT gsequencer-ags_async_queue.o -MD -MP -MF $(DEPDIR)/gsequencer-ags_async_queue.Tpo -c -o gsequencer-ags_async_queue.o `test -f 'src/ags/thread/ags_async_queue.c' || echo '$(srcdir)/'`src/ags/thread/ags_async_queue.c
- at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsequencer-ags_async_queue.Tpo $(DEPDIR)/gsequencer-ags_async_queue.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ags/thread/ags_async_queue.c' object='gsequencer-ags_async_queue.o' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsequencer_CFLAGS) $(CFLAGS) -c -o gsequencer-ags_async_queue.o `test -f 'src/ags/thread/ags_async_queue.c' || echo '$(srcdir)/'`src/ags/thread/ags_async_queue.c
-
-gsequencer-ags_async_queue.obj: src/ags/thread/ags_async_queue.c
- at am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsequencer_CFLAGS) $(CFLAGS) -MT gsequencer-ags_async_queue.obj -MD -MP -MF $(DEPDIR)/gsequencer-ags_async_queue.Tpo -c -o gsequencer-ags_async_queue.obj `if test -f 'src/ags/thread/ags_async_queue.c'; then $(CYGPATH_W) 'src/ags/thread/ags_async_queue.c'; else $(CYGPATH_W) '$(srcdir)/src/ags/thread/ags_async_queue.c'; fi`
- at am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsequencer-ags_async_queue.Tpo $(DEPDIR)/gsequencer-ags_async_queue.Po
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/ags/thread/ags_async_queue.c' object='gsequencer-ags_async_queue.obj' libtool=no @AMDEPBACKSLASH@
- at AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
- at am__fastdepCC_FALSE@ $(AM_V_CC at am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsequencer_CFLAGS) $(CFLAGS) -c -o gsequencer-ags_async_queue.obj `if test -f 'src/ags/thread/ags_async_queue.c'; then $(CYGPATH_W) 'src/ags/thread/ags_async_queue.c'; else $(CYGPATH_W) '$(srcdir)/src/ags/thread/ags_async_queue.c'; fi`
-
gsequencer-ags_audio_loop.o: src/ags/thread/ags_audio_loop.c
@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(gsequencer_CFLAGS) $(CFLAGS) -MT gsequencer-ags_audio_loop.o -MD -MP -MF $(DEPDIR)/gsequencer-ags_audio_loop.Tpo -c -o gsequencer-ags_audio_loop.o `test -f 'src/ags/thread/ags_audio_loop.c' || echo '$(srcdir)/'`src/ags/thread/ags_audio_loop.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/gsequencer-ags_audio_loop.Tpo $(DEPDIR)/gsequencer-ags_audio_loop.Po
@@ -6643,15 +6652,15 @@ dist-xz: distdir
$(am__post_remove_distdir)
dist-tarZ: distdir
- @echo WARNING: "Support for shar distribution archives is" \
- "deprecated." >&2
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
- @echo WARNING: "Support for distribution archives compressed with" \
- "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
@@ -6687,17 +6696,17 @@ distcheck: dist
esac
chmod -R a-w $(distdir)
chmod u+w $(distdir)
- mkdir $(distdir)/_build $(distdir)/_inst
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
- && $(am__cd) $(distdir)/_build \
- && ../configure \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
- --srcdir=.. --prefix="$$dc_install_base" \
+ --srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
@@ -6884,6 +6893,8 @@ uninstall-man: uninstall-man1
uninstall-binPROGRAMS uninstall-docDATA uninstall-hook \
uninstall-man uninstall-man1
+.PRECIOUS: Makefile
+
gsequencer.1:
xsltproc --nonet --param make.year.ranges 1 --param make.single.year.ranges 1 --param man.charmap.use.subset 0 -o ./ http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl gsequencer.1.xml
diff --git a/aclocal.m4 b/aclocal.m4
index 7657505..7622189 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -235,7 +235,7 @@ AS_VAR_COPY([$1], [pkg_cv_][$1])
AS_VAR_IF([$1], [""], [$5], [$4])dnl
])# PKG_CHECK_VAR
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -247,10 +247,10 @@ AS_VAR_IF([$1], [""], [$5], [$4])dnl
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.14'
+[am__api_version='1.15'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.14.1], [],
+m4_if([$1], [1.15], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -266,14 +266,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.14.1])dnl
+[AM_AUTOMAKE_VERSION([1.15])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -325,7 +325,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -356,7 +356,7 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -547,7 +547,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -623,7 +623,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -713,8 +713,8 @@ AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -788,6 +788,9 @@ END
AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
fi
fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
@@ -817,7 +820,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -828,7 +831,7 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -838,7 +841,7 @@ if test x"${install_sh}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -859,7 +862,7 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -909,7 +912,7 @@ rm -f confinc confmf
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2013 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -948,7 +951,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -977,7 +980,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1024,7 +1027,7 @@ AC_LANG_POP([C])])
# For backward compatibility.
AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1043,7 +1046,7 @@ AC_DEFUN([AM_RUN_LOG],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1124,7 +1127,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2013 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1184,7 +1187,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2013 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1212,7 +1215,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2013 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1231,7 +1234,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2013 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/compile b/compile
index 531136b..a85b723 100755
--- a/compile
+++ b/compile
@@ -3,7 +3,7 @@
scriptversion=2012-10-14.11; # UTC
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey at cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
diff --git a/configure b/configure
index 697371a..b13f928 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for gsequencer 0.5.9.
+# Generated by GNU Autoconf 2.69 for gsequencer 0.5.10.
#
# Report bugs to <jkraehemann-guest at users.alioth.debian.org>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='gsequencer'
PACKAGE_TARNAME='gsequencer'
-PACKAGE_VERSION='0.5.9'
-PACKAGE_STRING='gsequencer 0.5.9'
+PACKAGE_VERSION='0.5.10'
+PACKAGE_STRING='gsequencer 0.5.10'
PACKAGE_BUGREPORT='jkraehemann-guest at users.alioth.debian.org'
PACKAGE_URL=''
@@ -1321,7 +1321,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures gsequencer 0.5.9 to adapt to many kinds of systems.
+\`configure' configures gsequencer 0.5.10 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1391,7 +1391,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of gsequencer 0.5.9:";;
+ short | recursive ) echo "Configuration of gsequencer 0.5.10:";;
esac
cat <<\_ACEOF
@@ -1531,7 +1531,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-gsequencer configure 0.5.9
+gsequencer configure 0.5.10
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2008,7 +2008,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by gsequencer $as_me 0.5.9, which was
+It was created by gsequencer $as_me 0.5.10, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2359,7 +2359,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-am__api_version='1.14'
+am__api_version='1.15'
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -2580,7 +2580,7 @@ else
$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -2874,7 +2874,7 @@ fi
# Define the identity of the package.
PACKAGE='gsequencer'
- VERSION='0.5.9'
+ VERSION='0.5.10'
cat >>confdefs.h <<_ACEOF
@@ -2908,8 +2908,8 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
mkdir_p='$(MKDIR_P)'
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'
@@ -7263,7 +7263,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by gsequencer $as_me 0.5.9, which was
+This file was extended by gsequencer $as_me 0.5.10, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7329,7 +7329,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-gsequencer config.status 0.5.9
+gsequencer config.status 0.5.10
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index 7311ac9..204a3b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
-AC_INIT([gsequencer],[0.5.9],[jkraehemann-guest at users.alioth.debian.org])
+AC_INIT([gsequencer],[0.5.10],[jkraehemann-guest at users.alioth.debian.org])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([config.h.in])
AC_CONFIG_HEADERS([config.h])
diff --git a/depcomp b/depcomp
index 4ebd5b3..fc98710 100755
--- a/depcomp
+++ b/depcomp
@@ -3,7 +3,7 @@
scriptversion=2013-05-30.07; # UTC
-# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/doc/usersBook/chap2.xml b/doc/usersBook/chap2.xml
index 2ec0df5..7cec845 100644
--- a/doc/usersBook/chap2.xml
+++ b/doc/usersBook/chap2.xml
@@ -34,7 +34,8 @@
<listitem>
<para>
To open properties dialog open context menu and activate "properties"
- entry.
+ entry. There you might link, resize or asign LADSPA effects to channels.
+ NOTE for LADSPA sink or generators aren't supported, yet.
</para>
</listitem>
</itemizedlist>
diff --git a/doc/usersBook/chap3.xml b/doc/usersBook/chap3.xml
index 9a6c2ac..3319dd3 100644
--- a/doc/usersBook/chap3.xml
+++ b/doc/usersBook/chap3.xml
@@ -8,6 +8,7 @@
<!ENTITY copyIcon "/usr/share/icons/Adwaita/32x32/actions/edit-copy.png">
<!ENTITY cutIcon "/usr/share/icons/Adwaita/32x32/actions/edit-cut.png">
<!ENTITY pasteIcon "/usr/share/icons/Adwaita/32x32/actions/edit-paste.png">
+<!ENTITY invertIcon "/usr/share/icons/Adwaita/32x32/actions/gtk-convert.png">
]>
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0">
<title>Editor</title>
@@ -15,6 +16,8 @@
The editor features a piano roll. After linking an editor index with an enginge
You may perform tasks like adding notes or copy, cut and paste them. You may
change view segmentation, too.
+ Further you might shift the displayed piano on the left or reverse the channel
+ mapping.
</para>
<sect1>
@@ -24,6 +27,7 @@
by adding an index. Then you should link it with an engine. That can all be
done by using the menu button <imagedata fileref="&indexMenuIcon;" /> of the
index list.
+ The corresponding editor appears as you click appropriate link.
</para>
</sect1>
@@ -96,6 +100,13 @@
just insert them where they are/were located.
</entry>
</row>
+ <row>
+ <entry><imagedata fileref="&invertIcon;" /></entry>
+ <entry>paste</entry>
+ <entry>
+ Invert entire notation in conjunction with reverse mapping or MIDI import.
+ </entry>
+ </row>
</tbody>
</tgroup>
</table>
diff --git a/install-sh b/install-sh
index 377bb86..0b0fdcb 100755
--- a/install-sh
+++ b/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2011-11-20.07; # UTC
+scriptversion=2013-12-25.23; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -41,19 +41,15 @@ scriptversion=2011-11-20.07; # UTC
# This script is compatible with the BSD install script, but was written
# from scratch.
+tab=' '
nl='
'
-IFS=" "" $nl"
+IFS=" $tab$nl"
-# set DOITPROG to echo to test this script
+# Set DOITPROG to "echo" to test this script.
-# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
@@ -68,17 +64,6 @@ mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
posix_mkdir=
# Desired mode of installed file.
@@ -97,7 +82,7 @@ dir_arg=
dst_arg=
copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
@@ -137,46 +122,57 @@ while test $# -ne 0; do
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
- shift;;
+ shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
-o) chowncmd="$chownprog $2"
- shift;;
+ shift;;
-s) stripcmd=$stripprog;;
- -t) dst_arg=$2
- # Protect names problematic for 'test' and other utilities.
- case $dst_arg in
- -* | [=\(\)!]) dst_arg=./$dst_arg;;
- esac
- shift;;
+ -t)
+ is_target_a_directory=always
+ dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
- -T) no_target_directory=true;;
+ -T) is_target_a_directory=never;;
--version) echo "$0 $scriptversion"; exit $?;;
- --) shift
- break;;
+ --) shift
+ break;;
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
*) break;;
esac
shift
done
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+ if test -n "$dst_arg"; then
+ echo "$0: target directory not allowed when installing a directory." >&2
+ exit 1
+ fi
+fi
+
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
@@ -208,6 +204,15 @@ if test $# -eq 0; then
fi
if test -z "$dir_arg"; then
+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
+ if test ! -d "$dst_arg"; then
+ echo "$0: $dst_arg: Is not a directory." >&2
+ exit 1
+ fi
+ fi
+fi
+
+if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
@@ -223,16 +228,16 @@ if test -z "$dir_arg"; then
*[0-7])
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw='% 200'
+ u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
- u_plus_rw=
+ u_plus_rw=
else
- u_plus_rw=,u+rw
+ u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
@@ -269,41 +274,15 @@ do
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
+ if test "$is_target_a_directory" = never; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
+ dstdir=`dirname "$dst"`
test -d "$dstdir"
dstdir_status=$?
fi
@@ -314,74 +293,74 @@ do
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ if (umask $mkdir_umask &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ ls_ld_tmpdir=`ls -ld "$tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/d" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
esac
if
$posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
@@ -391,53 +370,51 @@ do
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
- /*) prefix='/';;
- [-=\(\)!]*) prefix='./';;
- *) prefix='';;
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
esac
- eval "$initialize_posix_glob"
-
oIFS=$IFS
IFS=/
- $posix_glob set -f
+ set -f
set fnord $dstdir
shift
- $posix_glob set +f
+ set +f
IFS=$oIFS
prefixes=
for d
do
- test X"$d" = X && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
done
if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
fi
fi
fi
@@ -472,15 +449,12 @@ do
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
+ set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
@@ -493,24 +467,24 @@ do
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
diff --git a/missing b/missing
index db98974..f62bbae 100755
--- a/missing
+++ b/missing
@@ -3,7 +3,7 @@
scriptversion=2013-10-28.13; # UTC
-# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
# Originally written by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
diff --git a/src/ags/X/ags_ladspa_browser_callbacks.c b/src/ags/X/ags_ladspa_browser_callbacks.c
index 69e90e0..25c0046 100644
--- a/src/ags/X/ags_ladspa_browser_callbacks.c
+++ b/src/ags/X/ags_ladspa_browser_callbacks.c
@@ -193,7 +193,8 @@ ags_ladspa_browser_plugin_effect_callback(GtkComboBoxText *combo_box,
0, 1,
y, y + 1);
- if(LADSPA_IS_HINT_TOGGLED(plugin_descriptor->PortRangeHints[i].HintDescriptor)){
+ if(LADSPA_IS_HINT_TOGGLED(plugin_descriptor->PortRangeHints[i].HintDescriptor) ||
+ plugin_descriptor->PortRangeHints[i].LowerBound == plugin_descriptor->PortRangeHints[i].UpperBound){
gtk_table_attach_defaults(table,
GTK_WIDGET(ags_ladspa_browser_combo_box_boolean_controls_new()),
1, 2,
diff --git a/src/ags/X/ags_line_member_editor_callbacks.c b/src/ags/X/ags_line_member_editor_callbacks.c
index ee4e435..b0a8e71 100644
--- a/src/ags/X/ags_line_member_editor_callbacks.c
+++ b/src/ags/X/ags_line_member_editor_callbacks.c
@@ -376,7 +376,8 @@ ags_line_member_editor_ladspa_browser_response_callback(GtkDialog *dialog,
child_widget = ags_line_member_get_widget(line_member);
- if(LADSPA_IS_HINT_TOGGLED(plugin_descriptor->PortRangeHints[i].HintDescriptor)){
+ if(LADSPA_IS_HINT_TOGGLED(plugin_descriptor->PortRangeHints[i].HintDescriptor) ||
+ plugin_descriptor->PortRangeHints[i].LowerBound == plugin_descriptor->PortRangeHints[i].UpperBound){
//nothing
}else{
lower_bound = plugin_descriptor->PortRangeHints[i].LowerBound;
diff --git a/src/ags/X/ags_navigation.c b/src/ags/X/ags_navigation.c
index 65082d2..9aae7d7 100644
--- a/src/ags/X/ags_navigation.c
+++ b/src/ags/X/ags_navigation.c
@@ -250,7 +250,7 @@ ags_navigation_init(AgsNavigation *navigation)
label = (GtkLabel *) gtk_label_new("position\0");
gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) label, FALSE, FALSE, 2);
- navigation->position_time = (GtkLabel *) gtk_label_new(g_strdup("00:00.00\0"));
+ navigation->position_time = (GtkLabel *) gtk_label_new(g_strdup("00:00.000\0"));
gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->position_time, FALSE, FALSE, 2);
navigation->position_tact = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, AGS_NOTE_EDIT_MAX_CONTROLS * 64.0, 1.0);
@@ -262,7 +262,7 @@ ags_navigation_init(AgsNavigation *navigation)
navigation->duration_time = (GtkLabel *) gtk_label_new(NULL);
g_object_set(navigation->duration_time,
- "label\0", g_strdup("0000:00.00\0"),
+ "label\0", g_strdup("0000:00.000\0"),
NULL);
gtk_widget_queue_draw((GtkWidget *) navigation->duration_time);
gtk_box_pack_start((GtkBox *) hbox, (GtkWidget *) navigation->duration_time, FALSE, FALSE, 2);
@@ -542,16 +542,16 @@ ags_navigation_tact_to_time_string(gdouble tact,
gdouble bpm,
gdouble delay_factor)
{
- gdouble delay_min, delay_sec, delay_hsec;
+ gdouble delay_min, delay_sec, delay_msec;
gchar *timestr;
gdouble tact_redux;
- guint min, sec, hsec;
+ guint min, sec, msec;
delay_min = bpm / delay_factor;
delay_sec = delay_min / 60.0;
- delay_hsec = delay_sec / 100.0;
+ delay_msec = delay_sec / 1000.0;
- tact_redux = tact * 16.0;
+ tact_redux = (tact + (tact / 16.0)) * 16.0;
min = (guint) floor(tact_redux / delay_min);
@@ -565,9 +565,9 @@ ags_navigation_tact_to_time_string(gdouble tact,
tact_redux = tact_redux - (sec * delay_sec);
}
- hsec = (guint) floor(tact_redux / delay_hsec);
+ msec = (guint) floor(tact_redux / delay_msec);
- timestr = g_strdup_printf("%.4d:%.2d.%.2d\0", min, sec, hsec);
+ timestr = g_strdup_printf("%.4d:%.2d.%.3d\0", min, sec, msec);
return(timestr);
}
@@ -587,14 +587,14 @@ ags_navigation_update_time_string(double tact,
gdouble delay_factor,
gchar *time_string)
{
- gdouble delay_min, delay_sec, delay_hsec;
+ gdouble delay_min, delay_sec, delay_msec;
gchar *timestr;
gdouble tact_redux;
- guint min, sec, hsec;
+ guint min, sec, msec;
delay_min = bpm * (60.0 / bpm) * (60.0 / bpm) * delay_factor;
delay_sec = delay_min / 60.0;
- delay_hsec = delay_sec / 100.0;
+ delay_msec = delay_sec / 1000.0;
tact_redux = 1.0 / 16.0;
@@ -610,9 +610,9 @@ ags_navigation_update_time_string(double tact,
tact_redux = tact_redux - (sec * delay_sec);
}
- hsec = (guint) floor(tact_redux / delay_hsec);
+ msec = (guint) floor(tact_redux / delay_msec);
- sprintf(time_string, "%.4d:%.2d.%.2d\0", min, sec, hsec);
+ sprintf(time_string, "%.4d:%.2d.%.3d\0", min, sec, msec);
}
gchar*
@@ -622,28 +622,29 @@ ags_navigation_relative_tact_to_time_string(gchar *timestr,
gdouble delay_factor)
{
gchar *tmp;
- guint min, sec, hsec;
- guint prev_min, prev_sec, prev_hsec;
+ guint min, sec, msec;
+ guint prev_min, prev_sec, prev_msec;
gdouble sec_value;
- tmp = sscanf(timestr, "%d:%d.%d", &prev_min, &prev_sec, &prev_hsec);
+ tmp = sscanf(timestr, "%d:%d.%d", &prev_min, &prev_sec, &prev_msec);
sec_value = prev_min * 60.0;
sec_value += prev_sec;
-
- if(prev_hsec != 0){
- sec_value += (prev_hsec / 100.0);
+ sec_value += (1.0 / (16.0 * delay_factor) * (60.0 / bpm) + (1.0 / delay)) / 2.0;
+
+ if(prev_msec != 0){
+ sec_value += (prev_msec / 1000.0);
}
- sec_value += (1.0 / delay * delay_factor);
+ // sec_value += (1.0 / delay);
- min = (guint) floor(sec_value / 60);
+ min = (guint) floor(sec_value / 60.0);
sec = sec_value - 60 * min;
- hsec = (sec_value - sec - min * 60) * 100;
-
- timestr = g_strdup_printf("%.4d:%.2d.%.2d\0", min, sec, hsec);
+ msec = (sec_value - sec - min * 60) * 1000;
+
+ timestr = g_strdup_printf("%.4d:%.2d.%.3d\0", min, sec, msec);
return(timestr);
}
diff --git a/src/ags/X/machine/ags_drum_input_pad_callbacks.c b/src/ags/X/machine/ags_drum_input_pad_callbacks.c
index d521045..418438d 100644
--- a/src/ags/X/machine/ags_drum_input_pad_callbacks.c
+++ b/src/ags/X/machine/ags_drum_input_pad_callbacks.c
@@ -576,6 +576,8 @@ ags_drum_input_pad_init_channel_launch_callback(AgsTask *task,
// g_list_free(tmp);
if(recall != NULL){
+ AgsAudioSignal *audio_signal;
+
g_signal_connect_after(channel, "done\0",
G_CALLBACK(ags_line_channel_done_callback), AGS_LINE(list->data));
@@ -583,12 +585,21 @@ ags_drum_input_pad_init_channel_launch_callback(AgsTask *task,
recycling = channel->first_recycling;
while(recycling != channel->last_recycling->next){
- add_audio_signal = ags_add_audio_signal_new(recycling,
- NULL,
- devout,
- AGS_RECALL(recall->data)->recall_id,
- 0);
- ags_task_thread_append_task(task_thread, (AgsTask *) add_audio_signal);
+ audio_signal = ags_audio_signal_new((GObject *) devout,
+ (GObject *) recycling,
+ (GObject *) AGS_RECALL(recall->data)->recall_id);
+ /* add audio signal */
+ ags_recycling_create_audio_signal_with_defaults(recycling,
+ audio_signal,
+ 0.0, 0);
+ audio_signal->stream_current = audio_signal->stream_beginning;
+ ags_audio_signal_connect(audio_signal);
+
+ /*
+ * emit add_audio_signal on AgsRecycling
+ */
+ ags_recycling_add_audio_signal(recycling,
+ audio_signal);
recycling = recycling->next;
}
diff --git a/src/ags/X/machine/ags_ffplayer_callbacks.c b/src/ags/X/machine/ags_ffplayer_callbacks.c
index e032da5..e495af6 100644
--- a/src/ags/X/machine/ags_ffplayer_callbacks.c
+++ b/src/ags/X/machine/ags_ffplayer_callbacks.c
@@ -171,6 +171,10 @@ ags_ffplayer_preset_changed_callback(GtkComboBox *preset, AgsFFPlayer *ffplayer)
playable = AGS_PLAYABLE(ffplayer->ipatch);
ipatch = ffplayer->ipatch;
+ if(ipatch == NULL){
+ return;
+ }
+
preset_name = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(preset));
/* load presets */
diff --git a/src/ags/X/machine/ags_oscillator.c b/src/ags/X/machine/ags_oscillator.c
index c2942e1..36c9960 100644
--- a/src/ags/X/machine/ags_oscillator.c
+++ b/src/ags/X/machine/ags_oscillator.c
@@ -195,12 +195,17 @@ ags_oscillator_init(AgsOscillator *oscillator)
gtk_spin_button_set_digits(oscillator->frequency,
3);
oscillator->frequency->adjustment->value = 27.5;
- gtk_table_attach_defaults(table, (GtkWidget *) oscillator->frequency, 3, 4, 1, 2);
+ gtk_table_attach_defaults(table,
+ (GtkWidget *) oscillator->frequency,
+ 3, 4,
+ 1, 2);
gtk_table_attach_defaults(table,
(GtkWidget *) gtk_label_new("volume\0"),
4, 5, 1, 2);
oscillator->volume = (GtkSpinButton *) gtk_spin_button_new_with_range(0.0, 1.0, 0.1);
+ gtk_spin_button_set_digits(oscillator->volume,
+ 3);
oscillator->volume->adjustment->value = 0.2;
gtk_table_attach_defaults(table, (GtkWidget *) oscillator->volume, 5, 6, 1, 2);
}
diff --git a/src/ags/audio/task/ags_display_tact.c b/src/ags/audio/task/ags_display_tact.c
index 372ff4f..8218f0c 100644
--- a/src/ags/audio/task/ags_display_tact.c
+++ b/src/ags/audio/task/ags_display_tact.c
@@ -161,7 +161,7 @@ ags_display_tact_launch(AgsTask *task)
gdk_window_flush(GTK_WIDGET(navigation->duration_time)->window);
timestr = ags_navigation_relative_tact_to_time_string(navigation->duration_time->label,
- 1.0 * window->devout->bpm / 60.0, //window->devout->delay[window->devout->tic_counter],
+ window->devout->delay[window->devout->tic_counter],
window->devout->bpm,
window->devout->delay_factor);
diff --git a/src/ags/audio/task/ags_open_single_file.c b/src/ags/audio/task/ags_open_single_file.c
index 9e991cf..1dbcddc 100644
--- a/src/ags/audio/task/ags_open_single_file.c
+++ b/src/ags/audio/task/ags_open_single_file.c
@@ -165,7 +165,7 @@ ags_open_single_file_launch(AgsTask *task)
channel = open_single_file->channel;
audio_signal = audio_file->audio_signal;
- for(i = 0; i < open_single_file->audio_channels; i++){
+ for(i = 0; i < open_single_file->audio_channels && audio_signal != NULL; i++){
/* unset link */
if(channel->link != NULL){
error = NULL;
diff --git a/src/ags/file/ags_file.c b/src/ags/file/ags_file.c
index 77d4505..b60c5ec 100644
--- a/src/ags/file/ags_file.c
+++ b/src/ags/file/ags_file.c
@@ -647,7 +647,21 @@ ags_file_real_open(AgsFile *file)
file->doc = xmlReadFile(file->filename, NULL, 0);
if(file->doc == NULL){
- printf("error: could not parse file %s\n", file->filename);
+ GtkDialog *dialog;
+
+ g_warning("could not parse file %s\n", file->filename);
+
+ dialog = gtk_message_dialog_new(NULL,
+ 0,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_OK,
+ "Failed to open '%s'\0",
+ file->filename);
+ gtk_widget_show_all(dialog);
+ g_signal_connect(dialog, "response\0",
+ G_CALLBACK(gtk_main_quit), NULL);
+ gtk_main();
+ exit(-1);
}
/*Get the root element node */
@@ -676,7 +690,21 @@ ags_file_real_open_from_data(AgsFile *file,
file->doc = xmlReadMemory(data, length, file->filename, NULL, 0);
if(file->doc == NULL) {
- printf("error: could not parse file %s\n", file->filename);
+ GtkDialog *dialog;
+
+ g_warning("could not parse file %s\n", file->filename);
+
+ dialog = gtk_message_dialog_new(NULL,
+ 0,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_OK,
+ "Failed to open '%s'\0",
+ file->filename);
+ gtk_widget_show_all(dialog);
+ g_signal_connect(dialog, "response\0",
+ G_CALLBACK(gtk_main_quit), NULL);
+ gtk_main();
+ exit(-1);
}
/*Get the root element node */
diff --git a/src/ags/file/ags_file_gui.c b/src/ags/file/ags_file_gui.c
index d096bae..4000c69 100644
--- a/src/ags/file/ags_file_gui.c
+++ b/src/ags/file/ags_file_gui.c
@@ -1934,8 +1934,12 @@ ags_file_read_line_member(AgsFile *file, xmlNode *node, AgsLineMember **line_mem
2 * dial->radius + 2 * dial->outline_strength + dial->button_width + 1,
2 * dial->radius + 2 * dial->outline_strength + 1);
}else if(GTK_IS_SPIN_BUTTON(child_widget)){
+ gtk_spin_button_set_digits(GTK_SPIN_BUTTON(child_widget),
+ 3);
adjustment = GTK_SPIN_BUTTON(child_widget)->adjustment;
}else if(GTK_IS_RANGE(child_widget)){
+ gtk_range_set_round_digits(GTK_RANGE(child_widget),
+ 3);
adjustment = GTK_RANGE(child_widget)->adjustment;
if(!xmlStrncmp(AGS_FILE_TRUE,
diff --git a/src/ags/object/ags_async_queue.c b/src/ags/object/ags_async_queue.c
new file mode 100644
index 0000000..f864b02
--- /dev/null
+++ b/src/ags/object/ags_async_queue.c
@@ -0,0 +1,130 @@
+/* GSequencer - Advanced GTK Sequencer
+ * Copyright (C) 2005-2015 Joël Krähemann
+ *
+ * This file is part of GSequencer.
+ *
+ * GSequencer is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GSequencer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GSequencer. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <ags/object/ags_async_queue.h>
+
+#include <stdio.h>
+
+void ags_async_queue_base_init(AgsAsyncQueueInterface *interface);
+
+/**
+ * SECTION:ags_async_queue
+ * @short_description: asynchronous run
+ * @title: AgsAsyncQueue
+ * @section_id:
+ * @include: ags/object/ags_async_queue.h
+ *
+ * The #AgsAsyncQueue interface determines if it is safe to run.
+ */
+
+GType
+ags_async_queue_get_type()
+{
+ static GType ags_type_async_queue = 0;
+
+ if(!ags_type_async_queue){
+ static const GTypeInfo ags_async_queue_info = {
+ sizeof(AgsAsyncQueueInterface),
+ (GBaseInitFunc) ags_async_queue_base_init,
+ NULL, /* base_finalize */
+ };
+
+ ags_type_async_queue = g_type_register_static(G_TYPE_INTERFACE,
+ "AgsAsyncQueue\0", &ags_async_queue_info,
+ 0);
+ }
+
+ return(ags_type_async_queue);
+}
+
+void
+ags_async_queue_base_init(AgsAsyncQueueInterface *interface)
+{
+ /* empty */
+}
+
+void
+ags_async_queue_set_run_mutex(AgsAsyncQueue *async_queue, pthread_mutex_t *run_mutex)
+{
+ AgsAsyncQueueInterface *async_queue_interface;
+
+ g_return_if_fail(AGS_IS_ASYNC_QUEUE(async_queue));
+ async_queue_interface = AGS_ASYNC_QUEUE_GET_INTERFACE(async_queue);
+ g_return_if_fail(async_queue_interface->set_run_mutex);
+ async_queue_interface->set_run_mutex(async_queue, run_mutex);
+}
+
+pthread_mutex_t*
+ags_async_queue_get_run_mutex(AgsAsyncQueue *async_queue)
+{
+ AgsAsyncQueueInterface *async_queue_interface;
+
+ g_return_val_if_fail(AGS_IS_ASYNC_QUEUE(async_queue), NULL);
+ async_queue_interface = AGS_ASYNC_QUEUE_GET_INTERFACE(async_queue);
+ g_return_val_if_fail(async_queue_interface->get_run_mutex, NULL);
+
+ return(async_queue_interface->get_run_mutex(async_queue));
+}
+
+void
+ags_async_queue_set_run_cond(AgsAsyncQueue *async_queue, pthread_cond_t *run_cond)
+{
+ AgsAsyncQueueInterface *async_queue_interface;
+
+ g_return_if_fail(AGS_IS_ASYNC_QUEUE(async_queue));
+ async_queue_interface = AGS_ASYNC_QUEUE_GET_INTERFACE(async_queue);
+ g_return_if_fail(async_queue_interface->set_run_cond);
+ async_queue_interface->set_run_cond(async_queue, run_cond);
+}
+
+pthread_cond_t*
+ags_async_queue_get_run_cond(AgsAsyncQueue *async_queue)
+{
+ AgsAsyncQueueInterface *async_queue_interface;
+
+ g_return_val_if_fail(AGS_IS_ASYNC_QUEUE(async_queue), NULL);
+ async_queue_interface = AGS_ASYNC_QUEUE_GET_INTERFACE(async_queue);
+ g_return_val_if_fail(async_queue_interface->get_run_cond, NULL);
+
+ return(async_queue_interface->get_run_cond(async_queue));
+}
+
+void
+ags_async_queue_set_run(AgsAsyncQueue *async_queue, gboolean is_run)
+{
+ AgsAsyncQueueInterface *async_queue_interface;
+
+ g_return_if_fail(AGS_IS_ASYNC_QUEUE(async_queue));
+ async_queue_interface = AGS_ASYNC_QUEUE_GET_INTERFACE(async_queue);
+ g_return_if_fail(async_queue_interface->set_run);
+ async_queue_interface->set_run(async_queue, is_run);
+}
+
+gboolean
+ags_async_queue_is_run(AgsAsyncQueue *async_queue)
+{
+ AgsAsyncQueueInterface *async_queue_interface;
+
+ g_return_val_if_fail(AGS_IS_ASYNC_QUEUE(async_queue), FALSE);
+ async_queue_interface = AGS_ASYNC_QUEUE_GET_INTERFACE(async_queue);
+ g_return_val_if_fail(async_queue_interface->is_run, FALSE);
+
+ return(async_queue_interface->is_run(async_queue));
+}
+
diff --git a/src/ags/object/ags_async_queue.h b/src/ags/object/ags_async_queue.h
new file mode 100644
index 0000000..0e4f14f
--- /dev/null
+++ b/src/ags/object/ags_async_queue.h
@@ -0,0 +1,62 @@
+/* GSequencer - Advanced GTK Sequencer
+ * Copyright (C) 2005-2015 Joël Krähemann
+ *
+ * This file is part of GSequencer.
+ *
+ * GSequencer is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * GSequencer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GSequencer. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __AGS_ASYNC_QUEUE_H__
+#define __AGS_ASYNC_QUEUE_H__
+
+#include <pthread.h>
+
+#include <glib-object.h>
+
+#define AGS_TYPE_ASYNC_QUEUE (ags_async_queue_get_type())
+#define AGS_ASYNC_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ASYNC_QUEUE, AgsAsyncQueue))
+#define AGS_ASYNC_QUEUE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_CAST((vtable), AGS_TYPE_ASYNC_QUEUE, AgsAsyncQueueInterface))
+#define AGS_IS_ASYNC_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), AGS_TYPE_ASYNC_QUEUE))
+#define AGS_IS_ASYNC_QUEUE_INTERFACE(vtable) (G_TYPE_CHECK_CLASS_TYPE((vtable), AGS_TYPE_ASYNC_QUEUE))
+#define AGS_ASYNC_QUEUE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj), AGS_TYPE_ASYNC_QUEUE, AgsAsyncQueueInterface))
+
+typedef void AgsAsyncQueue;
+typedef struct _AgsAsyncQueueInterface AgsAsyncQueueInterface;
+
+struct _AgsAsyncQueueInterface
+{
+ GTypeInterface interface;
+
+ void (*set_run_mutex)(AgsAsyncQueue *async_queue, pthread_mutex_t *run_mutex);
+ pthread_mutex_t* (*get_run_mutex)(AgsAsyncQueue *async_queue);
+
+ void (*set_run_cond)(AgsAsyncQueue *async_queue, pthread_cond_t *run_cond);
+ pthread_cond_t* (*get_run_cond)(AgsAsyncQueue *async_queue);
+
+ void (*set_run)(AgsAsyncQueue *async_queue, gboolean is_run);
+ gboolean (*is_run)(AgsAsyncQueue *async_queue);
+};
+
+GType ags_async_queue_get_type();
+
+void ags_async_queue_set_run_mutex(AgsAsyncQueue *async_queue, pthread_mutex_t *run_mutex);
+pthread_mutex_t* ags_async_queue_get_run_mutex(AgsAsyncQueue *async_queue);
+
+void ags_async_queue_set_run_cond(AgsAsyncQueue *async_queue, pthread_cond_t *run_cond);
+pthread_cond_t* ags_async_queue_get_run_cond(AgsAsyncQueue *async_queue);
+
+void ags_async_queue_set_run(AgsAsyncQueue *async_queue, gboolean is_run);
+gboolean ags_async_queue_is_run(AgsAsyncQueue *async_queue);
+
+#endif /*__AGS_ASYNC_QUEUE_H__*/
diff --git a/src/ags/object/ags_main_loop.c b/src/ags/object/ags_main_loop.c
index 8e59c69..0639238 100644
--- a/src/ags/object/ags_main_loop.c
+++ b/src/ags/object/ags_main_loop.c
@@ -98,7 +98,8 @@ ags_main_loop_get_async_queue(AgsMainLoop *main_loop)
g_return_val_if_fail(AGS_IS_MAIN_LOOP(main_loop), NULL);
main_loop_interface = AGS_MAIN_LOOP_GET_INTERFACE(main_loop);
g_return_val_if_fail(main_loop_interface->get_async_queue, NULL);
- main_loop_interface->get_async_queue(main_loop);
+
+ return(main_loop_interface->get_async_queue(main_loop));
}
/**
@@ -139,7 +140,8 @@ ags_main_loop_get_tic(AgsMainLoop *main_loop)
g_return_val_if_fail(AGS_IS_MAIN_LOOP(main_loop), G_MAXUINT);
main_loop_interface = AGS_MAIN_LOOP_GET_INTERFACE(main_loop);
g_return_val_if_fail(main_loop_interface->get_tic, G_MAXUINT);
- main_loop_interface->get_tic(main_loop);
+
+ return(main_loop_interface->get_tic(main_loop));
}
/**
@@ -180,5 +182,6 @@ ags_main_loop_get_last_sync(AgsMainLoop *main_loop)
g_return_val_if_fail(AGS_IS_MAIN_LOOP(main_loop), G_MAXUINT);
main_loop_interface = AGS_MAIN_LOOP_GET_INTERFACE(main_loop);
g_return_val_if_fail(main_loop_interface->get_last_sync, G_MAXUINT);
- main_loop_interface->get_last_sync(main_loop);
+
+ return(main_loop_interface->get_last_sync(main_loop));
}
diff --git a/src/ags/thread/ags_async_queue.c b/src/ags/thread/ags_async_queue.c
deleted file mode 100644
index f4a6721..0000000
--- a/src/ags/thread/ags_async_queue.c
+++ /dev/null
@@ -1,448 +0,0 @@
-/* GSequencer - Advanced GTK Sequencer
- * Copyright (C) 2005-2015 Joël Krähemann
- *
- * This file is part of GSequencer.
- *
- * GSequencer is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GSequencer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GSequencer. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <ags/thread/ags_async_queue.h>
-
-#include <ags-lib/object/ags_connectable.h>
-
-#include <ags/object/ags_main_loop.h>
-
-#include <ags/audio/ags_devout.h>
-
-#ifdef AGS_USE_LINUX_THREADS
-#include <ags/thread/ags_thread-kthreads.h>
-#else
-#include <ags/thread/ags_thread-posix.h>
-#endif
-
-void ags_async_queue_class_init(AgsAsyncQueueClass *async_queue);
-void ags_async_queue_connectable_interface_init(AgsConnectableInterface *connectable);
-void ags_async_queue_init(AgsAsyncQueue *async_queue);
-void ags_async_queue_connect(AgsConnectable *connectable);
-void ags_async_queue_disconnect(AgsConnectable *connectable);
-void ags_async_queue_finalize(GObject *gobject);
-
-void ags_async_queue_real_interrupt(AgsAsyncQueue *async_queue);
-void ags_async_queue_real_push_context(AgsAsyncQueue *async_queue,
- AgsContext *context);
-void ags_async_queue_real_pop_context(AgsAsyncQueue *async_queue,
- AgsContext *context);
-
-void ags_async_queue_run_callback(AgsThread *thread,
- AgsAsyncQueue *async_queue);
-
-enum{
- INTERRUPT,
- PUSH_CONTEXT,
- POP_CONTEXT,
- LAST_SIGNAL,
-};
-
-static gpointer ags_async_queue_parent_class = NULL;
-static guint async_queue_signals[LAST_SIGNAL];
-
-GType
-ags_async_queue_get_type()
-{
- static GType ags_type_async_queue = 0;
-
- if(!ags_type_async_queue){
- const GTypeInfo ags_async_queue_info = {
- sizeof (AgsAsyncQueueClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) ags_async_queue_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (AgsAsyncQueue),
- 0, /* n_preallocs */
- (GInstanceInitFunc) ags_async_queue_init,
- };
-
- ags_type_async_queue = g_type_register_static(G_TYPE_OBJECT,
- "AgsAsyncQueue\0",
- &ags_async_queue_info,
- 0);
- }
-
- return(ags_type_async_queue);
-}
-
-void
-ags_async_queue_class_init(AgsAsyncQueueClass *async_queue)
-{
- GObjectClass *gobject;
- GParamSpec *param_spec;
-
- ags_async_queue_parent_class = g_type_class_peek_parent(async_queue);
-
- /* AgsAsyncQueue */
- async_queue->interrupt = ags_async_queue_real_interrupt;
- async_queue->push_context = ags_async_queue_real_push_context;
- async_queue->pop_context = ags_async_queue_real_pop_context;
-
- /* signals */
- async_queue_signals[INTERRUPT] =
- g_signal_new("interrupt\0",
- G_TYPE_FROM_CLASS(async_queue),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(AgsAsyncQueueClass, interrupt),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- async_queue_signals[PUSH_CONTEXT] =
- g_signal_new("push_context\0",
- G_TYPE_FROM_CLASS(async_queue),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(AgsAsyncQueueClass, push_context),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1,
- G_TYPE_POINTER);
-
- async_queue_signals[POP_CONTEXT] =
- g_signal_new("pop_context\0",
- G_TYPE_FROM_CLASS(async_queue),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET(AgsAsyncQueueClass, pop_context),
- NULL, NULL,
- g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1,
- G_TYPE_POINTER);
-}
-
-void
-ags_async_queue_connectable_interface_init(AgsConnectableInterface *connectable)
-{
- connectable->is_ready = NULL;
- connectable->is_connected = NULL;
- connectable->connect = ags_async_queue_connect;
- connectable->disconnect = ags_async_queue_disconnect;
-}
-
-void
-ags_async_queue_init(AgsAsyncQueue *async_queue)
-{
- struct sigevent sev;
-
- /* deprecated
- async_queue->flags = AGS_ASYNC_QUEUE_POSIX_THREADS;
-
- async_queue->output_sum = AGS_DEVOUT_DEFAULT_BUFFER_SIZE;
- async_queue->systemrate = NSEC_PER_SEC / AGS_ASYNC_QUEUE_DEFAULT_SYSTEM_JIFFIE;
- //TODO:JK: fix aproximation
- async_queue->interval = async_queue->output_sum * NSEC_PER_SEC / async_queue->systemrate / 2;
-
- sev.sigev_notify = SIGEV_SIGNAL;
- sev.sigev_signo = AGS_ASYNC_QUEUE_SIGNAL_HIGH;
- sev.sigev_value.sival_ptr = &(async_queue->timerid);
-
- // timer_create(AGS_ASYNC_QUEUE_CLOCK_ID, &sev, &(async_queue->timerid));
-
- async_queue->stack = g_queue_new();
- async_queue->timer = g_hash_table_new(g_str_hash, g_str_equal);
-
- pthread_mutex_init(&(async_queue->lock.mutex), NULL);
-
- async_queue->context = NULL;
- async_queue->unref_context = NULL;
- */
-}
-
-void
-ags_async_queue_connect(AgsConnectable *connectable)
-{
- //TODO:JK: implement me
-}
-
-void
-ags_async_queue_disconnect(AgsConnectable *connectable)
-{
- //TODO:JK: implement me
-}
-
-void
-ags_async_queue_finalize(GObject *gobject)
-{
- //TODO:JK: implement me
-}
-
-AgsTimer*
-ags_timer_alloc(time_t tv_sec, long tv_nsec)
-{
- AgsTimer *timer;
-
- timer = (AgsTimer *) malloc(sizeof(AgsTimer));
-
- timer->run_delay.tv_sec = tv_sec;
- timer->run_delay.tv_nsec = tv_nsec;
-
- timer->record_history = FALSE;
- timer->history = NULL;
-
- return(timer);
-}
-
-AgsContext*
-ags_context_alloc(GQueue *stack, GHashTable *timer)
-{
- AgsContext *context;
-
- context = (AgsContext *) malloc(sizeof(AgsContext));
-
- context->stack = stack;
- context->timer = timer;
-
- return(context);
-}
-
-guint
-ags_async_queue_next_interval(AgsAsyncQueue *async_queue)
-{
- return(async_queue->output_sum * async_queue->systemrate / NSEC_PER_SEC);
-}
-
-AgsContext*
-ags_async_queue_find_context(AgsAsyncQueue *async_queue,
- AgsStackable *stackable)
-{
- //TODO:JK: implement me
-}
-
-void
-ags_async_queue_add(AgsAsyncQueue *async_queue, AgsStackable *stackable)
-{
- AgsTimer *timer;
- static time_t tv_sec = 0;
- static long tv_nsec = 0;
- static long delay = 4000;
- static const long max_delay = 800000;
- static gboolean odd = FALSE;
-
- if((AGS_ASYNC_QUEUE_LINUX_THREADS & (async_queue->flags)) != 0){
- //TODO:JK: uncomment me
- // while(atomic_read(&(async_queue->lock.monitor)) == 1){
- // ags_async_queue_idle(async_queue);
- // }
-
- // atomic_set(&(async_queue->lock.monitor),
- // 1);
- }else if((AGS_ASYNC_QUEUE_POSIX_THREADS & (async_queue->flags)) != 0){
- pthread_mutex_lock(&(async_queue->lock.mutex));
- }
-
- timer = ags_timer_alloc(tv_sec,
- tv_nsec);
-
- if(!odd){
- tv_nsec += delay;
-
- if(tv_nsec >= max_delay){
- tv_nsec = max_delay / 2;
- odd = TRUE;
- }
- }else{
- tv_nsec -= delay;
-
- if(2 * delay > tv_nsec - delay){
- odd = FALSE;
- }
- }
-
- g_queue_push_tail(async_queue->stack,
- stackable);
- g_hash_table_insert(async_queue->timer, stackable, timer);
-
- // g_signal_connect(G_OBJECT(stackable), "run\0",
- // G_CALLBACK(ags_async_queue_run_callback), async_queue);
-
- if((AGS_ASYNC_QUEUE_LINUX_THREADS & (async_queue->flags)) != 0){
- //TODO:JK: uncomment me
- // atomic_set(&(async_queue->lock.monitor),
- // 0);
- }else if((AGS_ASYNC_QUEUE_POSIX_THREADS & (async_queue->flags)) != 0){
- pthread_mutex_unlock(&(async_queue->lock.mutex));
- }
-}
-
-gboolean
-ags_async_queue_remove(AgsAsyncQueue *async_queue, AgsStackable *stackable)
-{
- AgsTimer *timer;
-
- timer = g_hash_table_lookup(async_queue->timer,
- stackable);
- g_hash_table_remove(async_queue->timer,
- stackable);
- free(timer);
-}
-
-void
-ags_async_queue_idle(AgsAsyncQueue *async_queue)
-{
- /* software interrupt - caused by exceeding multiplexing by time */
- ags_async_queue_interrupt(async_queue);
-}
-
-void
-ags_async_queue_run_callback(AgsThread *thread,
- AgsAsyncQueue *async_queue)
-{
- AgsTimer *timer;
- gboolean interrupt_first;
- struct timespec delay = {
- 0,
- NSEC_PER_SEC / thread->freq / 2,
- };
-
- interrupt_first = ((AGS_ASYNC_QUEUE_STOP_BIT_0 & (async_queue->flags)) != 0) ? TRUE: FALSE;
-
- timer = g_hash_table_lookup(async_queue->timer,
- AGS_STACKABLE(thread));
-
- // nanosleep(&(timer->run_delay), NULL);
- // ags_async_queue_interrupt(async_queue);
-
- // nanosleep(&(delay), NULL);
-
- while((interrupt_first &&
- (AGS_ASYNC_QUEUE_STOP_BIT_0 & (async_queue->flags)) != 0) ||
- (!interrupt_first &&
- AGS_ASYNC_QUEUE_STOP_BIT_1 & (async_queue->flags)) != 0){
- }
-}
-
-void
-ags_async_queue_real_interrupt(AgsAsyncQueue *async_queue)
-{
- // pthread_yield();
-}
-
-void
-ags_async_queue_interrupt(AgsAsyncQueue *async_queue)
-{
- g_return_if_fail(AGS_IS_ASYNC_QUEUE(async_queue));
-
- g_object_ref(G_OBJECT(async_queue));
- g_signal_emit(G_OBJECT(async_queue),
- async_queue_signals[INTERRUPT], 0);
- g_object_unref(G_OBJECT(async_queue));
-}
-
-void
-ags_async_queue_real_push_context(AgsAsyncQueue *async_queue,
- AgsContext *context)
-{
- async_queue->stack = context->stack;
- async_queue->timer = context->timer;
-}
-
-void
-ags_async_queue_push_context(AgsAsyncQueue *async_queue,
- AgsContext *context)
-{
- g_return_if_fail(AGS_IS_ASYNC_QUEUE(async_queue));
-
- g_object_ref(G_OBJECT(async_queue));
- g_signal_emit(G_OBJECT(async_queue),
- async_queue_signals[PUSH_CONTEXT], 0,
- context);
- g_object_unref(G_OBJECT(async_queue));
-}
-
-void
-ags_async_queue_real_pop_context(AgsAsyncQueue *async_queue,
- AgsContext *context)
-{
- async_queue->stack = NULL;
- async_queue->timer = NULL;
-}
-
-void
-ags_async_queue_pop_context(AgsAsyncQueue *async_queue,
- AgsContext *context)
-{
- g_return_if_fail(AGS_IS_ASYNC_QUEUE(async_queue));
-
- g_object_ref(G_OBJECT(async_queue));
- g_signal_emit(G_OBJECT(async_queue),
- async_queue_signals[POP_CONTEXT], 0,
- context);
- g_object_unref(G_OBJECT(async_queue));
-}
-
-void*
-ags_async_queue_worker(void *ptr)
-{
- AgsAsyncQueue *async_queue;
- struct timespec delay = {
- 0,
- async_queue->output_sum * NSEC_PER_SEC / async_queue->systemrate / 2,
- };
-
-
- while((AGS_ASYNC_QUEUE_WORKER_RUNNING & (async_queue->flags)) != 0){
- if((AGS_ASYNC_QUEUE_STOP_BIT_0 & (async_queue->flags)) != 0){
- async_queue->flags &= (~AGS_ASYNC_QUEUE_STOP_BIT_0);
- async_queue->flags |= (AGS_ASYNC_QUEUE_STOP_BIT_1);
- }else{
- async_queue->flags &= (~AGS_ASYNC_QUEUE_STOP_BIT_1);
- async_queue->flags |= (AGS_ASYNC_QUEUE_STOP_BIT_0);
- }
-
- nanosleep(&delay, NULL);
- }
-
- return(NULL);
-}
-
-/**
- * ags_async_queue_clean:
- */
-void
-ags_async_queue_clean(AgsAsyncQueue *async_queue)
-{
- GList *list;
-
- list = async_queue->unref_context;
-
- while(list != NULL){
- g_object_unref(list->data);
-
- list = list->next;
- }
-
- g_list_free(async_queue->unref_context);
- async_queue->unref_context = NULL;
-}
-
-/**
- * ags_async_queue_new:
- */
-AgsAsyncQueue*
-ags_async_queue_new()
-{
- AgsAsyncQueue *async_queue;
-
- async_queue = (AgsAsyncQueue *) g_object_new(AGS_TYPE_ASYNC_QUEUE,
- NULL);
-
- return(async_queue);
-}
diff --git a/src/ags/thread/ags_async_queue.h b/src/ags/thread/ags_async_queue.h
deleted file mode 100644
index 70a6f3c..0000000
--- a/src/ags/thread/ags_async_queue.h
+++ /dev/null
@@ -1,143 +0,0 @@
-/* GSequencer - Advanced GTK Sequencer
- * Copyright (C) 2005-2015 Joël Krähemann
- *
- * This file is part of GSequencer.
- *
- * GSequencer is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * GSequencer is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GSequencer. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __AGS_ASYNC_QUEUE_H__
-#define __AGS_ASYNC_QUEUE_H__
-
-#include <signal.h>
-#include <time.h>
-
-#include <linux/futex.h>
-#include <sys/time.h>
-
-#include <pthread.h>
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include <ags/object/ags_stackable.h>
-
-#define AGS_TYPE_ASYNC_QUEUE (ags_async_queue_get_type())
-#define AGS_ASYNC_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_ASYNC_QUEUE, AgsAsyncQueue))
-#define AGS_ASYNC_QUEUE_CLASS(class) (G_TYPE_CHECK_CLASS_CAST(class, AGS_TYPE_ASYNC_QUEUE, AgsAsyncQueueClass))
-#define AGS_IS_ASYNC_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_ASYNC_QUEUE))
-#define AGS_IS_ASYNC_QUEUE_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_ASYNC_QUEUE))
-#define AGS_ASYNC_QUEUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, AGS_TYPE_ASYNC_QUEUE, AgsAsyncQueueClass))
-
-#define AGS_ASYNC_QUEUE_DEFAULT_SYSTEM_JIFFIE (250)
-
-#define AGS_ASYNC_QUEUE_CLOCK_ID CLOCK_REALTIME
-#define AGS_ASYNC_QUEUE_SIGNAL_HIGH SIGRTMAX
-#define AGS_ASYNC_QUEUE_SIGNAL_LOW SIGRTMIN
-
-typedef struct _AgsAsyncQueue AgsAsyncQueue;
-typedef struct _AgsAsyncQueueClass AgsAsyncQueueClass;
-typedef struct _AgsTimer AgsTimer;
-typedef struct _AgsContext AgsContext;
-
-typedef enum{
- AGS_ASYNC_QUEUE_LINUX_THREADS = 1,
- AGS_ASYNC_QUEUE_POSIX_THREADS = 1 << 1,
- AGS_ASYNC_QUEUE_WORKER_RUNNING = 1 << 2,
- AGS_ASYNC_QUEUE_INTERRUPT_OWN = 1 << 2,
- AGS_ASYNC_QUEUE_INTERRUPT_OTHER = 1 << 3,
- AGS_ASYNC_QUEUE_STOP_BIT_0 = 1 << 4,
- AGS_ASYNC_QUEUE_STOP_BIT_1 = 1 << 5,
-}AgsAsyncQueueFlags;
-
-struct _AgsAsyncQueue
-{
- GObject object;
-
- guint flags;
-
- guint output_sum;
- guint systemrate;
- guint interval;
-
- timer_t timerid;
-
- GQueue *stack;
- GHashTable *timer;
-
- union{
- // atomic_t monitor;
- pthread_mutex_t mutex;
- }lock;
-
- GList *context;
- GList *unref_context;
-};
-
-struct _AgsAsyncQueueClass
-{
- GObjectClass object;
-
- void (*interrupt)(AgsAsyncQueue *async_queue);
-
- void (*push_context)(AgsAsyncQueue *async_queue,
- AgsContext *context);
- void (*pop_context)(AgsAsyncQueue *async_queue,
- AgsContext *context);
-};
-
-struct _AgsTimer
-{
- struct timespec run_delay;
-
- //NOTE: not supported for now
- gboolean record_history;
- gpointer history;
-};
-
-struct _AgsContext
-{
- GQueue *stack;
- GHashTable *timer;
-};
-
-GType ags_async_queue_get_type();
-
-AgsTimer* ags_timer_alloc(time_t tv_sec, long tv_nsec);
-AgsContext* ags_context_alloc(GQueue *stack, GHashTable *timer);
-
-guint ags_async_queue_next_interval(AgsAsyncQueue *async_queue);
-
-AgsContext* ags_async_queue_find_context(AgsAsyncQueue *async_queue,
- AgsStackable *stackable);
-
-void ags_async_queue_add(AgsAsyncQueue *async_queue, AgsStackable *stackable);
-gboolean ags_async_queue_remove(AgsAsyncQueue *async_queue, AgsStackable *stackable);
-
-void ags_async_queue_idle(AgsAsyncQueue *async_queue);
-
-void ags_async_queue_interrupt(AgsAsyncQueue *async_queue);
-
-void ags_async_queue_push_context(AgsAsyncQueue *async_queue,
- AgsContext *context);
-void ags_async_queue_pop_context(AgsAsyncQueue *async_queue,
- AgsContext *context);
-
-void* ags_async_queue_worker(void *ptr);
-
-void ags_async_queue_clean(AgsAsyncQueue *async_queue);
-
-AgsAsyncQueue* ags_async_queue_new();
-
-#endif /*__AGS_ASYNC_QUEUE_H__*/
diff --git a/src/ags/thread/ags_audio_loop.c b/src/ags/thread/ags_audio_loop.c
index f5ed8d3..0b64bf0 100644
--- a/src/ags/thread/ags_audio_loop.c
+++ b/src/ags/thread/ags_audio_loop.c
@@ -28,7 +28,6 @@
#include <ags/thread/ags_mutex_manager.h>
#include <ags/thread/ags_export_thread.h>
#include <ags/thread/ags_gui_thread.h>
-#include <ags/thread/ags_async_queue.h>
#include <ags/thread/ags_audio_thread.h>
#include <ags/thread/ags_channel_thread.h>
@@ -58,8 +57,8 @@ void ags_audio_loop_get_property(GObject *gobject,
GParamSpec *param_spec);
void ags_audio_loop_connect(AgsConnectable *connectable);
void ags_audio_loop_disconnect(AgsConnectable *connectable);
-void ags_audio_loop_set_async_queue(AgsMainLoop *main_loop, AgsAsyncQueue *async_queue);
-AgsAsyncQueue* ags_audio_loop_get_async_queue(AgsMainLoop *main_loop);
+void ags_audio_loop_set_async_queue(AgsMainLoop *main_loop, GObject *async_queue);
+GObject* ags_audio_loop_get_async_queue(AgsMainLoop *main_loop);
void ags_audio_loop_set_tic(AgsMainLoop *main_loop, guint tic);
guint ags_audio_loop_get_tic(AgsMainLoop *main_loop);
void ags_audio_loop_set_last_sync(AgsMainLoop *main_loop, guint last_sync);
@@ -356,11 +355,9 @@ ags_audio_loop_init(AgsAudioLoop *audio_loop)
audio_loop->ags_main = NULL;
- /* AgsAsyncQueue */
- audio_loop->async_queue = ags_async_queue_new();
-
/* AgsTaskThread */
- audio_loop->task_thread = (AgsThread *) ags_task_thread_new(NULL);
+ audio_loop->async_queue =
+ audio_loop->task_thread = (AgsThread *) ags_task_thread_new(NULL);
ags_thread_add_child(AGS_THREAD(audio_loop), audio_loop->task_thread);
/* AgsGuiThread */
@@ -584,12 +581,12 @@ ags_audio_loop_disconnect(AgsConnectable *connectable)
}
void
-ags_audio_loop_set_async_queue(AgsMainLoop *main_loop, AgsAsyncQueue *async_queue)
+ags_audio_loop_set_async_queue(AgsMainLoop *main_loop, GObject *async_queue)
{
AGS_AUDIO_LOOP(main_loop)->async_queue = async_queue;
}
-AgsAsyncQueue*
+GObject*
ags_audio_loop_get_async_queue(AgsMainLoop *main_loop)
{
return(AGS_AUDIO_LOOP(main_loop)->async_queue);
diff --git a/src/ags/thread/ags_task_thread.c b/src/ags/thread/ags_task_thread.c
index fdb6b36..1540898 100644
--- a/src/ags/thread/ags_task_thread.c
+++ b/src/ags/thread/ags_task_thread.c
@@ -23,6 +23,8 @@
#include <ags/main.h>
+#include <ags/object/ags_async_queue.h>
+
#include <ags/lib/ags_list.h>
#include <ags/thread/ags_audio_loop.h>
@@ -37,10 +39,17 @@
void ags_task_thread_class_init(AgsTaskThreadClass *task_thread);
void ags_task_thread_connectable_interface_init(AgsConnectableInterface *connectable);
+void ags_task_thread_async_queue_interface_init(AgsAsyncQueueInterface *async_queue);
void ags_task_thread_init(AgsTaskThread *task_thread);
void ags_task_thread_connect(AgsConnectable *connectable);
void ags_task_thread_disconnect(AgsConnectable *connectable);
void ags_task_thread_finalize(GObject *gobject);
+void ags_task_thread_set_run_mutex(AgsAsyncQueue *async_queue, pthread_mutex_t *run_mutex);
+pthread_mutex_t* ags_task_thread_get_run_mutex(AgsAsyncQueue *async_queue);
+void ags_task_thread_set_run_cond(AgsAsyncQueue *async_queue, pthread_cond_t *run_cond);
+pthread_cond_t* ags_task_thread_get_run_cond(AgsAsyncQueue *async_queue);
+void ags_task_thread_set_run(AgsAsyncQueue *async_queue, gboolean is_run);
+gboolean ags_task_thread_is_run(AgsAsyncQueue *async_queue);
void ags_task_thread_start(AgsThread *thread);
void ags_task_thread_run(AgsThread *thread);
@@ -89,6 +98,12 @@ ags_task_thread_get_type()
NULL, /* interface_finalize */
NULL, /* interface_data */
};
+
+ static const GInterfaceInfo ags_async_queue_interface_info = {
+ (GInterfaceInitFunc) ags_task_thread_async_queue_interface_init,
+ NULL, /* interface_finalize */
+ NULL, /* interface_data */
+ };
ags_type_task_thread = g_type_register_static(AGS_TYPE_THREAD,
"AgsTaskThread\0",
@@ -98,6 +113,10 @@ ags_task_thread_get_type()
g_type_add_interface_static(ags_type_task_thread,
AGS_TYPE_CONNECTABLE,
&ags_connectable_interface_info);
+
+ g_type_add_interface_static(ags_type_task_thread,
+ AGS_TYPE_ASYNC_QUEUE,
+ &ags_async_queue_interface_info);
}
return (ags_type_task_thread);
@@ -133,10 +152,25 @@ ags_task_thread_connectable_interface_init(AgsConnectableInterface *connectable)
}
void
+ags_task_thread_async_queue_interface_init(AgsAsyncQueueInterface *async_queue)
+{
+ async_queue->set_run_mutex = ags_task_thread_set_run_mutex;
+ async_queue->get_run_mutex = ags_task_thread_get_run_mutex;
+
+ async_queue->set_run_cond = ags_task_thread_set_run_cond;
+ async_queue->get_run_cond = ags_task_thread_get_run_cond;
+
+ async_queue->set_run = ags_task_thread_set_run;
+ async_queue->is_run = ags_task_thread_is_run;
+}
+
+void
ags_task_thread_init(AgsTaskThread *task_thread)
{
AgsThread *thread;
+ pthread_mutexattr_t mutexattr;
+
thread = AGS_THREAD(task_thread);
// g_atomic_int_or(&(thread->flags),
@@ -144,9 +178,20 @@ ags_task_thread_init(AgsTaskThread *task_thread)
thread->freq = AGS_TASK_THREAD_DEFAULT_JIFFIE;
- g_cond_init(&(task_thread->cond));
- g_mutex_init(&(task_thread->mutex));
+ /* async queue */
+ g_atomic_int_set(&(task_thread->is_run),
+ FALSE);
+
+ pthread_mutexattr_init(&(mutexattr));
+ pthread_mutexattr_settype(&(mutexattr), PTHREAD_MUTEX_RECURSIVE);
+
+ task_thread->run_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t));
+ pthread_mutex_init(task_thread->run_mutex, &mutexattr);
+ task_thread->run_cond = (pthread_cond_t *) malloc(sizeof(pthread_cond_t));
+ pthread_cond_init(task_thread->run_cond, NULL);
+
+ /* */
task_thread->read_mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t));
pthread_mutex_init(task_thread->read_mutex, NULL);
@@ -201,6 +246,43 @@ ags_task_thread_finalize(GObject *gobject)
}
void
+ags_task_thread_set_run_mutex(AgsAsyncQueue *async_queue, pthread_mutex_t *run_mutex)
+{
+ AGS_TASK_THREAD(async_queue)->run_mutex = run_mutex;
+}
+
+pthread_mutex_t*
+ags_task_thread_get_run_mutex(AgsAsyncQueue *async_queue)
+{
+ return(AGS_TASK_THREAD(async_queue)->run_mutex);
+}
+
+void
+ags_task_thread_set_run_cond(AgsAsyncQueue *async_queue, pthread_cond_t *run_cond)
+{
+ AGS_TASK_THREAD(async_queue)->run_cond = run_cond;
+}
+
+pthread_cond_t*
+ags_task_thread_get_run_cond(AgsAsyncQueue *async_queue)
+{
+ return(AGS_TASK_THREAD(async_queue)->run_cond);
+}
+
+void
+ags_task_thread_set_run(AgsAsyncQueue *async_queue, gboolean is_run)
+{
+ g_atomic_int_set(&(AGS_TASK_THREAD(async_queue)->is_run),
+ is_run);
+}
+
+gboolean
+ags_task_thread_is_run(AgsAsyncQueue *async_queue)
+{
+ return(g_atomic_int_get(&(AGS_TASK_THREAD(async_queue)->is_run)));
+}
+
+void
ags_task_thread_start(AgsThread *thread)
{
AgsTaskThread *task_thread;
@@ -285,7 +367,7 @@ ags_task_thread_run(AgsThread *thread)
int i;
pthread_mutex_lock(task_thread->launch_mutex);
- pthread_mutex_lock(AGS_AUDIO_LOOP(thread->parent)->recall_mutex);
+ // pthread_mutex_lock(AGS_AUDIO_LOOP(thread->parent)->recall_mutex);
for(i = 0; i < g_atomic_int_get(&(task_thread->pending)); i++){
task = AGS_TASK(list->data);
@@ -299,7 +381,7 @@ ags_task_thread_run(AgsThread *thread)
list = list->next;
}
- pthread_mutex_unlock(AGS_AUDIO_LOOP(thread->parent)->recall_mutex);
+ // pthread_mutex_unlock(AGS_AUDIO_LOOP(thread->parent)->recall_mutex);
pthread_mutex_unlock(task_thread->launch_mutex);
}
@@ -312,6 +394,17 @@ ags_task_thread_run(AgsThread *thread)
pthread_mutex_unlock(task_thread->read_mutex);
+ /* async queue */
+ pthread_mutex_lock(task_thread->run_mutex);
+
+ ags_async_queue_set_run(AGS_ASYNC_QUEUE(task_thread),
+ TRUE);
+
+ pthread_cond_broadcast(task_thread->run_cond);
+
+ pthread_mutex_unlock(task_thread->run_mutex);
+
+ /* clean-up */
pango_fc_font_map_cache_clear(pango_cairo_font_map_get_default());
pango_cairo_font_map_set_default(NULL);
// cairo_debug_reset_static_data();
diff --git a/src/ags/thread/ags_task_thread.h b/src/ags/thread/ags_task_thread.h
index fb4d8ad..e78f2a4 100644
--- a/src/ags/thread/ags_task_thread.h
+++ b/src/ags/thread/ags_task_thread.h
@@ -52,9 +52,11 @@ struct _AgsTaskThread
guint flags;
- GMutex mutex;
- GCond cond;
-
+ volatile gboolean is_run;
+
+ pthread_mutex_t *run_mutex;
+ pthread_cond_t *run_cond;
+
pthread_mutex_t *read_mutex;
pthread_mutex_t *launch_mutex;
diff --git a/src/ags/thread/ags_thread-posix.c b/src/ags/thread/ags_thread-posix.c
index 99522b6..9d6bca1 100644
--- a/src/ags/thread/ags_thread-posix.c
+++ b/src/ags/thread/ags_thread-posix.c
@@ -22,6 +22,7 @@
#include <ags-lib/object/ags_connectable.h>
#include <ags/object/ags_main_loop.h>
+#include <ags/object/ags_async_queue.h>
#include <ags/thread/ags_audio_loop.h>
#include <ags/thread/ags_export_thread.h>
@@ -1933,6 +1934,11 @@ void*
ags_thread_loop(void *ptr)
{
AgsThread *thread, *main_loop;
+ GObject *async_queue;
+
+ pthread_mutex_t *run_mutex;
+ pthread_cond_t *run_cond;
+
gboolean is_in_sync;
gboolean wait_for_parent, wait_for_sibling, wait_for_children;
guint current_tic, next_tic;
@@ -1943,8 +1949,10 @@ ags_thread_loop(void *ptr)
struct timespec time_prev, time_now;
auto void ags_thread_loop_sync(AgsThread *thread);
-
- void ags_thread_loop_sync(AgsThread *thread){
+ auto void ags_thread_loop_wait_async();
+
+ void ags_thread_loop_sync(AgsThread *thread){
+ /* sync */
if(current_tic = 2){
next_tic = 0;
}else if(current_tic = 0){
@@ -2001,21 +2009,57 @@ ags_thread_loop(void *ptr)
ags_main_loop_set_last_sync(AGS_MAIN_LOOP(main_loop), current_tic);
ags_main_loop_set_tic(AGS_MAIN_LOOP(main_loop), next_tic);
}else{
+ /* async-queue */
+ ags_async_queue_set_run(AGS_ASYNC_QUEUE(async_queue),
+ FALSE);
+
+ /* thread tree */
ags_thread_set_sync_all(main_loop, current_tic);
pthread_mutex_unlock(main_loop->mutex);
-
+
ags_main_loop_set_last_sync(AGS_MAIN_LOOP(main_loop), current_tic);
ags_main_loop_set_tic(AGS_MAIN_LOOP(main_loop), next_tic);
}
current_tic = next_tic;
}
-
+ void ags_thread_loop_wait_async(){
+ /* async-queue */
+ if(!AGS_IS_ASYNC_QUEUE(thread)){
+ if((AGS_THREAD_RUNNING & (g_atomic_int_get(&(AGS_THREAD(async_queue)->flags)))) != 0 &&
+ (AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(AGS_THREAD(async_queue)->flags)))) == 0 &&
+ (AGS_THREAD_INITIAL_RUN & (g_atomic_int_get(&(thread->flags)))) == 0){
+ pthread_mutex_lock(run_mutex);
+
+ // g_message("blocked\0");
+
+ if(!ags_async_queue_is_run(AGS_ASYNC_QUEUE(async_queue))){
+ // g_message("wait\0");
+
+ while(!ags_async_queue_is_run(AGS_ASYNC_QUEUE(async_queue))){
+ pthread_cond_wait(run_cond,
+ run_mutex);
+ }
+ }
+
+ pthread_mutex_unlock(run_mutex);
+ }
+ }else{
+ // g_message("not blocked\0");
+ }
+ }
+
ags_thread_self =
thread = AGS_THREAD(ptr);
main_loop = ags_thread_get_toplevel(thread);
+ /* async-queue */
+ async_queue = ags_main_loop_get_async_queue(main_loop);
+
+ run_mutex = ags_async_queue_get_run_mutex(AGS_ASYNC_QUEUE(async_queue));
+ run_cond = ags_async_queue_get_run_cond(AGS_ASYNC_QUEUE(async_queue));
+
/* */
current_tic = ags_main_loop_get_tic(AGS_MAIN_LOOP(main_loop));
@@ -2123,6 +2167,8 @@ ags_thread_loop(void *ptr)
ags_thread_loop_sync(thread);
pthread_mutex_unlock(thread->mutex);
+
+ ags_thread_loop_wait_async();
}
// pthread_yield();
@@ -2150,6 +2196,8 @@ ags_thread_loop(void *ptr)
ags_thread_loop_sync(thread);
pthread_mutex_unlock(thread->mutex);
+
+ ags_thread_loop_wait_async();
}
// pthread_yield();
@@ -2199,6 +2247,8 @@ ags_thread_loop(void *ptr)
ags_thread_loop_sync(thread);
pthread_mutex_unlock(thread->mutex);
+
+ ags_thread_loop_wait_async();
}
/* */
diff --git a/src/ags/widget/ags_dial.c b/src/ags/widget/ags_dial.c
index 2ea009b..cef768e 100644
--- a/src/ags/widget/ags_dial.c
+++ b/src/ags/widget/ags_dial.c
@@ -731,7 +731,7 @@ ags_dial_draw(AgsDial *dial)
}else if(dial->adjustment->upper < 0.0 && dial->adjustment->lower < 0.0){
range = -1.0 * (dial->adjustment->lower - dial->adjustment->upper);
}else{
- range = (dial->adjustment->upper + dial->adjustment->lower);
+ range = (dial->adjustment->upper - dial->adjustment->lower);
}
if(range == 0.0){
--
gsequencer packaging
More information about the pkg-multimedia-commits
mailing list